Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ......

71
Advanced 3D-Data Structures Eduard Gröller, Martin Haidacher Institute of Computer Graphics and Algorithms Vienna University of Technology

Transcript of Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ......

Page 1: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Advanced 3D-Data Structures

Eduard Gröller, Martin Haidacher

Institute of Computer Graphics and Algorithms

Vienna University of Technology

Page 2: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Motivation

For different data sources and applications different representations are necessaryExamples:

3D scanner: produces a set of spatial points which are not connected to each otherComputer game: Scenes and characters are usually represented as surface model consisting of many polygons

A data structure for a certain application should be able to fulfill the necessary requirements

2Gröller, Theußl, Haidacher

Page 3: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Properties

Representation of general objectsExact representation of objectsCombinations of objectsLinear transformationInteractionFast spatial searchesMemory consumptionFast rendering

3Gröller, Theußl, Haidacher

Page 4: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

3D-Data Structures: Overview

Point CloudWire-frame ModelBoundary RepresentationBinary Space Partitioning TreekD TreeOctreeConstructive Solid Geometry TreeBintreeGrid

4Gröller, Theußl, Haidacher

Page 5: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Point Cloud

Object = set (list) of pointse.g. from a digitizer or 3D scanner

Exact representationif >=1 points/pixel

More efficient than1 pixel sizedpolygons

Gröller, Theußl, Haidacher 5

Page 6: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Application Example (1/2)

