1 / 25

Ray tracing via GPU Rasterization

Ray tracing via GPU Rasterization. Wei Hu 1 Yangyu Huang 1 Fan Zhang 1 Guodong Yuan 2 1 Beijing University of Chemical Technology, Beijing 2 Tsinghua University, Beijing. The Goal. Input: A ray and scene objects Output: The intersection position(if exists). GPU Rasterization Method.

Download Presentation

Ray tracing via GPU Rasterization

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. Ray tracing via GPU Rasterization Wei Hu1 Yangyu Huang1 Fan Zhang1 Guodong Yuan2 1Beijing University of Chemical Technology, Beijing 2Tsinghua University, Beijing

  2. The Goal Input: A ray and scene objects Output: The intersection position(if exists)

  3. GPU Rasterization Method • Sampling-based • Environment Map and Shadow Map approximate effects • Layered Depth Images(LDI) too slow for accurate ray-scene intersections GPU Rendering of Secondary Effects[K. Burger et al. 2007] • Voxel-based • Uniform Grid cost too much memory for accurate ray-scene intersections • Sparse Voxel Octree(SVO) use cone tracing to generate glossy reflection, not applicable for rendering fully dynamic scenes Gigavoxels: ray-guided streaming for efficient and detailed voxel rendering[C. Crassin et al. 2009]

  4. Our Method Introduction • Our idea is simple but very effective • Combine low resolution uniform grid and high resolution A-buffer(LDI) Achieve balance between accuracy and performance • Support various GI effects • Ray casting • Whitted ray tracing(reflections/refractions, shadows) • Ambient occlusion • Soft shadow • Path tracing

  5. Our Ray-tracing Algorithm Scene Representation • Two-level representation of scene(All generated in one pass) • One uniform voxel grid(low resolution, one 3D texture) • Three A-buffers(high resolution, three texture buffers) • A-buffer sorting(One pass) Sort each A-buffer by it’s main axis from near to far(x, y, z axis) • Deferred shading(One pass) Compute first ray-tracing scene informations(vertex, normal, texture, etc.)

  6. Our Ray-tracing Algorithm

  7. Our Ray-tracing Algorithm

  8. Our Ray-tracing Algorithm Ray-scene Intersection • Traverse the ray on the coarse-level uniform grid in the scene(use 3D-DDA) • Select a A-buffer from three A-buffers • Traverse the ray on the selected precise A-buffer in the non-empty grid(2D-DDA) • determine whether the point is inside scene objects by comparing depth values in sorted link-listed values

  9. Our Ray-tracing Algorithm Improve the performance of ray-tracing in A-buffer • Linear search accurate but slow reflection, refration • 1-step binary search fast but Inaccurate ambient occlusion, path tracing • 3-step binary search balance the accuracy and speed shadow A non-empty voxel search in A-buffer

  10. Implementation Challenges Ray-tracing in multiple layers Reasons: • Shader don’t support recursion Solutions: • Replace recursion by loops • Forward compute results • Backward combine results Scene P1 P2 P3 Screen P0 P4

  11. Implementation Challenges Low frequency effect need large sampling rays Reasons: • Shader limit sampling rays number Solutions: • Implement multiple-pass rendering pipeline • Two buffer(FBcurr and FBcomp) maintain result • One for current result • One for final result

  12. Implementation Challenges Multiple-pass rendering methods • General rendering For i = 0:passNum-1 Compute Fbcurr Fbcomp += Fbcurr / passNum End updateScene() • Progressive rendering For i = 0:inf Compute Fbcurr Fbcomp = (i * Fbcomp + Fbcurr) / (i + 1) updateScene() End

  13. Experimental Results & Discussion • Ray Casting • Ray Tracing • Ambient Occlusion • Path Tracing Result Size: 800 600 All generated with full dynamic scenes

  14. Experimental Results & Discussion • Language: OpenGL/GLSL • Equipment: Intel Xeon R CPU E5-1620 3.7GHz NVidia GeForce R780 GTX graphics card • A-buffer: 1280 1280 • Uniform grid: 64 64 64 sqrt(3n)^3 ugrid is a better choice for n^2 A-buffer • Screen buffer: 800 600 • Trace depth: 3 • Fully dynamic scene: uniform voxel grids and A-buffers are reconstructed for each frame

  15. Experimental Results & Discussion A display of video All effects are generated by our method Fully dynamic scene

  16. Experimental Results & Discussion Whitted ray tracing effect Accuracy of ray-scene intersection Result: Our results closely match the references(Optix) • Compare with optix Ours Optix

  17. Experimental Results & Discussion • Compare with uniform grid Ambient occlusion effect • Ours: 64^3 / 256 / 64 / 16.8fps • Ugrid: 64^3 / 64 / 46.3fps • Ugrid: 256^3 / 96 / 7.7fps Result: Reach the approximate same effect, our method is faster than uniform grid

  18. Experimental Results & Discussion • Compare with sparse voxel octree Result: Better for full dynamic scenes, for which high-precision results are usually required.

  19. Comparison bad general good Time slow: -1 medium: 0 fast: +1 Accuracy low: -1 medium: 0 high: +1 Memory large: -1 medium: 0 small: +1 Scene small: -1 medium: 0 large: +1

  20. Applications • Ward BRDF

  21. Applications • Soft shadow

  22. Applications • Slightly larger scene

  23. Limitations • Gracile objects might be missed in A-buffer • Large and complex scenes may beyond the capability of current GPU • When tracing, a ray can‘t branch into two rays in multiple layers

  24. Conclusion & Future Works • Conclusion • A novel ray-scene intersection technique • Balance the accuracy and performance • A new ray-tracing framework • Wide range use in GI effects • Future works • Improve the intersection accuracy • Accelerate representation construction • Apply to more large and complex scenes

  25. Thanks & Questions Contact me: memoryemon@gmail.com Yang-yu Huang the second year of master's degree

More Related