Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www.sccg.sk/~zimanyi/lectures/PG Representation and modeling of 3D objects (basic concepts) FMFI UK Katedra počítačovej grafiky a spracovania obrazu Marek.

Similar presentations


Presentation on theme: "Www.sccg.sk/~zimanyi/lectures/PG Representation and modeling of 3D objects (basic concepts) FMFI UK Katedra počítačovej grafiky a spracovania obrazu Marek."— Presentation transcript:

1 www.sccg.sk/~zimanyi/lectures/PG Representation and modeling of 3D objects (basic concepts) FMFI UK Katedra počítačovej grafiky a spracovania obrazu Marek Zimányi Computer Graphics 2

2 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 2 Contents Polygonal representation Boundary rep. Sweep Constructive Solid Geometry Implicit representation F-rep Spatial subdivision techniques Procedural modeling

3 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 3 Polygonal representation Boundary representation (B-Rep) Topological description Specifies: vertices, edges, faces Geometrical description Specifies: equation of the surface Sweep

4 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 4 Boundary representation Polygon and Polygonal Mesh Polyhedron Normals Euler’s formula DCEL Polygonal representation

5 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 5 Boundary representation Describing of boundary points set faces,edges, vertices region, loop, shell, hole,handle vertices : V 1 = (x 1, y 1, z 1 ), V 2 = (x 2, y 2, z 2 ), … edges : h 1 = (1, 2), h 2 = (2, 3), … faces : P 1 = (1, 2, 3), P 2 = (4, 2, 1), … Polygonal representation

6 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 6 Boundary representation - Mesh Collection of faces (polygons) Advance: shading process Parameters: Vertices, faces, normals Vertex normals versus face normals ! This it not the same ! Polygonal representation

7 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 7 Boundary representation - Mesh Definition: Set of vertices, Normals Faces, With Indexes of vertices With Indexes of normals Be careful -> left or right hand CS

8 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 8 Boundary representation - Mesh Normal computing: Martin Newell method:

9 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 9 Boundary representation - Mesh Properties Solidity – enclose a positive and finite amount of space Connectedness – exist unbroken path between any two vertices Simplicity – solid with no holes Planarity – every face is a planar polygon Convexity – line between any two point lies inside the object

10 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 10 Boundary rep. - Polyhedron Def.: A polyhedron is a connected mesh of simple planar polygons that enclose a finite amount of space Polygonal representation Prop. Every edge is shared by exactly two faces At least 3 edges meets at each vertex Faces do not interpenetrate:

11 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 11 Manifolds 2-manifolds:  point from manifold has small neighborhood of points around, topologically the same as a disk in the plane Orientable NonOrientable manifold Mobius strip, Klein bottle Many b-rep systems support only solid whose boundaries are 2-manifold Polygonal representation - B-rep Unreal objects => Non-Manifolds

12 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 12 Manifolds Klein bottle http://www.math.ohio-state.edu/~fiedorow/math655/Klein2.html http://www.kleinbottle.com/ Mobius strip http://www.mobiusproductsandservices.com/tms.html http://www.cut-the-knot.org/do_you_know/moebius.shtml Another :-) http://pbskids.org/zoom/phenom/index.html Polygonal representation - B-rep

13 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 13 Non-Manifolds

14 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 14 The Winged-Edge Representation Double-connected Edge List (DCEL) For each edge is given info: 1. Incident vertices 2. Left and right adjacent face 3. Preceding and succeeding edge in clockwise order 4. Preceding and succeeding edge in counterclockwise order Polygonal representation - B-rep

15 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 15 B-Rep Important facts in the B-Rep: Classification of edges sharp and auxiliary Normals in vertexes Boundary of face – find all edges of a face Position of a point in the space Point is IN or OUT of object Polygonal representation Polygonal representation - B-rep

16 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 16 Sweep Sweeping an object along a trajectory Translation sweep Rotational sweep Conical sweep Sphere sweep General Cylinder Polygonal rep ? Polygonal representation

