Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Object Modeling Recap
Computer GraphicsLecture 6
Dr. Marc Eduard Fr̂ıncuWest University of Timisoara
April 7, 2020
1 / 24
Object Modeling Recap
Outline
1 Object ModelingProcedural ModelingSolid Modeling
2 Recap
2 / 24
Object Modeling Recap
Object Modeling
Why & how
need a method of representing/manipulating 3D objects in a computer (3D →2D image via projections)
surface (frontiers) & solid modeling (union of elementary volumes)
construction:interactive modeling tools (e.g., CAD programs. . . )scanning tools (e.g., CAT, MRI, . . . )computer vision (e.g., stereo, vision)procedural generation (e.g., sweeps, fractals, grammars)
How much information is needed?lines & curves not always enough for reconstruction → ambiguous, extra informationnot necessarily useful
3 / 24
Object Modeling Recap
Object Modeling
Why & how
need a method of representing/manipulating 3D objects in a computer (3D →2D image via projections)
surface (frontiers) & solid modeling (union of elementary volumes)
construction:interactive modeling tools (e.g., CAD programs. . . )scanning tools (e.g., CAT, MRI, . . . )computer vision (e.g., stereo, vision)procedural generation (e.g., sweeps, fractals, grammars)
How much information is needed?
lines & curves not always enough for reconstruction → ambiguous, extra informationnot necessarily useful
3 / 24
Object Modeling Recap
Object Modeling
Why & how
need a method of representing/manipulating 3D objects in a computer (3D →2D image via projections)
surface (frontiers) & solid modeling (union of elementary volumes)
construction:interactive modeling tools (e.g., CAD programs. . . )scanning tools (e.g., CAT, MRI, . . . )computer vision (e.g., stereo, vision)procedural generation (e.g., sweeps, fractals, grammars)
How much information is needed?lines & curves not always enough for reconstruction → ambiguous, extra informationnot necessarily useful
3 / 24
Object Modeling Recap
Object Modeling
4 / 24
Object Modeling Recap
Procedural Modeling
Procedural Modeling
Procedural modeling
– describe 3D models algorithmically
repeated models
self-similar processes
random processes
advantages:automatic generationconcise representationparameterized classes of models
5 / 24
Object Modeling Recap
Procedural Modeling
Procedural Modeling
Sweeps
Example: shell generation
θi+1 = ti + ∆t = θi + ∆θ(arithmetic progression)
ri+1 = r0ξtir ξ
∆tr = riλr (geometric
progression)
zi+1 = z0ξtiz ξ
∆tz = ziλz
(geometric progression)
6 / 24
Object Modeling Recap
Procedural Modeling
Procedural Modeling
Fractals
deterministic: parts are scaledcopies of original
nice shapes
statistical: parts have samestatistical properties as original
3D terrains3D plants
Figure: Deterministic fractalhttp://www.cs.princeton.edu/courses/archive/spr03/cs426/#Coursework
Figure: Statistical fractalhttp://www.cs.princeton.edu/courses/archive/spr03/cs426/#Coursework
7 / 24
Object Modeling Recap
Procedural Modeling
Procedural Modeling
Grammars
– useful for generating plantsExample: tree generation
Tree → Branch Tree | LeafBranch→ Cylinder | [Tree]
Figure: Tree generationhttp://www.cs.princeton.edu/courses/archive/spr03/cs426/#Coursework
8 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Representation rules
1 the representation field should be large enough
2 the representation should be non-ambiguous and accurate
3 no invalid representations should be allowed
4 valid representations should always be easy to create
5 efficient boolean operations: union, intersection, difference
6 closeness (invariant) to an affine transformation
7 compact (memory efficient) representation
8 fast algorithms for computing the physical properties of the representation
∃ representation following ALL rules above?NO ⇒ compromise
9 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Representation rules
1 the representation field should be large enough
2 the representation should be non-ambiguous and accurate
3 no invalid representations should be allowed
4 valid representations should always be easy to create
5 efficient boolean operations: union, intersection, difference
6 closeness (invariant) to an affine transformation
7 compact (memory efficient) representation
8 fast algorithms for computing the physical properties of the representation
∃ representation following ALL rules above?
NO ⇒ compromise
9 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Representation rules
1 the representation field should be large enough
2 the representation should be non-ambiguous and accurate
3 no invalid representations should be allowed
4 valid representations should always be easy to create
5 efficient boolean operations: union, intersection, difference
6 closeness (invariant) to an affine transformation
7 compact (memory efficient) representation
8 fast algorithms for computing the physical properties of the representation
∃ representation following ALL rules above?NO ⇒ compromise
9 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Representation schemes
1 boundary representation (reducing the dimension)
2 pure primitive instantiation (parameterized prototypes)
3 sweeping method (moving objects, trajectory)
4 enumerating the spatial occupancy (voxels = volumetric pixels)
5 decomposing in cells (gluing elementary volumes)
6 constructive solid geometry (operations with elementary volumes)
7 multiple representations (particle systems)
10 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Boundary representations
point list
lines:transversal sections: points from the same sections are joined to form section contourwireframe: object represented by line and curve segments (good for for animations, badfor computing areas, volumes, mass, . . . )
explicit segments: extremities of the coordinatesimplicit segments: pair of indices to a list of verticespolygonal linestransversal sections & longitudinal lines
11 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Boundary representations
polygonsexplicit: store vertices in the order they appear: V = {V1,V2, . . . ,Vn}
duplicate coordinates, double drawing of edges, problem finding concurrent edgespointers to a list of vertex indices: VP1 = {1, 2, 4}, . . . , P = {VP1, . . . ,VPk}double drawing of edges, problem finding concurrent edgespointers to a list of edges: E1 = {V1,V2,P1} ,. . . , P = {E1, . . . , Em}problem finding concurrent edges (we draw lines NOT polygons)
find interior?store vertices in a given order (clock-wise, counter clock-wise)draw edge only from a vertex with a smaller index to one with a greater index value
12 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Boundary representations
polygonsexplicit: store vertices in the order they appear: V = {V1,V2, . . . ,Vn}duplicate coordinates, double drawing of edges, problem finding concurrent edges
pointers to a list of vertex indices: VP1 = {1, 2, 4}, . . . , P = {VP1, . . . ,VPk}double drawing of edges, problem finding concurrent edgespointers to a list of edges: E1 = {V1,V2,P1} ,. . . , P = {E1, . . . , Em}problem finding concurrent edges (we draw lines NOT polygons)
find interior?store vertices in a given order (clock-wise, counter clock-wise)draw edge only from a vertex with a smaller index to one with a greater index value
12 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Boundary representations
polygonsexplicit: store vertices in the order they appear: V = {V1,V2, . . . ,Vn}duplicate coordinates, double drawing of edges, problem finding concurrent edgespointers to a list of vertex indices: VP1 = {1, 2, 4}, . . . , P = {VP1, . . . ,VPk}
double drawing of edges, problem finding concurrent edgespointers to a list of edges: E1 = {V1,V2,P1} ,. . . , P = {E1, . . . , Em}problem finding concurrent edges (we draw lines NOT polygons)
find interior?store vertices in a given order (clock-wise, counter clock-wise)draw edge only from a vertex with a smaller index to one with a greater index value
12 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Boundary representations
polygonsexplicit: store vertices in the order they appear: V = {V1,V2, . . . ,Vn}duplicate coordinates, double drawing of edges, problem finding concurrent edgespointers to a list of vertex indices: VP1 = {1, 2, 4}, . . . , P = {VP1, . . . ,VPk}double drawing of edges, problem finding concurrent edges
pointers to a list of edges: E1 = {V1,V2,P1} ,. . . , P = {E1, . . . , Em}problem finding concurrent edges (we draw lines NOT polygons)
find interior?store vertices in a given order (clock-wise, counter clock-wise)draw edge only from a vertex with a smaller index to one with a greater index value
12 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Boundary representations
polygonsexplicit: store vertices in the order they appear: V = {V1,V2, . . . ,Vn}duplicate coordinates, double drawing of edges, problem finding concurrent edgespointers to a list of vertex indices: VP1 = {1, 2, 4}, . . . , P = {VP1, . . . ,VPk}double drawing of edges, problem finding concurrent edgespointers to a list of edges: E1 = {V1,V2,P1} ,. . . , P = {E1, . . . , Em}
problem finding concurrent edges (we draw lines NOT polygons)
find interior?store vertices in a given order (clock-wise, counter clock-wise)draw edge only from a vertex with a smaller index to one with a greater index value
12 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Boundary representations
polygonsexplicit: store vertices in the order they appear: V = {V1,V2, . . . ,Vn}duplicate coordinates, double drawing of edges, problem finding concurrent edgespointers to a list of vertex indices: VP1 = {1, 2, 4}, . . . , P = {VP1, . . . ,VPk}double drawing of edges, problem finding concurrent edgespointers to a list of edges: E1 = {V1,V2,P1} ,. . . , P = {E1, . . . , Em}problem finding concurrent edges (we draw lines NOT polygons)
find interior?store vertices in a given order (clock-wise, counter clock-wise)draw edge only from a vertex with a smaller index to one with a greater index value
12 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Boundary representations
polygonsexplicit: store vertices in the order they appear: V = {V1,V2, . . . ,Vn}duplicate coordinates, double drawing of edges, problem finding concurrent edgespointers to a list of vertex indices: VP1 = {1, 2, 4}, . . . , P = {VP1, . . . ,VPk}double drawing of edges, problem finding concurrent edgespointers to a list of edges: E1 = {V1,V2,P1} ,. . . , P = {E1, . . . , Em}problem finding concurrent edges (we draw lines NOT polygons)
find interior?store vertices in a given order (clock-wise, counter clock-wise)draw edge only from a vertex with a smaller index to one with a greater index value
12 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Boundary representations
polyhedrons: solid bounded by a set of polygons ⊕ set of constraintsw/o holesrepresentation:
vertices stored in a certain orderpolygonal faces stored through indices to a list of verticesedges stored through pairs of indices pointing to the vertex list
13 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Primitive instantiation
define a set of 3D solids relevant for the scene
primitives may be parameterized, i.e., family with members varying in a smallnumber of characteristics
represent complex objects through hierarchies
14 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Representation through sweeping (movement)
translational volume ⇒ 2D/3D object from a linear trajectory
rotational volume ⇒ 2D/3D object from rotation around an axis
general cylinder ⇒ 2D object
in general:objects can change shape and orientationtrajectory can arbitrary
15 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Voxels
– partition space into an uniform grid volume whose cells are called voxels ,i.e,volumetric pixels:
occupancy
color
density
temperature
. . .
Figure: Voxel partitioned space:http://www.cs.princeton.edu/courses/archive/spr03/cs426/#Coursework
16 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Voxels
advantages:simple, intuitive, unambiguoussame complexity for all objectsnatural acquisition for some applications, e.g., MRI, CATtrivial boolean operations (
⋃,⋂
, \)
disadvantages:approximativenot affine invariantlarge storage requirements, i.e., O(n3)expensive display
17 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Voxels
advantages:simple, intuitive, unambiguoussame complexity for all objectsnatural acquisition for some applications, e.g., MRI, CATtrivial boolean operations (
⋃,⋂
, \)
disadvantages:approximativenot affine invariantlarge storage requirements, i.e., O(n3)expensive display
17 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Quadtrees & octrees
– refine resolution of voxels hierarchically
18 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Quadtrees & octrees
Figure: Quadtree based surface http://www.infinitecode.com/?view_post=23
19 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Octrees
advantages:combinations very simplefast renderingspatial search possible
disadvantages:inexact representationlow image qualityrestricted transformationshigh memory costproblems in finding the neighbor of a node
20 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Octrees
advantages:combinations very simplefast renderingspatial search possible
disadvantages:inexact representationlow image qualityrestricted transformationshigh memory costproblems in finding the neighbor of a node
20 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Binary space partitioning
partition a convex region by a hyperplane
single operation → two child nodes added as leaf nodes:left child: interiorright child: exterior
point classification (in or out) can be easily done
21 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Constructive solid geometry
– simple primitives ⊕ boolean operations⇒tree with internal (operations) and terminal(primitives) nodes
can be created through CAD/CAM
22 / 24
Object Modeling Recap
Solid Modeling
Solid Modeling
Multiple representations
– good for describing objects that changeover time → particle systems:
examples:cloudssmokefirefireworkswater(fall). . .
a particle:position, speed & accelerationlife & fading factorcolor, material & texture. . .
Figure: Smoke effect: Call of Duty 2
Figure: Explosion effect: Star Trek II
23 / 24
Object Modeling Recap
Lecture Recap
24 / 24