Professional Documents
Culture Documents
2. Interactive Demo
5. Results
2
INTRODUCING
NVIDIA® GVDB AT SIGGRAPH 2016
NVIDIA® GVDB
Wednesday, 2:30pm
at NVIDIA Booth theater
3
Goals
4
Motion Pictures
Increasing detail and complexity..
8
Representing Large Volumes
Dense Volumes
16 x 16 =
9
Representing Large Volumes
Dense Volumes
16 x 16 =
10
Representing Large Volumes
Dense Volumes
8 empty steps
5 active steps
11
Representing Large Volumes
Sparse Volumes
52 data values
(instead of 256!)
5 sample steps
12
Representing Large Volumes
Topology
Value
Atlas
13
Methods for Sparse Volumes
Meshes & Point Clouds Volumetric Data
Isosurfaces
Hadwiger, 2005 complex shaders
Knoll, 2009 multi-res surfaces
14
OpenVDB
Hierarchy of Grids
Ken Museth, VDB: High-resolution sparse volumes with dynamic topology, Transactions on Graphics, 2013
15
Voxel Database Structure
Hierarchy of Grids
16
Voxel Database Structure
Hierarchy of Grids
5
=323 VDB Configuration.
VDB:
Hierarchy of voxel grids,
where active children are enabled using
a bitmask for pointer indirection.
Inactive nodes and bricks
are not stored.
18
19
NVIDIA® GVDB SPARSE VOLUMES
22
Compute Operations
Ideal GPU Kernels
23
Compute Operations
What to compute..
24
Compute Operations
How OpenVDB works
parent node
smart
iterators OpenVDB stores voxels
in “value” blocks on CPU.
25
Compute Operations
Voxel workloads
Overall..
26
Compute Operations
Atlas-based Kernels
wrong value Texture Atlas 3D Spatial Layout
Y-Axis
X-Axis 29
NVIDIA® GVDB
Compute Operations
Efficient compute on
very large domains.
30
NVIDIA® GVDB
Compute API
Smoothing Example:
extern "C" __global__ void kernelSmooth ( int res, float amt )
{
GVDB_SHARED_COPY Macro ensures neighbors are available in shared memory
32
Using NVIDIA® GVDB for raytracing
33
NVIDIA® GVDB RAYTRACING
Example Host code: Host API
gvdb.SetCudaDevice ( devid );
gvdb.Initialize ();
34
NVIDIA® GVDB RAYTRACING
Kernel API
#include "cuda_gvdb.cuh“
..
__global__ void raycast_kernel ( uchar4* outBuf )
{
int x = blockIdx.x * blockDim.x + threadIdx.x;
Get the current pixel int y = blockIdx.y * blockDim.y + threadIdx.y;
if ( x >= scn.width || y >= scn.height ) return;
Ask GVDB to trace the ray,
rayMarch ( gvdb.top_lev, 0, scn.campos,
returning hit point and normal rdir, hit, norm ); // Trace ray into GVDB
if ( hit.x != NOHIT ) {
float3 R= normalize ( reflect3 ( eyedir, norm ) );
Custom shading
float clr = tex3D ( envmap, R.xy );
} else {
clr = make_float3 ( 0.0, 0.0, 0.1 );
Write color to pixel output }
outBuf [ y*scn.width + x ] = make_uchar4(
clr.x*255, clr.y*255, clr.z*255, 255 );
}
35
NVIDIA® GVDB
API Features:
37
NVIDIA® GVDB
44
45
NVIDIA® GVDB SPARSE VOLUMES
Availability
Based on CUDA
— Dr. Ken Museth, Lead Developer of OpenVDB (DreamWorks Animation & SpaceX)
47
NVIDIA® GVDB SPARSE VOLUMES
Resources
Web Page:
http://developer.nvidia.com/gvdb
48
NVIDIA® GVDB SPARSE VOLUMES
Rama Hoetzlein, rhoetzlein@nvidia.com
Thank you!
http:/developer.nvidia.com/gvdb
Thanks to:
Ken Museth Dreamworks Animation & SpaceX
49