Philipp Slusallek
Computer Graphics
- Distribution Ray Tracing -
Computer Graphics - Distribution Ray Tracing - Philipp Slusallek - - PowerPoint PPT Presentation
Computer Graphics - Distribution Ray Tracing - Philipp Slusallek Overview Other Optical Effects Not yet included in Whitted-style ray tracing Stochastic Sampling Distribution Ray-Tracing Problems Anti-aliasing Depth of
β Not yet included in Whitted-style ray tracing
π½ β ΰΆ±
A
π π + π’π ππ΅
π½ β ΰΆ±
A
π π + π’π ππ΅
π β ΰΆ±
[π’π,π’1]
ππ π + π’π ππ
ππ = ππ + ΰΆ±
Ξ©+
π
π ππ cos ππ πππ
ππ ππ ππ
πΉπ = ΰΆ±
π΅
π π¦, π§ cosππ΅ π¦ β π§ 2 ππ΅ π¦ π§
π = ΰΆ±
πΈ
π π¦ ππ¦ π β πΈ π ΰ·
π=1 π
π π¦π π¦π = uniform πΈ
(VERY SHORT INTRO)
β Uniformly distributed β ΞΎ in [0, 1)
β Linear congruential β Mersenne-Twister β β¦ β Speed / evenness trade-off
β π π£, π€ = π0 + π£ π1 β π0 + π€ π2 β π0 = 1 β π£ β π€ π0 + π£π1 + π€ π2
β π π1, π2
p2 p1 p0 u v p
β π π£, π€ = 1 β π£ β π€ π0 + π£π1 + π€ π2
β if π1 + π2 < 1 : π π1, π2 β if π1 + π2 > 1 : π 1 β π1, 1 β π2
p2 p1 p0 u v p
β p(u, v) = Polar2Cartesian(R v, 2 Ο u) // disc radius R
β π π1, π2
β p(u, v) = Polar2Cartesian(R v, 2 Ο u) // disc radius R
β π π1, π2 β Results in uniform sampling
http://people.cs.kuleuven.be/~philip.dutre/GI/TotalCompendium.pdf
β Pixel
β Lens
β Time
β BRDF
β Area Lights
β Base on paper:
Distributed Ray Tracing, Siggraphβ84
β Jagged edges β Aliased patterns
β Average samples over pixel area β Akin to sensor cells of measuring device collecting photons
β prc[coord] = pid[coord] + 0.5 + (ΞΎ β 0.5)
β Plain average β Box filter f(x, y) = 1 β π =
Οπ=1
π
π(ππ1,ππ2) π
β Weighted average β Filter f(x, y) β π =
Οπ=1
π
π(ππ1,ππ2)π(ππ1,ππ2) Οπ=1
π
π(ππ1,ππ2)
β Complex lenses that focus one distance onto the image
β Blurred features except for focal plane
β Focus light rays from point on object onto image plane
β Depth of field: depth range with acceptably small circle of confusion
β Compute focus point Pf on focal plane, determined by Pb and Pc
β Sample coordinates (x, y) of aperture diameter (= f / N) β Compute Pl: ray.origin += Pc + x * camera.right + y * camera.up β Might include modeling the shape of the aperture
β Compute ray.direction = Pf - Pl β vector from Pl to Pf β Normalize
Lens Image plane Focal plane
Pb Pl Pf Pc
Cook et al. Siggraphβ84
β Finite exposure time β Shutter opening at t0 β Shutter closing at t1
π’0 π’1 π’0 + π’1 β π’0 π
β Finite exposure time β Shutter opening at t0 β Shutter closing at t1
β Sample time t in [t0, t1): t = t0 + ΞΎ (t1 - t0) β Assign time t to new camera ray/path β Models with moving camera and/or moving objects in the scene
β Assume instantaneous opening and closing
β Acceleration structures built over dynamic objects
Cook et al. Siggraphβ84
β ππ β refractive index
π π€
β Light: fastest path β Snellβs law: β if
sin π1 sin π2 = π2 π1 sin π2 = π1 π2 sin π1 > 1 ... then total inner reflection
β Both: may be exponential
β Pick one at random:
β Compensate for the energy-loss
π
β Never perfectly smooth surfaces
β Compute orthonormal frame around reflected/refracted direction β Sample coordinates (x, y) on disc: ray.direction += x * a + y * b
β Perturbed ray may may go inside β Check sign of dot product with N β Ignore rays on wrong side
β Recursively repeat process
Cook et al. Siggraphβ84
β Finite area
Οπ Οπ
β Random sample point on surface of light source β Scale intensity by area and cosine
Οπ Οπ
β number of anti-aliasing samples β x number of lens samples β x number of time samples β x number of material samples β x number of light samples β Exponential growth:
with decreasing effect on final pixels β bad2
β Avoid exponential growth in ray tree β Pick a single sample at each step: β Create a sample path β Average results over several paths per pixel β path tracing (RIS)