(no subject)

Sep 28, 2009 23:55

So it's taken me an extra day to get this far. But I've finally got unbiased global illumination added. I kept thinking about the problem wrong. It's weird getting your head wrap around the use of randomness and probability to converge quickly or slowly to the real solution in an unbiased way.

In less nerdy speak, this is what a Monte Carlo path tracer is:

We're interested in using the well understood field of radiometry (measure of light) to model a physically perfect light transport simulation to generate an image. But there's a huge problem with that. There's only about 5 gazillion billion googol light paths bouncing around illuminating your room.... only a small fraction of which actually strike your eyeball. We could write the code to model this fairly easily and hit run, but we'd all be dead before the first pixel was rendered. So instead we have to trace paths from they eye instead. In standard ray tracing we just follow whatever paths we think will get us a cool image. In path tracing we make random choices weighted by the probability of those choices to get an unbiased solution. In standard ray tracing you don't get stochastic noise, but instead you get bias.

In the image below you can see indirect illumination. The light bounces off the walls and strikes the other objects.

49 paths per pixel... those bright flecks must be a bug... it seems so unlikeley that they should diverge from the expected value that much :S



16 paths per pixel... a bit more noise...


Previous post Next post
Up