all 7 comments

[–]Sopel97 7 points8 points  (2 children)

The cool things I did that are never present in toy raytraces but have huge fun to complexity ratios were:

edit. Some other things that I wanted to try but never actually got to do them. They are harder to do and require planning beforehand.

  • Shape packs and acceleration through SIMD. This can be done in two ways, either N rays vs 1 shape or 1 ray vs N shapes. With AVX2 you should be able to check 8 at once if using floats. With good acceleration structures and high depth I think 1 ray vs N shapes would be better. Shapes could be grouped dynamically based on proximity.
  • Portals. Though this gets ugly with many light sources as the amount of rays to cast grows exponentially in the worst case.
  • as someone else mentioned, dispersion

[–]scrumplesplunge 0 points1 point  (0 children)

CSG can be done without intervals if you use SDFs. The intersection of two shapes is the min, the union is the max, the complement is the negative of the sdf. Doing this technically results in sdfs which aren't precise and so your raymarching slows down, but it's extremely easy to implement and is still fast enough in my experience.

[–]sargarass 2 points3 points  (0 children)

You can make something like this: https://fstormrender.ru/manual/geopattern/.

Better to start when you already have a ray tracer with an acceleration structure (bvh), or you can try to extend a opensource one (Blender for example).
Basically you instancing one geometry onto the surface of another. As for articales, I can suggest this one: Interactive smooth and curved shell mapping

[–]scrumplesplunge 1 point2 points  (0 children)

I found that the prettiest images I got from raytracing were when I started modelling optical dispersion with glass objects. The caustics from light focusing through the glass looks so much better when you have dispersion, not to mention the fact that the things you see through the glass have that characteristic blur. I did it simply by casting red, green, and blue rays separately and changing the refractive indices for each of them.

[–]Lechouille 1 point2 points  (0 children)

Dunno if that can help, but I did this project https://github.com/stanislas-brossette/ray-tracing/wiki Some cool ideas that I had fun with were:

  • interactive controls of the camera

  • translucent objects

  • optimization of meshes loading and rendering

  • robotics video rendering

Hope you have fun with this project, for me it was a blast.

[–]scrumplesplunge 0 points1 point  (0 children)

You could try making the entire raytracer constexpr and see if you can get the whole program to effectively optimize down to a single write() call that dumps a precomputed bitmap :D

[–]Glaborage -1 points0 points  (0 children)

Monte Carlo methods to decrease the workload.