Post on 12-Jun-2015
description
Practical Volume rendering for realtime applications
Stoyan Nikolov
VIDEO
Who am I
Stoyan Nikolovstoyan@coherent-labs.com@stoyannk
Co-Founder & Tech lead @ Coherent Labs
Senior Graphics dev @ Masthead Studios
Senior dev @ Eutelia
Why use Volume rendering at all?
What is Volume rendering?
Types of Volume rendering techniques
Practical (today) rendering techniques
Overview
Why Volume rendering
• Allows us to see „inside“ an object
• Medical imaging
• Industry
• Biology
Why Volume rendering - Games
Freedom of form
Why Volume rendering - Games
Destructability
EverQuest Next by Sony Online Entertainment
Why Volume rendering - Games
Procedural generation
Volume rendering - Input
Usually discrete volume elements — voxels
Direct rendering in RT
• Ray-marching distance fields• Gigavoxel• Sparse voxel octrees (SVO)• SVO for Global Illumination
slisesix demo by rgba
Unreal Engine 4 by Epic Games
• Create a polygon mesh• GPUs are designed for polygons• Other subsystems usually expect polygons
Indirect rendering for RT
Basic algorithms
Marching cubes / tetrahedra / MC 33
Realtime requirements
• We want to support very large meshes
• Level of Detail (LOD) required
• Difficult with MC
• Transvoxel designed to solve this
Transvoxel
• Outline in Eric Lengyel’s PhD thesis
• Designed for RT applications
• Originally implemented in C4 Engine
Transvoxel overview
• Based on MC
• Extend equivalence classes
Basic Algorithm
• Subdivide grid in blocks (once)• Polygonize blocks (once)• Decide blocks to draw and LOD (per-frame)• Draw relevant blocks (per-frame)
The LOD solution
• Introduce “transition cells” between levels• Restricted octree for rendering• Identify neighbors and draw correct transitions
Transition cells
Important detail
Surface shifting
Texturing
• Per-voxel material Id → Texture Ids• Triplanar projection• Two sets of textures are blended for better transitions
Parallelism
• Embarrassingly parallel
• Relatively easy for GPGPU
• Parts can be re-computed independently
DEMO
Dual contouring
• Solves the sharp edges• Works on hermite data sets
VoxelFarm engine by Voxel Farm Inc.
Comparison
• MC-based algorithms
faster
require less memory
• Dual algorithms support more geometries
Potential headaches
• Memory consumption
• Correct implementations sometimes tricky
• Texturing
THANK YOU
stoyannk@gmail.com@stoyannkstoyannk.wordpress.com