Boolean Operations on SurfelBounded Solids Using Programmable Graphics Hardware - PowerPoint PPT Presentation

1 / 31
About This Presentation
Title:

Boolean Operations on SurfelBounded Solids Using Programmable Graphics Hardware

Description:

surfel takes classification of empty cell. write depth value z1. if surfel in boundary cell: ... at depth z with z1 z z2. Classify surfel using distance field ... – PowerPoint PPT presentation

Number of Views:37
Avg rating:3.0/5.0
Slides: 32
Provided by: graphicsre
Category:

less

Transcript and Presenter's Notes

Title: Boolean Operations on SurfelBounded Solids Using Programmable Graphics Hardware


1
Boolean Operations onSurfel-Bounded Solids Using
Programmable Graphics Hardware
  • Bart Adams Philip Dutré
  • Katholieke Universiteit Leuven

2
Goal CSG on the GPU
not rendering, but construction ? GPGPU
3
Related Work
  • Adams and Dutré 2003
  • points, 3-color octree
  • Pauly et al. 2003
  • points and MLS, kd-tree
  • Purcell et al. 2002
  • ray tracing on the GPU
  • Zwicker et al. 2004
  • splatting clipped surfels

4
Adams and Dutré 2003
  • Space partitioned using 3-color octree
  • Boundary cells partitioned using // planes

5
Adams and Dutré 2003
  • Classification of a surfel
  • test against 3-color octree
  • test against boundary planes
  • test against nearest surfel
  • NN query!

a
6
CPU? GPU Problems
  • Hierarchical algorithm
  • solution
  • use 3-color grid instead of octree
  • only test surfels individually
  • NN query for surfels close to the boundary
  • solution
  • avoid NN query
  • use local distance fields

7
Part 1 Inside-Outside Partitioning
8
Partitioning Idea
  • Partition space around solids
  • Construct 3-color grid
  • interior cells
  • exterior cells
  • boundary cells
  • Partition boundary cells
  • signed distance field

9
Partitioning Boundary Cells
  • Lay out cell corners in texture memory

10
Partitioning Boundary Cells
  • Lay out cell corners in texture memory

11
Partitioning Boundary Cells
  • Render each surfel as 3x3 glPoint with center
    corresponding to cell center

p10
p9
p11
p8
12
Partitioning Boundary Cells
  • Render each surfel as 3x3 glPoint with center
    corresponding to cell center

p10
p9
p11
p8
13
Partitioning Boundary Cells
  • Render each surfel as 3x3 glPoint with center
    corresponding to cell center

p10
p9
p11
p8
known as scatter easy in VP
14
Partitioning Boundary Cells
  • Fragment program computes signed distance between
    surfel and cell corner

p6
p10
p5
p9
ps
p7
p11
dist p4 ps sign (p4
ps)nsgt0?1-1 color dist sign depth
dist/diag
p4
p8
Set glDepthFunc to GL_LEQUAL
15
Classifying Empty Cells
  • Construct 3-color grid using distance values from
    boundary cell corners
  • render textured quad
  • each pixel corresponds
  • to a cell

16
Classifying Empty Cells
  • First pass cells on the left from boundary cell
    are classified
  • inside if ?di lt 0
  • outside if ?di gt 0
  • Easy in FP
  • 4 texture fetches

17
Classifying Empty Cells
  • Next passes cells on the left from a classified
    empty cell are classified
  • Easy in FP
  • 1 texture fetch

18
Classifying Empty Cells
  • Next passes cells on the left from a classified
    empty cell are classified
  • Easy in FP
  • 1 texture fetch
  • Iterate further

19
Classifying Empty Cells
  • Next passes cells on the left from a classified
    empty cell are classified
  • Easy in FP
  • 1 texture fetch
  • Iterate further

20
Classifying Empty Cells
  • Next passes cells on the left from a classified
    empty cell are classified
  • Easy in FP
  • 1 texture fetch
  • Iterate further

21
Classifying Empty Cells
  • Next passes cells on the left from a classified
    empty cell are classified
  • Easy in FP
  • 1 texture fetch
  • Iterate further

22
Classifying Empty Cells
  • All non-classified cells are outside (assumption
    closed solid)

23
Part 2 Inside-Outside Classification
24
Classification Idea
  • Test surfels against partitioning of other solid
  • test against 3-color grid
  • test against distance field
  • ( compute clipping plane)

25
Implementation First Pass
  • Enable depth write
  • Render quad textured with surfel positions
  • Test each surfel against 3-color grid
  • if surfel in empty cell
  • surfel takes classification of empty cell
  • write depth value z1
  • if surfel in boundary cell
  • write depth value z2 with z1 lt z2

26
Implementation Second Pass
  • Disable depth write
  • Set glDepthFunc to GL_LEQUAL
  • Render quad textured with surfel positions
  • at depth z with z1 lt z lt z2
  • Classify surfel using distance field
  • 8 texture fetches, tri-linear reconstruction
  • Only unclassified surfels pass
  • fragments with z z2
  • Early z culling!

27
Clipping Plane
  • Surfels close to other surface
  • clipped
  • resampled
  • Clipping plane defined by
  • distance field value
  • distance field gradient

28
Timings partitioning
  • Distance field creation step ( surfels)
  • 3-color grid creation step ( grid size)

29
Timings CPU ? GPU
5
10
30
Dragon - dragon
Each dragon surfels 650k grid
size 363 partitioning 700ms classification 12
2ms
31
Discussion
  • Limitations
  • space wasted in distance field texture
  • not adaptive (? ADFs)
  • no hierarchy each surfel classified individually
  • accuracy dependent on grid resolution
  • Advantages
  • 5 to 10 times faster
Write a Comment
User Comments (0)
About PowerShow.com