Like many before me, I've written a ray-tracer, just for fun.
The intention was to experiment with stochastic techniques for things like
area lights, etc. The deterministic version works fine, but for the
stochastic version I can't find any decent reference material on how to
handle diffuse inter-reflection.
For the stochastic version I'm not using lights, I'm using high-ambient
solids. This means there's no explicit direct rays back to light sources,
nor shadow calculatations. I could do with guidance on whether that's a
mistake or not.
Currently I'm just spawning a few new rays in random directions and
summing
those (weighted by the dot-product of the surface normal and the new ray
and
divided by the number of rays) but even after many hours on a 16-core box
the results are incredibly speckly. Also the image turns out much darker
than expected, I think because so many of my random diffuse rays are just
hitting the black background.
Any pointers gratefully received...
cheers,
Ray


|