3D model of Machu Picchu (http://www.cast.uark.edu/home/research/archaeology-and-historic-preservation/archaeological-geomatics/archaeological-laser-scanning/laser-scanning-at-machu-picchu.html)

6Gröller, Theußl, Haidacher

Page 7: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Application Example (2/2)

Team from TU Wien scanned Southern train station of Viennahttp://www.tuwien.ac.at/aktuelles/news_detail/article/6203/

7Gröller, Theußl, Haidacher

Page 8: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Operations with Point Clouds

TransformationsMultiply the points in the point list with linear transformation matrices

CombinationsObjects can be combined by appending the point lists to each other

RenderingProject and draw the points onto the image plane

8Gröller, Theußl, Haidacher

Page 9: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Properties of Point Clouds

AdvantagesFast renderingExact representation & rendering possibleFast transformations

DisadvantagesMany points (curved obj., exact representation)High memory consumptionLimited combination operations

9Gröller, Theußl, Haidacher

Page 10: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Surfels (SURface ELementS)

http://www.merl.com/publications/TR2000-10Movies: cab, wasp, salamander with holes, salamander corrected

10Gröller, Theußl, Haidacher

Page 11: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

QSplat (1/2) http://graphics.stanford.edu

/software/qsplat/ 3D scan of 2.7 meter statue

of St. Matthew at 0.25 mm 102.868.637 points Preprocessing time: 1 hour Demo on laptop (PII 366, 128

MB), no 3D graphics hardware

11Gröller, Theußl, Haidacher

Page 12: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

QSplat (2/2)

Interactive (8 frames/sec) High quality (8 sec)

12Gröller, Theußl, Haidacher

Page 13: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

3D-Data Structures: Overview

Point CloudWire-frame ModelBoundary RepresentationBinary Space Partitioning TreekD TreeOctreeConstructive Solid Geometry TreeBintreeGrid

13Gröller, Theußl, Haidacher

Page 14: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Wire-Frame Model

Object is simplified to 3D lines, each edge of the object is represented by a line in the model

14Gröller, Theußl, Haidacher

17 I

2

3

4

5

6

8 2A

BCD

EF G

HJ

KL x1

y1z1

x8y8z8

x5y5z5

x4y4z4

x3y3z3

x2y2z2

........

point list

LB........

edge listCA

1 2 3 4 5 8

AEdge list

Vertex list

Page 15: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Operations with Wire-Frame Model

TransformationsMultiply the points in the point list with linear transformation matrices

CombinationsObjects can be combined by appending the point and edge lists to each other

RenderingProjection of all points onto image plane and drawing of edges in between

15Gröller, Theußl, Haidacher

Page 16: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Properties of Wire-Frame Models

AdvantagesQuick renderingEasy and quick transformationsGeneration of models via digitization

DisadvantagesInexact (no surfaces, no occlusion)Restricted combination possibilitiesCurves are approximated by straight lines

16Gröller, Theußl, Haidacher

Page 17: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

3D-Data Structures: Overview

Point CloudWire-frame ModelBoundary RepresentationBinary Space Partitioning TreekD TreeOctreeConstructive Solid Geometry TreeBintreeGrid

17Gröller, Theußl, Haidacher

Page 18: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Boundary Representation (B-Rep)

V1

V2

V3 V4

V5E1

E2

E3E4

E5

E6

S1 S2

vertex list edge list face listV1: x1 y1 z1 E1: V1 V2 S1: E1 E2 E3V2: x2 y2 z2 E2: V2 V3 S2: E2 E4 E5 E6V3: x3 y3 z3 E3: V3 V1V4: x4 y4 z4 E4: V3 V4V5: x5 y5 z5 E5: V4 V5

E6: V5 V218Gröller, Theußl, Haidacher

Page 19: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Lists for B-Reps (1/4)Face list S1 S2

19Gröller, Theußl, Haidacher

Page 20: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Lists for B-Reps (2/4)Face list S1 S2

E1 E2 E3 E4 E5 E6

20Gröller, Theußl, Haidacher

Page 21: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Lists for B-Reps (3/4)Face list

x y z x y z x y z x y z x y zV1 V2 V3 V4 V5

S1 S2

21Gröller, Theußl, Haidacher

Page 22: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Lists for B-Reps (4/4)Face list

Edgelist

Vertexlist

x y z x y z x y z x y z x y zV1 V2 V3 V4 V5

S1 S2

22Gröller, Theußl, Haidacher

Page 23: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Winged Edge Data Structure

Alternative for normal hierarchical B-RepHere the central element is the edge:

Pend Pstartpred_cwsucc_cw

pred_ccw

face_cw

face_ccw

succ_ccw

edge

23Gröller, Theußl, Haidacher

PstartPend

face_cwface_ccwpred_cw

succ_ cwpred_ccwsucc_ccw

edge list

faces xyz1st edge

points

1st edge

Page 24: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Operations with B-Reps (1/2)

TransformationsAll points are transformed as with wire-frame model, additionally surface equations or normal vectors can be transformed

RenderingHidden surface or hidden line algorithms can be used because the surfaces of the objects are known, so that the visibility can be calculated

24Gröller, Theußl, Haidacher

Page 25: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Properties of B-Reps

AdvantagesGeneral representationGeneration of models via digitizationTransformations are easy and fast

DisadvantagesHigh memory requirementCombinations are relatively costlyCurved objects must be approximated

25Gröller, Theußl, Haidacher

Page 26: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Partitioning of Object Surfaces

Necessary to approximate curved surfacesSurfaces that can be parameterized:

E.g. free form surfaces, quadrics, superquadricspartitioning of parameter space, one patch for every 2D parameter interval

Surfaces that cannot be parameterized:E.g. implicit surfaces, "bent" polygons tesselation, subdivision surfaces

26Gröller, Theußl, Haidacher

Page 27: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Tesselation

Divide polygons in smaller polygons (triangles) until the approximation is exact enoughNormal vector criterion as termination condition:

Normal vectors of neighboring polygons are similar:

N12 1–

N1N2 Objekt

Approximation

27Gröller, Theußl, Haidacher

Page 28: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Operations with B-Reps (2/2)

Combinations1. Split the polygons of object A at the intersections with the polygons of object B2. Split the polygons of object B at ... of A3. Classify all polygons of A as "in B", "outside B" or "on the surface of B“4. Classify all polygons of B in the same way5. Remove the redundant polygons of A and B according to the operator and combine the remaining polygons of A and B

28Gröller, Theußl, Haidacher

Page 29: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Combinations of B-Reps (1/4)

Every polygon has a box enclosure simple test if polygons can intersectUse only convex polygons and produce only convex polygons as results simple intersection tests

A B A B A B

1: 2:

29Gröller, Theußl, Haidacher

Page 30: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Combinations of B-Reps (2/4)

A ray is traced in the direction of the normal vector of the polygon to be classified:

Ray hits no polygon of B "outside B"First polygon of B hit from front "outside B"First polygon of B hit from back "in B"

AB

AB

"outside B" "in B"

30Gröller, Theußl, Haidacher

Page 31: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Combinations of B-Reps (3/4)

Improvement: points of A, which lie on the surface of B, are marked as border points during the dividing process (and vice versa) only very few polygons have to be classified with the complex method

in B outside A

border point

border point

AB

31Gröller, Theußl, Haidacher

Page 32: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Combinations of B-Reps (4/4)

Polygons can be removed according to tables:

op.A or B

A and BA sub B

in B

yesnoyes

outside B

noyes no

NV equalnonoyes

differentyesyesno

on B (coplanar)For

polygonsof A

op.A or B

A and BA sub B

in A

yesnono

outside A

noyes yes

NV equalyesyesyes

differentyesyesyes

on A (coplanar)For

polygonsof B

32Gröller, Theußl, Haidacher

Page 33: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Requirements on B-Reps for this Alg.No open (non-closed) objectsOnly convex polygonsNo double pointsAdditional links in the vertex list between neighbor points with equal classification

........ xnynzn

x4y4z4

x5y5z5

x5y5z5

x3y3z3

x2y2z2

x1y1z1

vertex list

33Gröller, Theußl, Haidacher

Page 34: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

3D-Data Structures: Overview

Point CloudWire-frame ModelBoundary RepresentationBinary Space Partitioning TreekD TreeOctreeConstructive Solid Geometry TreeBintreeGrid

34Gröller, Theußl, Haidacher

Page 35: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Binary Space Partitioning Tree

Special B-Rep for quick rendering with visibilityEspecially of static scenes

35Gröller, Theußl, Haidacher

x1y1z1

xnynzn

x5y5z5

x4y4z4

x3y3z3

x2y2z2

........

point list

........

........

.... .... ....

........

.... .... .... ....

........

........

........

........

........ ........

........

............ ........

polygon nodes withsurface equation and normal vector polygon vertices

Page 36: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Binary Space Partitioning Tree

The base plane of the polygon in a node partitions space in two halves:

In front of and behind the polygonLeft subtree of the node: contains only polygons that are in front of the basis planeRight subtree of the node: contains only polygons that are behind the basis planePolygons that lie in both halves are divided by the base plane into two parts

36Gröller, Theußl, Haidacher

Page 37: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Generation of BSP Trees

Generate BSP Tree:1. Find the polygon who's plane intersects the fewest other polygons and cut these in two2. Divide the polygon list in two sets:in front of that plane / behind that plane3. The polygon found in 1. is the root of the BSP tree, the left and the right subtrees can be generated recursively (from two "halves")

37Gröller, Theußl, Haidacher

Page 38: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

More BSP Examples

12

34

5

6

3

4

1

2

5

6 or1

2

3

4

1a1b

2

3

4

1 1a

1b2

34

38Gröller, Theußl, Haidacher

Page 39: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

BSP Trees as Solids

Left empty trees represent outside spaceRight empty trees represent inside volumes

1

2

34 1

2

3

4

1a1b

2

3

4

inout in

out

out

out

out out

out

in in

in

out

BSP treeor

39Gröller, Theußl, Haidacher

Page 40: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Generation of BSP Trees

Convex objects:BSP tree is alinear list

40Gröller, Theußl, Haidacher

1

2

34

Object

BSP-TreePolygon 1Polygon 2

Polygon 3Polygon 4

Page 41: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Properties of BSP Trees

AdvantagesFast renderingFast transformationCombinations faster than for B-RepsGeneral representationGeneration of models via digitizationTree structure (fast search)

41Gröller, Theußl, Haidacher

Page 42: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Properties of BSP Trees

DisadvantagesCurved objects must be approximatedOnly convex polygonsHigh memory cost

42Gröller, Theußl, Haidacher

Page 43: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Operations with BSP Trees (1/2)

RenderingBSP trees are very good for fast renderingPainter´s Algorithm:

IF eye is in front of a (in A+)THEN BEGIN draw all polygons of A-;

draw a;draw all polygons of A+ END

ELSE BEGIN draw all polygons of A+;(draw a);draw all polygons of A- END;

43Gröller, Theußl, Haidacher

Page 44: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Operations with BSP Trees (2/2)

TransformationsPoints, plane equation and normal vector have to be transformed

CombinationsPerform combination with B-Rep, then generate BSP treeCombine BSP trees directly (faster)

44Gröller, Theußl, Haidacher

Page 45: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Combination of BSP Trees

The structure of one tree has to act as structure for the result one tree has to be included into the other

B

A

45Gröller, Theußl, Haidacher

Page 46: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

BSP Algorithm for A op B = C:

A or B homogeneous (full or empty) simple rulesElse:

1. Divide root polygon a of A at object B in ain, aout

2. Root node c of C: if op=”and" then c:=ainelse c:=aout (with its plane)3. Divide B at plane of a in Bin, Bout

4. Recursive evaluation of the subtrees: Cleft=Aout op Bout Cright=Ain op Bin

46Gröller, Theußl, Haidacher

Page 47: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Combination of BSP Trees:

aAb

cd

1B2

34

1inBin

3in

4

1outBout

23out

aoutC

Aout Bout

( = Bout )Ain Bin

Aout Ain

a aout

A1in

2

4

ain3out

Bout

Bin

bc

d

B1out

3in

47Gröller, Theußl, Haidacher

Page 48: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Simple BSP Node Combination Rules

opor

and

sub

Ainhom.inhom.

fullemptyinhom.inhom.

fullemptyinhom.inhom.

fullempty

Bfull

emptyinhom.inhom.

fullemptyinhom.inhom.

fullemptyinhom.inhom.

A op BfullA

fullBA

emptyB

emptyempty

A –B

empty48Gröller, Theußl, Haidacher

Page 49: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Combination of BSP Trees:

aAb

cd

1B2

34

1out

23out

aoutC

a aout

A1in

2

4

ain3out

Bout

Bin

bc

d

B1out

b

cdout

3in

4out3in

49Gröller, Theußl, Haidacher

Page 50: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Combination of BSP Trees:

aAb

cd

1B2

34

1inBin

3in

4

1outBout

23out

ainC

Aout Bout

( = {} )Ain Bin

Aout Ain

a aout

A1in

2

4

ain3out

Bout

Bin

bc

d

B1out

3in

50Gröller, Theußl, Haidacher

Page 51: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Combination of BSP Trees:

aAb

cd

1B2

34

1in

4in

ainC

a aout

A1in

2

4

ain3Bout

Bin

bc

d

B1out

(bin and cin are empty)

din

51Gröller, Theußl, Haidacher

Page 52: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

3D-Data Structures: Overview

Point CloudWire-frame ModelBoundary RepresentationBinary Space Partitioning TreekD TreeOctreeConstructive Solid Geometry TreeBintreeGrid

52Gröller, Theußl, Haidacher

Page 53: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

kD Tree

Special case of BSP Tree Only axes-aligned partitioning planes =>

specified by one value Partitioning direction specified either implicitly

(pre-defined order) or explicitly 1D Tree binary tree

53Gröller, Theußl, Haidacher

Page 54: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

kD Tree Example: 2-D Tree

54Gröller, Theußl, Haidacher

Page 55: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

3D-Data Structures: Overview

Point CloudWire-frame ModelBoundary RepresentationBinary Space Partitioning TreekD TreeOctreeConstructive Solid Geometry TreeBintreeGrid

55Gröller, Theußl, Haidacher

Page 56: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Octree

Used to represent solid volumetric objectsEach node is subdivided in 8 subspaces Each subspace is either empty, full or further dividedThe subdivision stops when an object can be represented accurate enough

Gröller, Theußl, Haidacher 56

Page 57: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Octree Example

Gröller, Theußl, Haidacher 57

Page 58: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Operations with Octrees

TransformationsHard to implement; easy: rotations of 90°

CombinationsCan easily be done by logical operations; both octrees must be adapted to each other to have the same depth in each subspace

RenderingThe octree is rendered depending on the view direction starting with the subspace farthest away from the viewer

Gröller, Theußl, Haidacher 58

Page 59: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Properties of Octrees

AdvantagesCombinations are easy to implementSpatial search is fast due to the tree structureRendering algortihm is fast

DisadvantagesHigh storage consumption for approximated objectsTransformations are not trivial in generalGeneral objects cannot be represented exactly

Gröller, Theußl, Haidacher 59

Page 60: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Extended Octrees

Additional node types:Face nodes: contain a surfaceEdge nodes: contain an edgeVertex nodes: contain a corner point

Vertex-Node

Face-Node

Edge-Node

60Gröller, Theußl, Haidacher

Page 61: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Generation of Extended Octrees

1. Generate B-Rep2. Divide point and surface list at the subdivision planes into 8 sets3. For each octant:

Point and surface lists empty full or emptyOnly one vertexvertex nodeOnly one surface face node Only two surfaces edge node Else: subdivide recursively

61Gröller, Theußl, Haidacher

Page 62: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Octree as Spatial Directory

Octree as search structure for objects in other representationsE.g. for B-Reps:

octree of low depth is sufficient

........

........

object list

face list

search octree

62Gröller, Theußl, Haidacher

Page 63: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

3D-Data Structures: Overview

Point CloudWire-frame ModelBoundary RepresentationBinary Space Partitioning TreekD TreeOctreeConstructive Solid Geometry TreeBintreeGrid

63Gröller, Theußl, Haidacher

Page 64: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Constructive Solid Geometry Tree

A Constructive Solid Geometry (CSG) Tree consists of simple primitives, transformations and logical operationsUseful to describe complex objects with a small number of primitivesExamples for primitives

CubeSphereCylinder

64Gröller, Theußl, Haidacher

Page 65: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

CSG Tree Example

65Gröller, Theußl, Haidacher

Page 66: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Operations with CSG Trees

TransformationsAn object is transformed by adding the transformation to the transformation of each primitive

CombinationsTwo objects are simple combined by adding them as children in a new tree

RenderingNeeds to be converted into a B-Rep or it is rendered with raytracing

66Gröller, Theußl, Haidacher

Page 67: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Properties of CSG Trees

AdvantagesMinimal storage consumptionCombinations and transformations are simpleObjects can be represented exactlyTree structure (fast search)

DisadvantagesCannot be rendered directly; slow renderingModel generation cannot be done through digitization of real objects

67Gröller, Theußl, Haidacher

Page 68: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

3D-Data Structures: Overview

Point CloudWire-frame ModelBoundary RepresentationBinary Space Partitioning TreekD TreeOctreeConstructive Solid Geometry TreeBintreeGrid

68Gröller, Theußl, Haidacher

Page 69: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Bintree

3D TreeSubdivision order xyzxyz... Choose separation plane for optimized (irregular) subdivisionFewer nodes than octree

69Gröller, Theußl, Haidacher

Page 70: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

3D-Data Structures: Overview

Point CloudWire-frame ModelBoundary RepresentationBinary Space Partitioning TreekD TreeOctreeConstructive Solid Geometry TreeBintreeGrid

70Gröller, Theußl, Haidacher

Page 71: Advanced 3D-Data Structures - Semantic Scholar...Objects can be combined by appending the ... Project and draw the points onto the image plane Gröller, Theußl, Haidacher 8. Properties

Grid

Regular subdivisionDirectly addresses cellsSimple neighborhood finding O(1)

E.g. for ray traversalProblem:

Too few/many cells Hierarchical grid

71Gröller, Theußl, Haidacher