80 likes | 168 Vues
Parallelized Monte Carlo Raytracing. Brian Anderson. Simple Raytracing. Shoot a single ray from the eye. Determine closest intersection point. Sum the intensity of lights visible from the point. Recursively shoot single reflection and refraction rays as necessary. Assumes:
E N D
ParallelizedMonte Carlo Raytracing Brian Anderson
Simple Raytracing • Shoot a single ray from the eye. • Determine closest intersection point. • Sum the intensity of lights visible from the point. • Recursively shoot single reflection and refraction rays as necessary. • Assumes: • Point Lights (either visible or not) • Perfect Reflections • Camera with infinitely small aperature
Monte Carlo Raytracing • Shoot (many) random rays from the aperature. • Determine intersection point. • Sum visible and partially visible light sources. • Shoot (many) random rays to the area of each light. • For fuzzy reflections: • Emit reflection rays in(many) random directions. • Weight appropriately. • = LOTS and LOTS of rays!
Parallelizing Monte Carlo • Have each proccess calculate a single area of the image? • Have each process calculate it’s own image and then average all of them? • Not completely straightforward…
Convergence of Monte Carlo • Quality does not only depend on number of rays. • Key: Minimize variance Decrease noise. • Using completely random rays: • Variance converges with √N. • We can do better by selectively choosing a good distribution of rays: • Importance Sampling • Stratisfied Sampling • Variance can converge with N.
Parallelizing Monte Carlo • Useful for: • Fuzzy Reflections • Easily parallelized: • Probabalistic • No coordination needed • Useful for: • Depth of Field • Soft Shadows • Parallelize by: • Partitioning strata • 1 disc with 16 strata >4 discs with 4 strata • Importance Sampling: • Stratisfication: X
Results • If parallelized naiively, serial version could converge faster, negating added processing power. • Parallelized code does not yet work. • Using methods indicated, suspect N times speedup for identical quality.