real-time volumetric terrain rendering and data …...– real-time terrain alteration very hard to...
TRANSCRIPT
![Page 1: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/1.jpg)
Crafter Engine
Real-Time Volumetric Terrain Rendering and Data Processing
ByLukasz Bator
![Page 2: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/2.jpg)
Introduction
● Problem● Terrain Rendering Approaches
– Height Map only approaches
– Object Substitution
– Multiple Height Maps
– Procedural Generated Terrain.
– Volumetric/Voxel Rendering
● Crafter Engine● Results
![Page 3: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/3.jpg)
Problem definition
Create Terrain that can be easily modified in real-time with:
– Cliffs
– Caves
– Tunnels
– Overhangs
![Page 4: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/4.jpg)
Height Map only
Pros:– Very simple to
implement
– Fast to render
– Very Good on memory
– Very Good on CPU
– Easy terrain modification
– Fast Collision detection
Cons:– No Caves
– No Overhangs
– No Cliffs
– Needs to be supplemented
![Page 5: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/5.jpg)
Object Substitution
Pros:– Simple to
implement
– Height-Map Based
– Fast To Render
– No shape limitations
– Good on CPU
– Good on Memory
Cons:– Needs models for all
objects
– Terrain modification creates extra problems
![Page 6: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/6.jpg)
Multiple Height Maps
Pros:– Good on Memory
– Height-Map based
– Removes some shape limitations
Cons:– Hard to implement
– Still some shape restrictions exist
– Slower then Height Maps
– Real-time terrain alteration very hard to implement.
![Page 7: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/7.jpg)
Procedural Generation
Pros:– Very fast with GPU
– Very efficient with memory
– No shape restrictions
Cons:– Usually data is
stored as a “seed”
– Easy alteration
– Requires newer GPU with Geometry Shaders
![Page 8: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/8.jpg)
Volumetric/Voxel Terrain
Pros:– No shape
restrictions
– Very easy LOD
– Very easy real-time terrain changes
– Combination of Height-Maps and Procedural Generation
Cons:– Very Large Memory
requirements
– Hard to implement
![Page 9: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/9.jpg)
Crafter Engine(on CPU)
● Collision Detection● Basic Gravity● Infinite Terrain● Block Picker tool● Simple Light system
![Page 10: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/10.jpg)
Crafter Engine:Structure
Data Generation– Generate Voxel type information (Rock,Sand etc.)
● Height-Map● Perlin Noise
– Compute Occlusion of Voxels
– Compute Light partial information
![Page 11: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/11.jpg)
Crafter Engine:Structure
Data Processing– Encoding Voxel's data
– Decoding Voxel's data
– Data Streaming
– Saving Data to HDD
– Collision Detection
– Ray Casting for Block Picker
![Page 12: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/12.jpg)
Crafter EngineStructure
Render– Very simple Tessellation
– Light information computations
– Double Buffering
– Viewing frustum culling
![Page 13: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/13.jpg)
Results
● 16x16 Chunk Area in memory
● 16x16x128 Blocks in Chunk
● 8,388,608 Total blocks with real-time operations.
● Rough estimate for Memory: 1.75GB without optimizations
![Page 14: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/14.jpg)
Results
● All core utilization during heavy load( Terrain Generation)
![Page 15: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/15.jpg)
● 400MB RAM usage by TestGame with Crafter Engine
![Page 16: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/16.jpg)
Research References
● [1] Computer Graphics Lab at the Alexandra Institute. Ray marching smoke. http://cg.alexandra.dk/tag/ray-marching/
● [2] Florian Boesch. Minecraft like rendering experiments in opengl 4. http://codeflow.org/entries/2010/nov/07/opengl-4-tessellation/ ,November 2010.
● [3] Morgan McGuire. Ambient occlusion volumes. Technical Report CSTR200901, Williamstown, MA, USA, December 2009.
● [4] Jacob Olsen. Realtime procedural terrain generation. Technical report, University of Southern Denmark.
● [5] Game Programming Patterns. Unknown author. Http://gameprogrammingpatterns.com/double-buffer.html .
● [6] Ken Perlin. Making noise. http://www.noisemachine.com/talk1/ .
● [7] Markus ’Notch’ Persson. The word of notch. http://notch.tumblr.com/ .
● [8] Paul Rademacher. Ray tracing: Graphics for the masses. http://www.cs.unc.edu/~rademach/xroadsRT/RTarticle.html .
● [9] James Sharman. The marching cubes algorithm.
● [10] RB Whitaker. Rb Whitaker’s wiki, a game development launchpad. http://rbwhitaker.wikidot.com/.
![Page 17: Real-Time Volumetric Terrain Rendering and Data …...– Real-time terrain alteration very hard to implement. Procedural Generation Pros: – Very fast with GPU – Very efficient](https://reader030.vdocuments.net/reader030/viewer/2022040610/5ed3680b300b76579d56bf7e/html5/thumbnails/17.jpg)
Questions?