Offline Raytracer Day 3 (part 1)



  • Here we see 2 bounces of indirect light
  • Procedural checkerboard texture
  • Found ways to speed up the rendering quite a lot

Now that I have gotten to this point, I have identified some weaknesses in my original design for this ray tracer.  Originally I was casting a perhaps 4 or so rays from the camera per pixel and when these hit a surface they cast perhaps 32 sub rays from that point.  This is actually fairly shit, and makes the rendering times horribly slow.  All of these values were tweak able, but I have since found that sending out 256 rays from the camera, and having each one bounce only once randomly with each hit, is a much better solution, leading to more uniform noise, faster render times, free anti-aliasing, etc.

I now plan to write a ray tracer that corrects my previous design, which should in turn simplify the code immensely. I also want to try some backwards path tracing, from the light to the camera, instead of the other way around.

Additional, control of the camera was very tricky, and basically impossible to move.  I have to remedy this and create a freely positionable camera.

Will post results here soon…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s