Real-time Voxelization for Complex Models
Zhao Dong, Wei Chen, Hujun Bao, Hongxin Zhang, Qunsheng Peng
State Key Lab of CAD&CG
Zhejiang University, P.R.China
State Key Lab of CAD&CG, Zhejiang University
Outline
Introduction
Voxelization
CSM
VM
Introduction
Introduction
Introduction
69,451 triangles
1,132,830 triangles
28,055,742 triangles
Performance has become the main challenge, we focus on it!
Introduction
Convexity
requirement
Introduction
Original Model
Render Model
Set Clipping Plane
Get ith Slice
Write to ith 3D texture
Z-plane(i+1)
Z-plane(i)
If i < N
(N=Z-resolution)
else
Final Volume dataset
Introduction
Introduction
New Voxelization Algorithm
GPU work
CPU work
Original Model
Z-oriented
Y-oriented
X-oriented
Sorting geometry by surface normal
Slab
voxelization
Texture
encoding
Final Volume Dataset
Slab
voxelization
Texture
encoding
Slab
voxelization
Texture
encoding
Illustration of new voxelization algorithm stages
Composite three intermediate textures
New Voxelization Algorithm
Projection plane
Volume information will be lost
So we need sort geometry according to
surface orientation
New Voxelization Algorithm
record a slab
512x512x512 = 512x512x32x16
GPU support 4 Render targets simultaneously☺
So we need render models only 4 times
New Voxelization Algorithm
Clipping Plane i
Clipping Plane i+1
Slab3
Slab2
Slab1
Slab0
3
2
1
0
7
6
5
4
11
10
9
8
15
14
13
12
2048x2048 intermediate texture
‘0’ represents Z-nearest
‘15’ represents Z-furthest
Slab4
Slab5
Slab6
Slab7
Slab11
Slab10
Slab9
Slab8
Slab15
Slab14
Slab13
Slab12
Clipping Plane i
Clipping Plane i+1
Clipping Plane i
Clipping Plane i+1
Clipping Plane i
Clipping Plane i+1
New Voxelization Algorithm
Slab voxelization
Texture encoding
New Voxelization Algorithm
O
x
y
z
O
z
x
y
(All are left-hand coordinates)
(x1,y1,z1)
(x3,y3,z3)
x1 = z3
y1 = x3
z1 = y3
O
y
z
x
3D coordinates
for Y-oriented patches
(x2,y2,z2)
y2 = x1
z2 = y1
x2 = z1
We integrate the voxelization results of Y-oriented and X-oriented
patches into that of Z-oriented patches
3D coordinates
for Z-oriented patches
3D coordinates
for X-oriented patches
New Voxelization Algorithm
Y-oriented patches
X-oriented patches
Coordinates
Transform
Patches1 in
z-oriented space
Patches2 in
z-oriented space
Original z-oriented
patches
Patches0 in
z-oriented space
Hardware Implementation
Efficient bit operation in pixel shader
Hardware Implementation
Applications of Algorithm
Implicit Surface:
volume resolution is 1283
Applications of Algorithm
Interactive hybrid volume rendering
Applications of Algorithm
Applications of Algorithm
Surface Voxelization
Solid Voxelization
Results
Dragon
871,326 Triangles
439,370 Vertices
Resolution 2563
Voxelization 57ms
Buddha
1,087,514 Triangles
550,868 Vertices
Resolution 2563
Voxelization 64.8ms
Blade
1,765,388 Triangles
898,796 Vertices
Resolution 2563
Voxelization 95ms
Results
Model | #Triangles | #Vertices | Slab Voxelization | Texture encoding | Composition | Total Time |
Buck | 1,254 | 947 | 9.0ms | 8.0ms | 10ms | 27ms |
Bugo | 16,928 | 8,634 | 9.7ms | 8.3ms | 10ms | 28ms |
Bunny | 69,451 | 34,834 | 12.0ms | 8.0ms | 11ms | 31ms |
Dragon | 871,326 | 439,370 | 38.0ms | 8.0ms | 11ms | 57ms |
Buddha | 1,087,514 | 550,868 | 47.0ms | 7.8ms | 10ms | 64.8ms |
Blade | 1,765,388 | 898,796 | 75.0ms | 8.0ms | 12ms | 95ms |
Table 1. Voxelization timings for different model sizes.
Volume resolution: 2563, bit-depth: 8.
Results
Results
65ms
5,263ms
550,868
1,087,514
Buddha
57ms
3,751ms
439,370
871,326
Dragon
31ms
336ms
34,843
69,451
Bunny
30ms
320ms
30,215
60,246
Wagner
Our Method
Slice-based Method
#Vertices
#Triangles
Model
Table 3. Comparisons between Slice-based method
and our method
Results
Bunny
Wagner
Dragon
Buddha
Future work
Questions and Answers