CMSC 335 Computer Graphics
Transcript of CMSC 335 Computer Graphics
CMSC 335COMPUTER GRAPHICSLECTURE 12
• IMPLICIT MODELING
• PROCEDURAL MODELING
• PREVIEW OF TESSELLATION
IMPLICIT MODELING
IMPLICIT MODELING
• Implicit modeling entails methods
that define models mathematically
• As a canonical example, consider a
circle:
𝑓 𝑥, 𝑦 = 𝑥2 + 𝑦2 − 𝑟2 = 0
BLOBBY OBJECTS
• Blobby objects are defined as
distribution functions over space
• An example would be defining a ball by
a distance from a point scaled by that
distance (think of heat radiating from the
sun)
• Summation or other blending techniques
combine many primitive blobs into a
model
CONSTRUCTIVE SOLID GEOMETRY
• The process of generating a new object
from two objects using a set operation
is called constructive solid geometry
• Union, intersection, and difference allow
for various complex models to be
formed
• Warping is also allowed of shapes in
the form of twisting, tapering, or
bending
PRECISE CONTACT MODELING
• Precise contact modeling is a
method for deformation and contact
modeling while maintaining
continuity
BLOB TREE
• Most of the implicit modeling
approaches, including constructive
solid geometry allow for
combinations in a tree hierarchy to
represent very complex shapes
SPACE PARTITIONING
• In order to render an implicit model, it
needs to be approximated by polygons
• Space partitioning algorithms
facilitate this
• Example algorithm: (1) divide the space
into a grid of voxels, (2) determine voxels
intersecting model, (3) convert voxels into
tetrahedrons
• Extra data structures
• Binary space partitions
• Octtrees
PROCEDURAL MODELING
PROCEDURAL MODELING
• Procedural modeling can refer to
the algorithmic generation of shape
data
• Many methods exist and are widely
used
SWEEPING ALGORITHMS
• Objects with symmetry can often be
specified by a 2D shape moving
through (sweeping) space
• Using a parametric representation,
we can generate vertex/triangle
information from this
• Example of a sphere and torus in Ch 6
of Computer Graphics Programming
GENERATIVE GRAMMARS
• Grammars are descriptions of
languages
• Generative grammars describe how to
expand language constructs into an
infinite number of possible sentences
• Shape grammars extend this idea to
shapes
• Applies randomness to the logical
expansion rules
FRACTALS
• Self-similar subset of space,
exhibiting a repeating pattern at
smaller and smaller scales
• Defined recursively
RANDOMIZED APPROACHES
• Many algorithms exist to generate
random properties
• Allows variance in set of generated
shapes
• Smoothing can become an important
aspect to post process the shape
TESSELLATION
TESSELLATION OVERVIEW
• Tessellation refers to the generation
of a large number of primitives for
rendering complex shapes
• Related to the concept of tiling a
flat surface with a pattern
TESSELLATION SHADER ARCHITECTURE
• The first and third stage of
tessellation is programmable
• The second stage is synonymous to
rasterizing, in that it is a fixed
algorithm
Tessellation Control Shader
Tessellator
Tessellation Evaluation
Shader
TESSELLATION CONTROL SHADER
• Configures what type of grid of
triangles the tessellator will
generate for the patch
• Executes once per vertex to allow
additional computations to be done
per vertex (or pass data through)
TESSELLATION EVALUATION SHADER
• Allows the manipulation of the grid
into a specific shape
• Executes once per vertex produced
by the tessellator