Presentation is loading. Please wait.

Presentation is loading. Please wait.

CGI2014 SPONSORED BY Ray tracing via GPU Rasterization Wei Hu 1 Yangyu Huang 1 Fan Zhang 1 Guodong Yuan 2 1 Beijing University of Chemical Technology,

Similar presentations


Presentation on theme: "CGI2014 SPONSORED BY Ray tracing via GPU Rasterization Wei Hu 1 Yangyu Huang 1 Fan Zhang 1 Guodong Yuan 2 1 Beijing University of Chemical Technology,"— Presentation transcript:

1 CGI2014 SPONSORED BY 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

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

3 CGI2014 SPONSORED BY CGI2014 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] 3

4 CGI2014 SPONSORED BY CGI2014 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 4

5 CGI2014 SPONSORED BY CGI2014 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.) 5

6 CGI2014 SPONSORED BY CGI2014 Our Ray-tracing Algorithm 6

7 CGI2014 SPONSORED BY CGI2014 Our Ray-tracing Algorithm 7

8 CGI2014 SPONSORED BY CGI2014 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 8

9 CGI2014 SPONSORED BY CGI2014 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 9 A non-empty voxel search in A-buffer

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

11 CGI2014 SPONSORED BY CGI2014 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 11

12 CGI2014 SPONSORED BY CGI2014 Implementation Challenges 12 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 CGI2014 SPONSORED BY CGI2014 Experimental Results & Discussion 13 Ray Casting Ray Tracing Ambient Occlusion Path Tracing Result Size: 800 600 All generated with full dynamic scenes

14 CGI2014 SPONSORED BY CGI2014 Experimental Results & Discussion 14 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 CGI2014 SPONSORED BY CGI2014 Experimental Results & Discussion 15 A display of videovideo All effects are generated by our method Fully dynamic scene

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

17 CGI2014 SPONSORED BY CGI2014 Experimental Results & Discussion Compare with uniform grid 17 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 CGI2014 SPONSORED BY CGI2014 Experimental Results & Discussion Compare with sparse voxel octree 18 Result: Better for full dynamic scenes, for which high-precision results are usually required. SceneMethodConstructionTracing RayOthersTotal Scene1Ours13.2ms11.6ms2.7ms27.5ms Scene1SVO42.8ms84.6ms3.8ms131.2ms Scene2Ours10.8ms8.7ms2.6ms22.1ms Scene2SVO35.6ms79.6ms2.9ms109.1ms

19 CGI2014 SPONSORED BY CGI2014 Comparison 19 OursSVOUGLDI Time Low frequency 0+100 High frequency +10 Dynamic +100 Accuracy +10+1 Memory +1 +1 Scene 0+10 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 CGI2014 SPONSORED BY CGI2014 Applications Ward BRDF 20

21 CGI2014 SPONSORED BY CGI2014 Applications Soft shadow 21

22 CGI2014 SPONSORED BY CGI2014 Applications Slightly larger scene 22

23 CGI2014 SPONSORED BY CGI2014 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 23

24 CGI2014 SPONSORED BY CGI2014 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 24

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


Download ppt "CGI2014 SPONSORED BY Ray tracing via GPU Rasterization Wei Hu 1 Yangyu Huang 1 Fan Zhang 1 Guodong Yuan 2 1 Beijing University of Chemical Technology,"

Similar presentations


Ads by Google