How Games Have Worked for 30 Years to Do Less Work
TLDRModern 3D games render massive, detailed worlds without compromising performance using techniques built on decades of graphics research. The key is quickly determining what is and isn't visible to the player's camera. Basic frustum culling discards objects outside the viewing area. Occlusion culling identifies and skips objects hidden behind closer objects. Hardware occlusion queries ask the GPU what's visible. Finally, temporal occlusion exploits frame-to-frame coherence, reusing last frame's visible set as this frame's occluders, achieving real-time performance.
Takeaways
- ๐ฒ Frustum culling discards objects outside the camera's view frustum
- ๐ Occlusion culling discards objects hidden behind other objects
- ๐ง Hierarchical z-buffers (HZB) store approximate scene depth info
- ๐ Software rasterizers can quickly generate low-res HZBs
- ๐ฌ Hardware occlusion queries ask the GPU what's visible
- โ๏ธ Query hierarchies reduce CPU overhead
- โฑ Stalling for query results is slow
- ๐ Temporal coherence means scenes change little across frames
- โ๏ธ Two-pass occlusion culling leverages temporal coherence
- ๐ Modern GPUs do almost all culling on the GPU itself
Q & A
What is view frustum culling and how does it work?
-View frustum culling is a technique used in 3D graphics to improve performance by only rendering objects that are within the player's field of view, defined by a viewing volume called the view frustum. It discards objects outside this volume to avoid unnecessary rendering.
What are the limitations of using only view frustum culling?
-Frustum culling alone is not enough for optimal performance. Objects inside the view frustum may still be occluded by other objects, so further culling is needed. Relying solely on frustum culling can lead to poor performance, as seen in games like Cities: Skylines 2.
What is occlusion culling and how does it build on frustum culling?
-Occlusion culling builds on frustum culling by discarding objects inside the view frustum that are obscured or occluded by other objects nearer to the camera. This further reduces the number of objects sent for rendering.
How can occlusion volumes be used for simple occlusion culling?
-Artists can manually place invisible occlusion volumes around large objects like buildings and trees. During rendering, objects fully enclosed inside an occlusion volume can be discarded since they are hidden.
What are hierarchical z-buffers (HZBs) and how are they used in occlusion culling?
-HZBs are mip-mapped chains of depth buffers at progressively lower resolutions. At render time, objects can be cheaply tested against HZBs to see if they are visible or occluded. This is much faster than rendering the actual objects.
How can software rasterization generate occlusion data for culling?
-A low resolution depth buffer of only key occluders can be generated using optimized software rasterization code on the CPU. This depth data can then be used to build a HZB for occlusion queries without needing the GPU.
What are some challenges faced when using GPU occlusion queries?
-GPU queries incur CPU overhead and latency in getting results back. Building query hierarchies helps but doesn't eliminate issues completely. Ultimately, stalling for query results hampers performance.
How does temporal occlusion culling exploit coherence between frames?
-It reuses depth data from prior frames, re-projects it to the current view, and combines it with new near-field depth data. This exploits the fact that much of the scene changes little between successive frames.
What are the two passes in modern temporal occlusion culling?
-First, visible objects from the prior frame are rendered and used to build a HZB. Then, newly visible objects are rendered and tested against this HZB. This handles both visibility and movement effectively.
What future occlusion culling advancements are being explored?
-Individual objects are being broken into sub-objects for finer-grained culling. Unreal's Nanite technology virtualizes scenes into micro polygons for automatic level-of-detail handling.
Outlines
๐ฅ How Games Render Huge Open Worlds So Quickly
This paragraph introduces frustum culling, which allows games to limit what gets drawn to only what's visible to the camera. It discards objects completely outside the camera's view frustum to improve performance. A bounding volume test determines what's inside or intersecting the view frustum. This greatly reduces the number of objects that need to be drawn.
๐ณ Adding Occlusion Culling For More Savings
This paragraph explains occlusion culling, which builds on frustum culling by using objects already deemed visible to cull even more objects behind them. Games manually place invisible occlusion volumes or project object silhouettes to form occluder view frustums. By discarding objects inside these reversed view frustums early, huge performance gains are achieved.
๐ Using Hardware Occlusion Queries
This paragraph discusses using GPU hardware occlusion queries to accelerate occlusion culling. Queries allow quickly asking the GPU if bounding volumes are visible. Hierarchies of volumes help minimize queries. However, issues with CPU overhead and stalling for answers prompted games like Splinter Cell Conviction to abandon this approach.
๐ฅ๏ธ Rendering Occluders On The CPU
This paragraph explains rendering a depth buffer using the CPU to build a hierarchical Z-Buffer for occlusion culling. Games like Killzone 3 did this by simplifying geometry and using the PS3's SPUs to quickly rasterize occluders. This allows flexibility in occluder shapes and their unions when discarding objects.
โ Exploiting Temporal Coherence Between Frames
This paragraph discusses techniques to exploit the observation that scene content changes little between frames. Assassin's Creed combined the previous frame's reprojected depth buffer with newly rendered data. However, difficulties managing this approach over time led to the more common two-pass method used today.
Mindmap
Keywords
๐กView frustum
๐กOcclusion culling
๐กBounding volume
๐กHierarchical z-buffer
๐กTemporal coherence
๐กConservative culling
๐กGPU occlusion queries
๐กSoftware rasterizer
๐กCompute shaders
๐กLevel of detail
Highlights
The study provides new insights into regulation of gene expression during aging.
The findings reveal a critical role for histone methylation in controlling lifespan and healthspan.
The results demonstrate that modulating histone methylation can extend lifespan in mice.
The data suggests enhancing histone methylation could be a promising approach for anti-aging therapies.
The study identifies novel epigenetic factors and mechanisms that influence aging.
The work elucidates new connections between chromatin state, gene regulation, and aging.
The findings have important implications for understanding the biology of aging.
The results provide a foundation for developing interventions to promote healthy lifespan.
The research highlights the potential of epigenetic-based anti-aging strategies.
The study expands knowledge of chromatin regulation of longevity genes.
The work opens new avenues for targeting the epigenome to combat aging and age-related disease.
The findings reveal histone methylation as a key mechanism connecting epigenetics and aging.
The data provides a new framework for understanding epigenetic regulation of aging.
The results suggest new epigenetic strategies may enable healthy aging in humans.
The study motivates further efforts to translate epigenetic anti-aging therapies to the clinic.
Transcripts
Browse More Related Video
MSI Afterburner Settings Explained / AMD and NVIDIA!
Rendering Water With Sine Waves
Elite: "The game that couldn't be written"
DYNAMIC OCCLUSION - Working vs. Non-working Movement & Occlusal Grid
The Science of Light and Color for Kids: Rainbows and the Electromagnetic Spectrum - FreeSchool
๐ง How To Overclock Your GPU - The Ultimate Easy Guide 2020
5.0 / 5 (0 votes)
Thanks for rating: