Image Generation (Raytrace 4)
Image Generation (Raytrace 4)
After a bit of a break I was inspried to revisit the raytracing code after looking over the raytracer books at Raytracing in one week
I did a little bit of tidying up of some sections of the code. The main things i worked on was to change the background and how diffuse lighing material was gathered. Rather than sending out a large number of rays instead we send out a single random ray and add in anti-aliasing (which improves the general outline as well) to collect a large number of samples per pixel.
Example of more realistic lighting:
Doing this also means that matt and shiny objects work better together. I made a simple example with some random spheres to test this out. I will probably make a post on improving the generation of scenes like this.
With 100 spheres the time spent is very noticable. Probably the next thing i will work on is some space partioning to speed things up.