global light baking soft ftware
play

global light baking soft ftware Sp Speaker Na Name Speaker Title - PowerPoint PPT Presentation

How to create a second level Session Title global light baking soft ftware Sp Speaker Na Name Speaker Title & Company Li Li Wen enyao Game engin gine researcher, Netease Game Outline Session Title Development background Sp


  1. How to create a second level Session Title global light baking soft ftware Sp Speaker Na Name Speaker Title & Company Li Li Wen enyao Game engin gine researcher, Netease Game

  2. Outline Session Title • Development background Sp Speaker Na Name • Baking direct lighting Speaker Title & Company • Baking indirect lighting

  3. Starting point 1 —— Global lighting Session Title Sp Speaker Na Name Speaker Title & Company Direct lighting Direct lighting + Indirect lighting

  4. Starting point 1 —— Global lighting Session Title 𝑀 𝑝 𝑦, 𝜕 𝑝 = 𝑀 𝑓 𝑦, 𝜕 𝑝 + 𝑔 𝑠 𝑦, 𝜕 𝑝 , 𝜕 𝑗 𝑀 𝑗 𝑦, 𝜕 𝑗 |cos 𝜄 𝑗 | 𝑒𝜕 𝑗 𝛻 Sp Speaker Na Name Speaker Title & Company

  5. Exploration of real-time global lighting • SSAO [Kajalin09, Bavoil08; Filion08, Mittring07] Session Title Sp Speaker Na Name Speaker Title & Company • SSIL [RGS09]

  6. Exploration of real-time global lighting Session Title Sp Speaker Na Name Speaker Title & Company Iterative propagation Reflective shadow maps Radiance volume gathering VPL VPL VPL A set of regularly sampled VPLs of Discretize initial VPL distribution Propagate light iteratively going from the scene from light position by the regular grid and SH one cell to another

  7. Exploration of real-time global lighting • Sparse Voxel Octree + Cone Trace Session Title Sp Speaker Na Name Speaker Title & Company LPV (37ms) SVO (32ms)

  8. Light Map Session Title • Real-time global lighting is a next next generation technology Sp Speaker Na Name Speaker Title & Company • Light Map —— Precomputed lighting

  9. Session Title Sp Speaker Na Name Speaker Title & Company Art production Baking software Real-time rendering

  10. Starting point 2 —— low-end graphics Session Title • We hope the frame rate of games running with integrated graphics can reach 30 frames Speaker Na Sp Name Speaker Title & Company • Deferred Lighting • Forward Lighting • Light t Map ap + + Forwa ward  For 3D mobile games, light map is the only option • Power VR G6450, 249.6 GFLOPS

  11. Why developed by ourselves? Session Title • Commercial baking software currently available on the market Patch Very slow more Fixed Sp Speaker Na Name baking than one material Speaker Title & Company G

  12. CloudGI panorama Google Session Title Protobuffer Client Sp Speaker Na Name Speaker Title & Company each model Direct Cloud Scene Lighting Indirect Lighting CloudGI

  13. Video Demo 1 Session Title Sp Speaker Na Name Speaker Title & Company

  14. Baking direct lighting 100 point light sources casting Session Title Deferred Shading shadows ? Sp Speaker Na Name Speaker Title & Company

  15. Sunlight shadow Session Title • Strategies for camera frustum are not longer effective Sp Speaker Na Name Speaker Title & Company • Strategies for perspective are not longer effective

  16. Sunlight shadow Session Title • Every model has a ShadowMap • A huge ShadowMap Sp Speaker Na Name Speaker Title & Company 5000 X 4000 • 10000X10000 = 200M graphics memory • Memory for Cache + Shadow Mask

  17. LightMap crack Session Title Sp Speaker Na Name Speaker Title & Company

  18. LightMap crack Session Title • Continuous in the world space, discontinuous in the uv space Sp Speaker Na Name Speaker Title & Company

  19. LightMap crack Session Title • Continuous in the world space, discontinuous in the uv space Sp Speaker Na Name Speaker Title & Company  Gutter, using the color of nearest baking point to fill the background

  20. LightMap crack Session Title • 在世界空间连续,在 uv 空间不连续 Sp Speaker Na Name Speaker Title & Company

  21. LightMap crack Session Title • 在世界空间连续,在 uv 空间不连续 Sp Speaker Na Name Speaker Title & Company

  22. LightMap crack Session Title • Fine edge in lightmap is smaller than one pixel Sp Speaker Na Name Speaker Title & Company • Super Sample->Gutter->Down Sample

  23. Point Cloud based GI Session Title 𝑀 𝑝 𝑦, 𝜕 𝑝 = 𝑀 𝑓 𝑦, 𝜕 𝑝 + 𝑔 𝑠 𝑦, 𝜕 𝑝 , 𝜕 𝑗 𝑀 𝑗 𝑦, 𝜕 𝑗 |cos 𝜄 𝑗 | 𝑒𝜕 𝑗 𝛻 Sp Speaker Na Name Speaker Title & Company

  24. Point Cloud based GI Session Title Raytrace O(n*m k ) * O(s) Sp Speaker Na Name Speaker Title & Company • Can do all the effects • Exponential growth • Noise

  25. Point Cloud based GI Session Title • Radios osity ty Speaker Na Sp Name Speaker Title & Company • Does Does not t disti tingu guish l ligh ght and nd ob object • Every y sur urfel is l lighte ted b by all ll th the other r sur urfels

  26. Session Title Sp Speaker Na Name Speaker Title & Company

  27. Session Title Sp Speaker Na Name Speaker Title & Company

  28. Session Title Sp Speaker Na Name Speaker Title & Company 2 bounce

  29. Session Title Sp Speaker Na Name Speaker Title & Company 16 bounce

  30. Point Cloud based GI Session Title • Radios osity ty O(n*n*k) Sp Speaker Na Name Speaker Title & Company • Linear growth • Without noise • Only can do diffuse reflectance GI effects

  31. Point Cloud based GI Session Title • Radios osity ty • How to to ca calcu culate e vis isibl ble dia iagra ram o of sur urfel el Sp Speaker Na Name Speaker Title & Company Hemicube, raster 5 times

  32. Point Cloud based GI Session Title • Radios osity ty • How How to to ca calcu culate e vis isibl ble dia iagra ram o of sur urfel el Sp Speaker Na Name Speaker Title & Company Hemispherical, raster one time

  33. Point Cloud based GI Session Title • Point cloud generation Sp Speaker Na Name • Creation of Octree Speaker Title & Company • Calculation of indirect lighting

  34. Point Cloud Generation Session Title • How to generate a point cloud • Same as direct lighting Deferred Shading Sp Speaker Na Name Speaker Title & Company DX11 Unordered Access View + Atomic Add CUDA Memory

  35. Point Cloud Generation Session Title • How to calculate Area? Geometry Shader Sp Speaker Na Name Speaker Title & Company Triangle Area Area = UV Area UV per pixel

  36. Video Demo 2 Session Title Sp Speaker Na Name Speaker Title & Company

  37. Octree Building Session Title • CPU top, from top to bottom • Unfriendly concurrency • Dynamic memory allocation Sp Speaker Na Name • Need synchronization or atomic operation Speaker Title & Company

  38. Octree Building Session Title • CPU top, from bottom to top • Natural concurrency • Does not need synchronization Sp Speaker Na Name • Graphics memory is not wasted Speaker Title & Company

  39. Octree Building Session Title • Creation of leaf node • 3 bits for one layer coding, so 32-bit means 10 layers key Sp Speaker Na Name 7 1 1 5 3 5 7 3 0 7 Speaker Title & Company sort 0 1 1 3 3 5 5 7 7 7 unique 0 1 1 3 3 5 5 7 7 7 Thrust —— CUDA based STL compact 0 1 3 5 7 leaf node 0 1 3 5 7 Key << 3 0 0 0 0 0

  40. Video Demo 3, Octree Session Title Sp Speaker Na Name Speaker Title & Company

  41. Octree Building Session Title • Why to build Octree • O(n*n* n*k)->O( O(n*log ogn*k *k) • What is the area and color of this node? Sp Speaker Na Name Speaker Title & Company Hemispherical, raster 1 time

  42. Octree Building Session Title • Spherical Harmonics • A set of orthogonal basis functions defined in the sphere 𝑛 𝜄, 𝜒 = ⋯ ; 𝑚 ∈ 𝑂, −𝑚 ≤ 𝑛 ≤ 𝑚 • 𝑍 𝑚 Sp Speaker Na Name Speaker Title & Company 𝑜 𝑚 𝑛 𝜄, 𝜒 𝑛 𝑍 𝑔 𝜄, 𝜒 ≈ 𝑔 𝑚 𝑚 𝑚=0 𝑛=−𝑚 𝑛 = 𝑔 𝜄, 𝜒 𝑍 𝑛 𝜄, 𝜒 𝑒𝜕 𝑔 𝑚 𝑚

  43. Octree Building Session Title • Spherical Harmonics • Turn one function 𝑔 𝜄, 𝜒 into several parameters • Turn sum of two functions into sum of several parameters Speaker Na Sp Name Speaker Title & Company 𝑜 𝑚 𝑛 𝜄, 𝜒 𝑛 𝑍 𝑔 𝜄, 𝜒 ≈ 𝑔 𝑚 𝑚 𝑚=0 𝑛=−𝑚 𝑛 = 𝑔 𝜄, 𝜒 𝑍 𝑛 𝜄, 𝜒 𝑒𝜕 𝑔 𝑚 𝑚 𝑛 = 𝐵 𝑗 |𝑒𝑝𝑢 𝑛 𝜄, 𝜒 𝑒𝜕 𝑏 𝑚 𝑒, 𝑜 | 𝑍 𝑚 𝑛 = 𝐶 𝑗 𝐵 𝑗 𝑒𝑝𝑢 𝑛 𝜄, 𝜒 𝑒𝜕 𝑞 𝑚 𝑒, 𝑜 + 𝑍 𝑚

  44. Indirect Lighting Session Title • Calculation of indirect lighting • Get id map by examining the whole Octree • calcRadianceFromID Speaker Na Sp Name • Average * PI Speaker Title & Company 𝑜 𝑚 𝑛 𝜄, 𝜒 𝑛 𝑍 𝑔 𝜄, 𝜒 ≈ 𝑔 𝑚 𝑚 𝑚=0 𝑛=−𝑚 Hemispherical, raster 1 time

  45. Algorithm Optimization Session Title • Baking a small scene needs half an hour!!! • Baking accuracy == Indirect lighting accuracy Sp Speaker Na Name Speaker Title & Company • 1 oversampled lightmap has 16 million point clouds • Separate baking accuracy, indirect lighting accuracy • K-near interpolation, considering normal , position • Preset threshold

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend