1 / 20

NPR in Ray Tracing

NPR in Ray Tracing. Dan Maljovec. Reference.

falala
Download Presentation

NPR in Ray Tracing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NPR in Ray Tracing Dan Maljovec

  2. Reference Choudhury, A. N. and Parker, S. G. 2009. Ray tracing NPR-style feature lines. In Proceedings of the 7th international Symposium on Non-Photorealistic Animation and Rendering (New Orleans, Louisiana, August 01 - 02, 2009). S. N. Spencer, Ed. NPAR '09. ACM, New York, NY, 5-14.

  3. Ray Stencil N = 1 Compare: • Geometry ID (gs) • Depth (ts) • Normal (ns) S

  4. Types of Feature Lines N = 1 Compare: • Geometry ID (gs) • Depth (ts) • Normal (ns) Intersections & silhouettes S Silhouettes & self-occluding contours Creases

  5. Edge Strength Function • You want the largest edge strength to be when half of your rays see something different • Let M = # of stencil rays we are going to shoot

  6. Different Geometry N = 1 Compare: • Geometry ID For each stencil ray r If(gs != gr) m++ Radiance = lambertian * eM(m) S Edge Strength Function M = # of stencil rays

  7. Depth Discontinuity N = 1 Compare: • Depth For each stencil ray r If(|ts – tr| > Td) d++ Radiance = lambertian * eM(d) Td = depth threshold S Edge Strength Function M = # of stencil rays

  8. Normal Discontinuity N = 1 Compare: • Normal For each stencil ray r If(||ns – nr|| > TN) Radiance = black TN = normal threshold S Edge Strength Function M = # of stencil rays

  9. Results

  10. Results

  11. Alternative Method Do we need to shoot the ray stencil? • We already have that information from the neighboring rays

  12. Alternative Method Do we need to shoot the ray stencil? • We already have that information from the neighboring rays Solution: • Shoot one ray per pixel • Pass normal, geometry, color, and depth values to shader that computes edge strengths.

  13. Alternative Method Do we need to shoot the ray stencil? • We already have that information from the neighboring rays Solution: • Shoot one ray per pixel • Pass normal, geometry, color, and depth values to shader that computes edge strengths. Ideally, you would want to pass the Optix buffers to a CUDA program and process in parallel • Eliminating the overhead of involving OpenGL

  14. Alternative Method

  15. Alternative Method

  16. Performance Pure Optix Method CG Hybrid Method Slight stutter in animation Copy overhead? Scales better when N > 1 Independent of number of scene layout • Works well for N = 1 • (5-point stencil) • Slows down for N > 1 • Dependent on # of rays that need stencil rays In practice, N > 2 doesn’t look very good, witness Exhibit A:

  17. N = 3

  18. N = 7

  19. Open Issue

  20. Open Issue No Feature Lines Through glass

More Related