Distributed Ray Tracing 1996-2018 Josef Pelikán CGG MFF UK Praha pepca@cgg.mff.cuni.cz http://cgg.mff.cuni.cz/~pepca/ DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 1 / 24
Distributed ray tracing better image quality (fidelity) soft shadows, glossy reflections, soft refractions motion blur depth of field imitation light dispersion (index of refraction depends on ) introducing new variables to an image function reflection or refraction angle, wavelength, light source point, lens entry point, time,.. DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 2 / 24
Glossy reflection v A n r ideal (mirror) reflection actual (glossy) reflection DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 3 / 24
Glossy reflection computation Sharp reflection: I R I V (one reflected ray) Glossy reflection:,,,, I V I R BRDF d d sphere koule reflectance function (weighted integral average.. over all reflection angles) DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 4 / 24
Glossy reflection example 400 spp DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 5 / 24
Soft refraction n v A actual (soft) refraction t ideal (sharp) refraction DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 6 / 24
Soft shadow area light source full shadow (umbra) obstacle partial shadow (penumbra) DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 7 / 24
Soft shadow computation Contribution of a point light source: I A I L 0 if source is visible from A else Contribution of an area light source: % I A I S L visible portion of a light source DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 8 / 24
Soft shadow computation Contribution of an inhomogenous light source: I A IL u, v vis A, u, v dudv light plocha source zdroje area visibility function vis A, u, v 1 0 if S(u,v) is visible from A else DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 9 / 24
Soft shadow example 256 spp DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 10 / 24
Motion blur path of the solid s(t) rendered interval: (shutter open time) [ t 1, t 2 ] scene rendering in time t: f(t) = f(x,y,t) DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 11 / 24
Motion blur General motion blur: f blurr t t 2 1 f t dt DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 12 / 24
Motion blur Scene with single moving object: t 2 1 f t s t dt f blurr t 1 t t 2 1 s t 1 dt s t on na t, t 0 1 2 DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 13 / 24
Depth of field lens imaging plane (film) focus plane DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 14 / 24
Geometric simplification p,q lense x,y V xy radius r T xy imaging plane (image) focus plane DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 15 / 24
Depth of field computation Pinhole camera model:, f x y I V xy V T x, y, 0 xy xy V T p, q, 0 pq xy Lens with finite aperture:, pq circle kruharound kolem x, y f x y I V dp dq DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 16 / 24
Depth of field examples DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 17 / 24
Light dispersion white light (all wavelengths) separated wavelengths image function: f() = f(x,y,) DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 18 / 24
Light dispersion computation Pixel RGB color from spectral dristribution:,,, R x y f x y R d spectrum spektrum,,, G x y f x y G d spectrum spektrum trichromatic spectral coefficients,,, B x y f x y B d spectrum spektrum DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 19 / 24
Light dispersion example DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 20 / 24
Implementation integral averaging is done stochastically (Monte- Carlo methods) finite number of point samples (rays) integral is estimated by a [weighted] sum weighted integral average uniform sampling and appropriate weight function nonuniform sampling (using the right density/pdf) DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 21 / 24
Combining methods any methods can be combined with anti-aliasing as well higher order integrals e.g. dimension 10: anti-aliasing (2), depth of field (2), glossy reflection (2), soft shadows (2), motion blur (1), light dispersion (1) sampling method: jittering independent jittering ( N rooks ) in form of hidden sampling adaptive sampling DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 22 / 24
Hidden sampling number of samples per pix (primary rays) is defined every inner component is sampling independently arbitrary number of additional (sampled) dimensions 1 [x,y] [g,d] glossy [a,b] shadow random permutation jittering............ Implementation: N [ rank, total ] DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 23 / 24
References A. Glassner: An Introduction to Ray Tracing, Academic Press, London 1989, 171-199 A. Watt, M. Watt: Advanced Animation and Rendering Techniques, Addison-Wesley, Wokingham 1992, 262-265 DistribRT 2018 Josef Pelikán, http://cgg.mff.cuni.cz/~pepca 24 / 24