Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



I don't know how much you guys know about path tracing and teh rendering equation but I've got a question about it:

In all of the simple algorithms for path tracing using lots of monte carlo samples that I see in lecture notes the tracing function of the algorithm randomly chooses between returning with the emitted value for the current surface and continuing by tracing another ray from that surface's hemisphere (for example in the slides here). Like so:
code:
TracePath(p, d) returns (r,g,b) [and calls itself recursively]:
    Trace ray (p, d) to find nearest intersection p’
    Select with probability (say) 50%:
        Emitted:
            return 2 * (Le_red, Le_green, Le_blue) // 2 = 1/(50%)
        Reflected: 
             generate ray in random direction d’
             return 2 * fr(d ->d’) * (n dot d’) * TracePath(p’, d’)
Why does it randomly choose between returning with the emissive element and continuing the path? Is this just a way of using russian roulette to terminate paths without bias? Surely it would make more sense to count the emissive and reflective properties for all ray paths together and use russian roulette just to decide whether to continue tracing or not.

Also why do the algorithms that don't use this choosing between emission and reflective components instead only count the first emissive element? The rendering equation for a point is the emissive element plus the integral of the incoming light, which is itself the emissive element for a point and the integral of incoming light of other surfaces, so why not count it for each bounce of each path?

Adbot
ADBOT LOVES YOU

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply