Advanced Computer Graphics: Constructive Modelling - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Advanced Computer Graphics: Constructive Modelling

Description:

AB. C. A~B ~C ~C. AB ~B. B ~A. A. 8/29/09. Advanced Computer Graphics. 22. Exercise: CSG-Ray Intersection ... Exercise: Constructive Modelling ... – PowerPoint PPT presentation

Number of Views:163
Avg rating:3.0/5.0
Slides: 30
Provided by: edwin58
Category:

less

Transcript and Presenter's Notes

Title: Advanced Computer Graphics: Constructive Modelling


1
Advanced Computer GraphicsConstructive Modelling
  • James Gain
  • Department of Computer ScienceUniversity of Cape
    Town
  • jgain_at_cs.uct.ac.za

2
Objectives
  • To introduce a range of modelling techniques
  • Curves and Surfaces
  • Surfaces of Revolution
  • Generalized Cylinders
  • Spatial Deformation
  • Volumetric Techniques
  • Constructive Solid Geometry
  • To consider Constructive Solid Geometry in detail
  • To discuss graphics in the real world

3
Modelling a Sword
4
Modelling Techniques
  • Building polygon mesh models by hand is
    infeasible.
  • Need modelling techniques which are
  • Versatile (great variety of achievable shapes)
  • Usable (easy to understand controls and specify
    shapes)
  • Suitable for particular texturing, rendering and
    animation purposes
  • Compact (low space consumption)
  • Efficient (interrogation algorithms execute
    rapidly)
  • How are shapes modelled in practice?

5
Parametric Surfaces
  • A bi-parametric surface is a
    rectangular function of two variables and
    , which produces a point on the surface.
  • Shape is governed by control points, which either
    interpolate or approximate the surface.
  • Objects are created by joining the edges of
    surfaces. Like stitching together rubber sheets.
  • Very widespread technique but has problems with
    joins and topology.

6
Surfaces of Revolution
  • Circular symmetric objects.
  • 3D surface created by revolving a 2D profile
    curve around an axis of rotation in space.
  • Closed profile curves generate closed surfaces.
  • Examples
  • Circular cylinder - The profile
    is a line segment parallel but
    not coincident with the axis of
    rotation. The closed
    version requires
    a rectangle.
  • Truncated cone - The line
    segment profile is slanted with
    respect to the axis.

7
Surfaces of Revolution
  • Further examples
  • Torus - The profile is a
    circle inset in a plane aligned
    with the axis.
  • Complex circularly symmetric shapes -
    employ a Bézier or
    B-spline profile.

8
Generalized Cylinders
  • Extrusion sweep a 2D shape along a
    (non-circular) path.
  • Some objects can be generated by extrusion or
    revolution. e.g. a cylinder (an extruded circle
    or a revolved line).
  • Generalized cylinders extend the concept of
    extrusions and surfaces of revolution to the
    extreme.
  • Total control over all sweep parameters.
  • But can produce degeneracies, e.g.
    self-intersection.

9
Generalized Cylinder Parameters
  • Can vary
  • Cross Section 2D shape does not have to be a
    circle and can change shape as it is swept.
  • Sweep Path path does not have to be a straight
    line or revolution, can be any space curve.
  • Twist the cross section can be rotated as it
    moves along the path
  • Scale the size of the cross section can change
    along the path
  • Normal vector direction usually the vector
    normal to the cross section points along the
    path, but even this can be varied
  • And any other parameters.

10
Spatial Deformation
  • Principle
  • Indirectly deform an object by warping
    the surrounding space.
  • Jelly metaphor
  • A shape is set within a block of jelly.
  • Flexing the jelly results in a corres-
    ponding distortion of the shape.
  • Mechanism
  • Object vertices are embedded in a
    parametric hyperpatch, which is a
    3D generalization of curves.

11
Volumetric Techniques
  • Spatial Occupancy Enumeration Objects are
    constructed Lego-like from adjoining simple
    solids.
  • Often restricted to cubes. These Voxels (Volume
    Elements) are the 3D analog of square Pixels
    (Picture Elements)
  • Objects for Biomedical Applications
  • Medical Scans (CT, MRI) produce image slices with
    a regular grid of sample values (for skin, bone,
    muscle, etc).
  • The isosurface at a particular isovalue is very
    difficult to visualize from separate 2D scans.
  • Can be converted to a Polygon-Mesh using the
    famous Marching Cubes algorithm.

12
Implicit (Blobby) Objects
  • Blobby (or Soft) objects are used to create and
    animate smooth shapes.
  • Use implicit rather then
    parametric surfaces.
  • A skeleton is defined by a set of key points,
    which radiate energy to the surrounding space.
  • The object boundary is an isosurface at a
    particular energy level.
  • The position and orientation of keys can be
    animated.

13
Constructive Solid Geometry
  • Constructive Solid Geometry (CSG) consists of
    regularized boolean set operations on closed 3D
    objects.

Intersection
Sphere (A) and Parallelepiped (B)
Union
Difference
14
Validity
  • Ordinary Boolean set operations may not yield a
    solid. For instance, the intersection of two
    cubes can produce a solid, a plane, a line, a
    point or null.
  • For robustness we require set operations which
    take valid closed objects as input and produce a
    valid closed solid as output.
  • Regularization ( notation) ensures this

B
B
B
B
A
A
A
A
15
Regularization
  • Object can be partitioned into interior and
    boundary points.
  • Boundary occurs where distance from the object
    and its complement is zero
  • Exterior Space Interior Boundary.
  • Problems
  • Boundary points need not be part of an object.
    Closure prevents this by forming the union of a
    set with its boundary.
  • Dangling boundaries are part of an object but not
    adjacent to any interior. Regularization prevents
    this by forming the closure of the interior.

16
Regularization Example
  • KEY
  • Boundary
  • (within object)
  • Boundary
  • (outside object)
  • Interior

Nasty Object
Closure
Interior
Regularization
17
Set Op Components
B
A
i interior b boundary
18
Regularized Boolean Set Ops
19
Constructive Solid Geometry
  • Constructive Solid Geometry (CSG) is an effective
    means of storing and interrogating complex
    objects
  • Objects stored as a tree
  • Leaf nodes are usually closed primitives.
    Sometimes half-spaces are used, e.g. cube is the
    intersection of six half-spaces. Although useful
    these may cause validity problems.
  • Internal nodes are Boolean operations, affine
    transformations or deformations.
  • Ordering of edges is important because set ops
    are not all commutative
  • Evaluated using a depth first walk

20
CSG Example
21
CSG Ray Intersections
  • Ray tracing requires the calculation of points of
    intersection between an object and ray.
  • Solution intersect arguments and ray, track
    inside/outside status along ray, points are
    retained according to lookup table.

22
Exercise CSG-Ray Intersection
  • Question create the CSG intersection lookup
    table for the set operation
  • Answer

23
CSG Summary
  • A compact representation
  • Easy to manipulate
  • Regularized Boolean Set Operations depend on the
    complexity of the arguments and can be expensive.
  • Intuitive but can sometimes be confusing since
    there are many different ways of achieving the
    same shape.
  • Sometimes supported by a particular rendering
    architectures.

24
Exercise Constructive Modelling
  • Specify the steps required for construction of
    the jug pictured below. Note some stages can be
    achieved in several different ways.

25
Constructive Modelling Solution
  • Jug - Surface of Revolution
  • Handle - Extruded Ellipse
  • Spout - Spatial Deformation
  • Combination - Union of Deformed Jug and Handle

26
Versatility
  • Representing Complex Shapes
  • Creases is it possible to introduce creases and
    corners?
  • Smoothness can continuity be guaranteed where
    required?
  • Topology are complex topologies (with a variety
    of holes) possible?

27
Usability
  • Some desirable ease-of-use properties in
    modelling (c.f. HCI)
  • Closeness of mapping (between problem and
    solution)
  • Simplicity (make things as simple as possible
    but no simpler).
  • Consistency (similar operations are expressed in
    a similar way).
  • Flexibility (technique does not require
    experience but does rewards it)
  • Interactive Feedback (shape updates immediately)
  • Fluidity (easy to make modelling changes)
  • Reversibility (undo changes)
  • Order Independence (can design operations be done
    in any order)
  • Direct manipulation (there is no indirection in
    control of the shape).
  • Some are properties of the modelling system
    rather than the underlying technique.
  • CSG, blobby objects and generalized cylinders are
    relatively intuitive (hide mathematical
    underpinnings).

28
Suitability for Renderingand Animation
  • Rendering
  • Polygon scan conversion requires that all
    representations be converted to a polygon mesh.
  • Ray tracing requires ray-object intersection
    tests.
  • Animation
  • Requires controls which allow the shape to vary
    over time.
  • Best Match
  • Ray Tracing CSG.
  • Polygon Scan Conversion parametric surfaces and
    generalized cylinders.
  • Animation blobby objects, spatial deformation.
  • Space Economy
  • Most representations are compact (before
    conversion to Polygon Mesh) except volumetric
    objects.

29
Beyond the Ivory Tower
  • CAD/CAM
  • Parametric surfaces and Constructive Solid
    Geometry.
  • Visualization
  • Volumetric techniques for Biomedical
    applications.
  • Simulation, 3D Games
  • Any technique amenable to pre-processed
    conversion to polygon-mesh and which produces low
    polygon counts.
  • Often use decimation techniques to reduce number
    of polygons.
  • Film
  • Almost all techniques (surfaces - Geris Game,
    Toy Story 2, blobby objects - Flubber).
  • But, often model objects in clay and then laser
    scan directly to polygon mesh (Star Wars,
    Godzilla).
Write a Comment
User Comments (0)
About PowerShow.com