CMSC 335 Computer Graphics

19
CMSC 335 COMPUTER GRAPHICS LECTURE 12 IMPLICIT MODELING PROCEDURAL MODELING PREVIEW OF TESSELLATION

Transcript of CMSC 335 Computer Graphics

Page 1: CMSC 335 Computer Graphics

CMSC 335COMPUTER GRAPHICSLECTURE 12

• IMPLICIT MODELING

• PROCEDURAL MODELING

• PREVIEW OF TESSELLATION

Page 2: CMSC 335 Computer Graphics

IMPLICIT MODELING

Page 3: CMSC 335 Computer Graphics

IMPLICIT MODELING

• Implicit modeling entails methods

that define models mathematically

• As a canonical example, consider a

circle:

𝑓 𝑥, 𝑦 = 𝑥2 + 𝑦2 − 𝑟2 = 0

Page 4: CMSC 335 Computer Graphics

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

Page 5: CMSC 335 Computer Graphics

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

Page 6: CMSC 335 Computer Graphics

PRECISE CONTACT MODELING

• Precise contact modeling is a

method for deformation and contact

modeling while maintaining

continuity

Page 7: CMSC 335 Computer Graphics

BLOB TREE

• Most of the implicit modeling

approaches, including constructive

solid geometry allow for

combinations in a tree hierarchy to

represent very complex shapes

Page 8: CMSC 335 Computer Graphics

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

Page 9: CMSC 335 Computer Graphics

PROCEDURAL MODELING

Page 10: CMSC 335 Computer Graphics

PROCEDURAL MODELING

• Procedural modeling can refer to

the algorithmic generation of shape

data

• Many methods exist and are widely

used

Page 11: CMSC 335 Computer Graphics

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

Page 12: CMSC 335 Computer Graphics

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

Page 13: CMSC 335 Computer Graphics

FRACTALS

• Self-similar subset of space,

exhibiting a repeating pattern at

smaller and smaller scales

• Defined recursively

Page 14: CMSC 335 Computer Graphics

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

Page 15: CMSC 335 Computer Graphics

TESSELLATION

Page 16: CMSC 335 Computer Graphics

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

Page 17: CMSC 335 Computer Graphics

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

Page 18: CMSC 335 Computer Graphics

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)

Page 19: CMSC 335 Computer Graphics

TESSELLATION EVALUATION SHADER

• Allows the manipulation of the grid

into a specific shape

• Executes once per vertex produced

by the tessellator