17 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 17 Translational Sweep Method: Define the object with the contour (2D) and the path. Polygonal representation

18 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 18 Rotational Sweep Method: Define the object by rotating of the contour (2D) with the arbitrary axis. Polygonal representation

19 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 19 Conical Sweep Method: Define the object by the contour (2D) and a 3D-point (top of the pyramide). Polygonal representation

20 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 20 Sphere Sweep Method: Define the object by the sphere with the varying radius and a path. Polygonal representation

21 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 21 General Cylinder Method: Define the object by the set of „control“-contours and by the path. Polygonal representation

22 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 22 Polygonal rep ? General sweeps – difficult to model efficiency General sweeps do not always generate solids It is a polygonal rep? Polygonal representation Yes and No. Trajectory and object shape – may swept object intersect  Volume calculations complicated Sweeping a 2D area in its own plane  another 2D area

23 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 23 Polygonal rep ? It is a difficult to apply regularized Boolean operations (after BOOL op. it wouldn’t be SWEEP obj) BUT sweeps are a natural and intuitive way to construct of the objects Many systems allow user construct sweeps BUT Polygonal representation store the objects in other representation

24 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 24 Constructive Solid Geometry CSG Composing of Primitives: Sphere, Cone, Cube, Cylinder,... Operations: , , -,... The leafs of CSG-tree are primitives and the operations are in the rest of the tree nodes. The CSG-tree represents the solid. (Scene graph idea!)

25 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 25 Example Polygonal representation - CSG

26 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 26

27 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 27 Notes Pros Low memory consumption Simple combining Exact representation of complex surfaces 12 Mantylas operators and his proof Cons Slow and difficult processing ? Not unique representation Polygonal representation - CSG

28 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 28 CSG processing Rendering Algorithms ray casting (tracing) extended depth buffer algorithm Evaluation/Conversion Algorithms boundary representation octree constructive cubes Polygonal representation - CSG

29 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 29 Implicit representation Jim Blinn 1982 Implicit surfaces Blobby objects Soft objects Meta balls

30 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 30 Spreadsheet Rendering Implicit representation

31 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 31 Animation Path in t 1 t 2 Plane Implicit representation

32 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 32 Spatial subdivision techniques Octrees Iterative space subdivision Nodes have property: V, F or M Subdividing P-nodes until the desired Approximation Quality The dividing planes do not depend on objects in the scene (differs from BSP tree!) Analogy in 2D: „Quad Tree“ BSP trees

33 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 33 Octree Sort form of space Disadvantage: sampling V – void F – full M – mixed (FFFFF(FFFVFVFV)VV) Spatial subdivision techniques

34 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 34 Octree Boolean set operations and transformations Traverse both trees top-down in parallel Rotations (*90  ), scaling (*2) General transformations – severe problem (aliasing) Neighbor finding Not trivial Linear notation Spatial subdivision techniques

35 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 35 Binary Space-Partitioning Trees (BSP trees) octrees divide space uniformly - drawback BSP divide space recursively into pairs of subspaces: each subspace has the same object complexity (# of objects) Usual division step: 1. sort the objects according to actual coordinate (x,y,z) 2. Choose median 3. Place halfplane (halfline in 2D) between median and next object 4. Shift halfline if too many objects intersects the halfplane Spatial subdivision techniques

36 Marek Zimányi, Department of Computer Graphics and Image Processing, FMPI, Comenius University, Bratislava Marek Zimányi, Andrej Ferko www.uniba.sk/~kpgso 36 Procedural modeling Alternative to slow user modeling Useful for complex, hard-to-manipulate, organic, fuzzy, scalable, large, … objects Software designer prepares a procedure, implementing object-production algorithm Software user specifies only the input parameters for the procedure Stochastic principle is often applied (no 2 trees are exactly identical)


Download ppt "Www.sccg.sk/~zimanyi/lectures/PG Representation and modeling of 3D objects (basic concepts) FMFI UK Katedra počítačovej grafiky a spracovania obrazu Marek."

Similar presentations


Ads by Google