PPT,3M - State Key Lab of CAD&CG, Zhejiang University

yellvillepotatocreekΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 3 χρόνια και 9 μήνες)

64 εμφανίσεις

C
ONSERVATIVE
V
OXELIZATION


Long Zhang
1
, Wei Chen
1
, David
Ebert
2
, Qunsheng Peng
1

1
State Key Lab of CAD&CG, Zhejiang
University, Hangzhou, China

2

School of Electrical and Computer
Engineering, Purdue University

CGI 2007


Conservative
Voxelization

2

/ 24

Contents

Introduction & Previous Work

The Main Idea

Algorithm & Implementation

Experimental Results

Conclusions & Future Work

Contents

Introduction & Previous Work

The Main Idea

Algorithm & Implementation

Experimental Results

Conclusions & Future Work

3

/ 24

CGI 2007


Conservative
Voxelization

Voxelization


Rasterization


2D scan
-
conversion







Voxelization


3D scan
-
conversion


rasterization

voxelization

Geometry primitive

pixels

Surface model

voxels

4

/ 24

CGI 2007


Conservative
Voxelization

Applications


Voxel
-
ization

3D spatial
analysis

volumetric
modelling

virtual

medicine

collision
detection

physically
-
based

simulation

haptic
rendering

5

/ 24

CGI 2007


Conservative
Voxelization

Hardware
-
accelerated Voxelization

The basic idea

Use the rasterization
functionality (2D
scan
-
conversion) of
graphics hardware to
accelerate voxel
-
ization (3D scan
-
conversion)


Major advantage

Efficient

6

/ 24

CGI 2007


Conservative
Voxelization

What’s Conservative?


standard
rasterization

conservative
rasterization

7

/ 24

CGI 2007


Conservative
Voxelization

Why Is It Important?


Example: collision detection with

standard rasterization

conservative rasterization

no collision

4 colliding pixels
detected

8

/ 24

CGI 2007


Conservative
Voxelization

Contents

Introduction & Previous Work

The Main Idea

Algorithm & Implementation

Experimental Results

Conclusions & Future Work

9

/ 24

CGI 2007


Conservative
Voxelization


Illustration in 2D

The Main Idea

The viewing volume

A triangle to
be voxelized

The viewing plane

Orthogonal projection

rasterization

pixels

Previous approaches



Use the depth value of the
pixel center



Generate a single voxel for
each pixel

Conservative voxelization

The resulting
voxels



Compute the
depth range
in
each pixel



Generate multiple voxels for
each pixel

10

/ 24

CGI 2007


Conservative
Voxelization

Contents

Introduction & Previous Work

The Main Idea

Algorithm & Implementation

Experimental Results

Conclusions & Future Work

11

/ 24

CGI 2007


Conservative
Voxelization

Computing the Depth Range

Full covered pixels

Partially covered pixels



Compute the pixel/triangle
intersection



Compute the depth range
in the intersection region

12

/ 24

CGI 2007


Conservative
Voxelization


A convex polygon


The minimal/maximal depth value lies on one of its
vertices







The idea


Compute the depth values at all vertices


Compare the depth values to get the depth range



The Pixel/Triangle Intersection



Compute

the intersection
of two
edges of the triangle and the pixel



The depth value can be easily
calculated;



Is the condition satisfied?



The depth value is known;



Is the condition satisfied? (easy
to know)

13

/ 24

CGI 2007


Conservative
Voxelization


Compute the minimal depth for each pixel












Compute the maximal depth in the same way

The Algorithm

Text

Text

Text

Text

If is
inside the
triangle

Let be the vertex of the


pixel with the minimal depth value

Yes

No

Compute the barycentric coordinate

None of the pixel vertices
has the minimal depth



Compute the intersection
points of triangle/pixel edges



Test if any triangle vertices
are in the pixel

=

The computation is fast

The computation is slow

14

/ 24

CGI 2007


Conservative
Voxelization


Handling special cases










The result is conservative

Robustness Issues


Degenerate
edges


Replace
Q
R
with

P
j


Intersection of
nearly parallel
lines


Replace
Q
T

with
Q
R



Degenerate
triangles


Replace
v
1

with

Q’
L


15

/ 24

CGI 2007


Conservative
Voxelization

Contents

Introduction & Previous Work

The Main Idea

Algorithm & Implementation

Experimental Results

Conclusions & Future Work

16

/ 24

CGI 2007


Conservative
Voxelization

Accuracy Analysis





Theoretically


Accuracy
:



A voxel is generated if
and only if it intersects
with the input model


Conservative

Voxelization

In practice


Slightly over
-
conservative
:



All voxels intersecting
the input model are
generated



A few voxels not
intersecting the input
model are also generated


17

/ 24

CGI 2007


Conservative
Voxelization

Timing Statistics

voxelization timings in
ms.

Performance comparison between Dong’s and our method



Efficient for high
resolution voxlization



Not very efficient for
large model size


Analysis




the major cost lies
in computing the depth
range for each pixel




the cost is much
lower for inner pixels
than for boundary
pixels




most of the pixels
are inner pixels when
the resolution is high



18

/ 24

CGI 2007


Conservative
Voxelization


Basic idea


Voxelize two models with a common bounding box


Compare the resulting volumes


Evaluation


Accuracy


High resolution supported


Classfication


colliding voxels

represent potentially colliding reg
-

ions, and noncolliding voxels rep
-

resent non
-
colliding regions


Efficiency


Computation completely in GPU


Need to traverse each

model once


Support deforming models



Application to Collision Detection

Collision detection between the buddha
model and a morphing hand model.
The collision detection is accomplished
in approximately 114
ms.

19

/ 24

CGI 2007


Conservative
Voxelization

Demo


20

/ 24

CGI 2007


Conservative
Voxelization

Contents

Introduction & Previous Work

The Main Idea

Algorithm & Implementation

Experimental Results

Conclusions & Future Work

21

/ 24

CGI 2007


Conservative
Voxelization

Conclusions


Technical contributions

1

The idea

We propose the idea
of conservative vox
-
lization.

2

Algorithm



Fully implemented
in the GPU



Conservative



Efficient



Low memory cons
-
umption



Suitable for def
-
ormable models

3

Application

We demonstrate the
application of our
algorithm in collision
detection of complex
models.

22

/ 24

CGI 2007


Conservative
Voxelization

Future Work


More efficient algorithm


Using lookup tables


Need new functionalities of graphics hardware



More applications



Solid voxelization

23

/ 24

CGI 2007


Conservative
Voxelization

lzhang@cad.zju.edu.cn