cse 681 distributed ray tracing some implementation notes
TRANSCRIPT
![Page 1: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/1.jpg)
CSE 681
DISTRIBUTED RAY TRACING
some implementation notes
![Page 2: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/2.jpg)
CSE 681
Theory v. practice
• Brute force – multiple rays at every sampling opportunity
• Implementation – for each pixel subsample, randomize at each opportunity
![Page 3: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/3.jpg)
CSE 681
DRT components
• anti-aliasing and motion blur– supersampling - in time and space: anti-aliasing
– jitter sample in time and space: motion blur
• depth of field - sample lens: blurs• shadows – sample light source: soft shadows• reflection – sample reflection direction: rough surface• transparency – sample transmission direction:
translucent surface
![Page 4: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/4.jpg)
CSE 681
Replace Camera Model
• shift from pinhole camera model to lens camera model
• picture plane at -w, not +w• camera position becomes lens center• picture plane is behind 'pinhole'• negate u, v, w, trace ray from pixel to camera
![Page 5: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/5.jpg)
CSE 681
ANTI-ALIASING: Organizing subpixel samples
Options
1. Do each subsample in raster order
2. do each pixel in raster order, do each subsample in raster order
3. do each pixel in raster order, do all subsamples in temporal order
4. keep framebuffer, do all subsamples in temporal order
![Page 6: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/6.jpg)
CSE 681
SPATIAL JITTERING
• for each pixel 200x200, i,j• for each subpixel sample 4x4 s,t• Jitter sample
![Page 7: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/7.jpg)
CSE 681
MOTION BLURTEMPORAL JITTERING
• for subsample• get delta time from table• jitter delta +/- 1/2 time division• move objects to that instant in time
![Page 8: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/8.jpg)
CSE 681
DEPTH OF FIELD
• generate ray from subsample through lens center to focal plane
• generate random sample on lens disk - random in 2D u,v
• generate ray from this point to focal plane point
![Page 9: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/9.jpg)
CSE 681
VISIBILITY - as usual
• intersect ray with environment• find first intersection at point p on object o
with normal n
![Page 10: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/10.jpg)
CSE 681
Shadows
• generate random vector on surface of light - random on sphere
![Page 11: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/11.jpg)
CSE 681
Reflections
• computer reflection vector• generate random sample in sphere at end of R
– Importance sampling
• Randomize n instead of R
![Page 12: CSE 681 DISTRIBUTED RAY TRACING some implementation notes](https://reader036.vdocument.in/reader036/viewer/2022072006/56649f535503460f94c786ab/html5/thumbnails/12.jpg)
CSE 681
Transparency
• compute transmission vector• generate random sample in sphere at end of T
– Importance sampling
• Randomize n instead of T