practical volume rendering for realtime applications

27

Upload: stoyan-nikolov

Post on 12-Jun-2015

973 views

Category:

Technology


0 download

DESCRIPTION

Slides for a talk I gave in October 2013 at Chaos Group's CG2 seminar in Sofia. Brief information about the state of Volume rendering for games and details about the TransVoxel algorithm by Eric Lengyel.

TRANSCRIPT

Page 1: Practical Volume Rendering for realtime applications
Page 2: Practical Volume Rendering for realtime applications

Practical Volume rendering for realtime applications

Stoyan Nikolov

Page 3: Practical Volume Rendering for realtime applications

VIDEO

Page 4: Practical Volume Rendering for realtime applications

Who am I

Stoyan [email protected]@stoyannk

Co-Founder & Tech lead @ Coherent Labs

Senior Graphics dev @ Masthead Studios

Senior dev @ Eutelia

Page 5: Practical Volume Rendering for realtime applications

Why use Volume rendering at all?

What is Volume rendering?

Types of Volume rendering techniques

Practical (today) rendering techniques

Overview

Page 6: Practical Volume Rendering for realtime applications

Why Volume rendering

• Allows us to see „inside“ an object

• Medical imaging

• Industry

• Biology

Page 7: Practical Volume Rendering for realtime applications

Why Volume rendering - Games

Freedom of form

Page 8: Practical Volume Rendering for realtime applications

Why Volume rendering - Games

Destructability

EverQuest Next by Sony Online Entertainment

Page 9: Practical Volume Rendering for realtime applications

Why Volume rendering - Games

Procedural generation

Page 10: Practical Volume Rendering for realtime applications

Volume rendering - Input

Usually discrete volume elements — voxels

Page 11: Practical Volume Rendering for realtime applications

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

Page 12: Practical Volume Rendering for realtime applications

• Create a polygon mesh• GPUs are designed for polygons• Other subsystems usually expect polygons

Indirect rendering for RT

Page 13: Practical Volume Rendering for realtime applications

Basic algorithms

Marching cubes / tetrahedra / MC 33

Page 14: Practical Volume Rendering for realtime applications

Realtime requirements

• We want to support very large meshes

• Level of Detail (LOD) required

• Difficult with MC

• Transvoxel designed to solve this

Page 15: Practical Volume Rendering for realtime applications

Transvoxel

• Outline in Eric Lengyel’s PhD thesis

• Designed for RT applications

• Originally implemented in C4 Engine

Page 16: Practical Volume Rendering for realtime applications

Transvoxel overview

• Based on MC

• Extend equivalence classes

Page 17: Practical Volume Rendering for realtime applications

Basic Algorithm

• Subdivide grid in blocks (once)• Polygonize blocks (once)• Decide blocks to draw and LOD (per-frame)• Draw relevant blocks (per-frame)

Page 18: Practical Volume Rendering for realtime applications

The LOD solution

• Introduce “transition cells” between levels• Restricted octree for rendering• Identify neighbors and draw correct transitions

Page 19: Practical Volume Rendering for realtime applications

Transition cells

Page 20: Practical Volume Rendering for realtime applications

Important detail

Surface shifting

Page 21: Practical Volume Rendering for realtime applications

Texturing

• Per-voxel material Id → Texture Ids• Triplanar projection• Two sets of textures are blended for better transitions

Page 22: Practical Volume Rendering for realtime applications

Parallelism

• Embarrassingly parallel

• Relatively easy for GPGPU

• Parts can be re-computed independently

Page 23: Practical Volume Rendering for realtime applications

DEMO

Page 24: Practical Volume Rendering for realtime applications

Dual contouring

• Solves the sharp edges• Works on hermite data sets

VoxelFarm engine by Voxel Farm Inc.

Page 25: Practical Volume Rendering for realtime applications

Comparison

• MC-based algorithms

faster

require less memory

• Dual algorithms support more geometries

Page 26: Practical Volume Rendering for realtime applications

Potential headaches

• Memory consumption

• Correct implementations sometimes tricky

• Texturing

Page 27: Practical Volume Rendering for realtime applications

THANK YOU

[email protected]@stoyannkstoyannk.wordpress.com