66
Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Embed Size (px)

Citation preview

Page 1: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Modeling

Aaron BloomfieldCS 445: Introduction to Graphics

Fall 2006(Slide set originally by Greg Humphreys)

Page 2: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

OutlineOutline

AcquisitionAcquisition

• SeashellsSeashells

• FractalsFractals

• VolumesVolumes

• Constructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 3: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Model Construction

Interactive modeling tools CAD programs Subdivision surface editors :)

Scanning tools CAT, MRI, laser, magnetic, robotic arm, etc.

Computer vision Stereo, motion, etc.

Page 4: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Interactive Modeling Tools

User constructs objects with drawing program Menu commands, direct manipulation, etc. CSG, parametric surfaces, quadrics, etc.

Cosmoworlds, SGI

Page 5: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Interactive Modeling Tools

Example: Mechanical CAD

H&B Figure 9.9

Page 6: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Model Construction

Interactive modeling tools CAD programs Subdivision surface editors :)

Scanning tools Laser, magnetic, robotic arm, etc.

Computer vision Stereo, motion, etc.

Page 7: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Scanning tools

Acquire geometry of objects with active sensors CAT/MRI Laser range scanner Magnetic sensor Robotic arm etc.

Stanford Graphics LaboratoryLorensen

Page 8: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Scanning tools

Acquire geometry of objects with active sensors CAT/MRI Laser range scanner Magnetic sensor Robotic arm etc.

Dep

thC

olor

Xp (Xc,Yc)

Page 9: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Laser Range Scanning

Stanford Graphics Laboratory

Example: 70 scans Volumetric reconstruction

Page 10: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Scanning tools

Acquire geometry of objects with active sensors CAT/MRI Laser range scanner Magnetic sensor Robotic arm etc.

Page 11: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Scanning tools

Acquire geometry of objects with active sensors CAT/MRI Laser range scanner Magnetic sensor Robotic arm etc.

Page 12: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Computer Vision

Infer 3D geometry from images Stereo Motion Constraints etc.

Page 13: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Computer Vision

Infer 3D geometry from images Stereo Motion Constraints etc.

Page 14: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Computer Vision

Infer 3D geometry from images Stereo Motion Constraints etc.

Debevec96

Page 15: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Procedural Modeling

Goal: Describe 3D models algorithmically

Best for models resulting from ... Repeating processes Self-similar processes Random processes

Advantages: Automatic generation Concise representation Parameterized classes of models

Page 16: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

OutlineOutline

• AcquisitionAcquisitionSeashellsSeashells

• FractalsFractals

• VolumesVolumes

• Constructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 17: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Example: Seashells

Create 3D polygonal surface models of seashells

Fowler et al. Figure 7

“Modeling Seashells,” Deborah Fowler, Hans Meinhardt, and Przemyslaw Prusinkiewicz,Computer Graphics (SIGGRAPH 92), Chicago, Illinois, July, 1992, p 379-387.

“Modeling Seashells,” Deborah Fowler, Hans Meinhardt, and Przemyslaw Prusinkiewicz,Computer Graphics (SIGGRAPH 92), Chicago, Illinois, July, 1992, p 379-387.

Page 18: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Example: Seashells

Sweep generating curve around helico-spiral axis

Fowler et al. Figure 1

Helico-spiral definition:

Page 19: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Example: Seashells

Connect adjacent points to form polygonal mesh

Fowler et al. Figure 6

Page 20: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Example: Seashells

Model is parameterized: Helico-spiral: z0,zr0,r Generating curve: shape, Nc,c

Fowler et al. Figure 1

Page 21: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Example: Seashells

Generate different shells by varying parameters

Fowler et al. Figure 2Different helico-spirals

Page 22: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Example: Seashells

Generate different shells by varying parameters

Fowler et al. Figure 3Different generating curves

Page 23: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Example: Seashells

Fowler et al. Figures 4,5,7

Generate many interesting shellswith a simple procedural model!

Generate many interesting shellswith a simple procedural model!

Page 24: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

OutlineOutline

• AcquisitionAcquisition

• SeashellsSeashellsFractalsFractals

• VolumesVolumes

• Constructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 25: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Fractals

Defining property: Self-similar with infinite resolution

H&B Figure 10.100Mandelbrot Set

Page 26: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Fractals

Useful for describing natural 3D phenomenon Terrain Plants Clouds Water Feathers Fur etc.

H&B Figure 10.80

Page 27: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Fractal Generation

Deterministically self-similar fractals Parts are scaled copies of original

Statistically self-similar fractals Parts have same statistical properties as original

Page 28: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Deterministic Fractal Generation

General procedure: Initiator: start with a shape Generator: replace subparts with scaled copy of original

H&B Figure 10.68

Page 29: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Deterministic Fractal Generation

Apply generator repeatedly

H&B Figure 10.69

Koch Curve

Page 30: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Deterministic Fractal Generation

Mandelbrot Figure X

Useful for creating interesting shapes!

Page 31: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Deterministic Fractal Generation

Mandelbrot Figure 46

Useful for creating interesting shapes!

Page 32: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Deterministic Fractal Generation

H&B Figures 75 & 109

Useful for creating interesting shapes!

Page 33: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Fractal Generation

Deterministically self-similar fractals Parts are scaled copies of original

Statistically self-similar fractals Parts have same statistical properties as original

Page 34: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Statistical Fractal Generation

General procedure: Initiator: start with a shape Generator: replace subparts with a self-similar random

pattern

Random Midpoint Displacement

Page 35: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Statistical Fractal Generation

Example: terrain

H&B Figure 10.83b

Page 36: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Statistical Fractal Generation

H&B Figure 10.83a

Useful for creating mountains

Page 37: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Statistical Fractal Generation

H&B Figure 10.82

Useful for creating 3D plants

Page 38: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Statistical Fractal Generation

H&B Figure 10.79

Useful for creating 3D plants

Page 39: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

OutlineOutline

• AcquisitionAcquisition

• SeashellsSeashells

• FractalsFractalsVolumesVolumes

• Constructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 40: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Solid Modeling

Represent solid interiors of objects Surface may not be described explicitly

Visible Human(National Library of Medicine)

SUNY Stony Brook

Page 41: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Motivation 1

Some acquisition methods generate solids Example: CAT scan

Stanford University

Page 42: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Motivation 2

Some applications require solids Example: CAD/CAM

Intergraph Corporation

Page 43: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Solid Modeling Representations

What makes a good solid representation? Accurate Concise Affine invariant Easy acquisition Guaranteed validity Efficient boolean operations Efficient display

Lorensen

Page 44: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Voxels

Partition space into uniform grid Grid cells are called a voxels (like pixels)

Store properties of solid object with each voxel Occupancy Color Density Temperature etc.

FvDFH Figure 12.20

Page 45: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Voxel Acquisition

Scanning devices MRI CAT

Simulation FEM

SUNY Stony Brook

Stanford University

Page 46: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Voxel Storage

O(n3) storage for nxnxn grid 1 billion voxels for 1000x1000x1000

Page 47: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Voxel Boolean Operations

Compare objects voxel by voxel Trivial

=

=

Page 48: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Voxel Display

Isosurface rendering Render surfaces bounding volumetric regions of

constant value (e.g., density)

Isosurface VisualizationPrinceton University

Page 49: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Voxel Display

Slicing Draw 2D image resulting from intersecting voxels

with a plane

Visible Human(National Library of Medicine)

Page 50: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Voxel Display

Ray casting Integrate density along rays through pixels

Engine BlockStanford University

Page 51: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Voxels

Advantages Simple, intuitive, unambiguous Same complexity for all objects Natural acquisition for some applications Trivial boolean operations

Disadvantages Approximate Not affine invariant Large storage requirements Expensive display

Page 52: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Quadtrees & Octrees

Refine resolution of voxels hierarchically More concise and efficient for non-uniform objects

Uniform Voxels Quadtree

FvDFH Figure 12.21

Page 53: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Quadtree Boolean Operations

A B

A BA B

FvDFH Figure 12.24

Page 54: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Quadtree Display

Extend voxel methods Slicing Isosurface extraction Ray casting

Finding neighbor cell requires traversal of hierarchy (O(1))

FvDFH Figure 12.25

Page 55: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

OutlineOutline

• AcquisitionAcquisition

• SeashellsSeashells

• FractalsFractals

• VolumesVolumesConstructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 56: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Constructive Solid Geometry (CSG)

Represent solid object as hierarchy of boolean operations Union Intersection Difference

FvDFH Figure 12.27

Page 57: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

CSG Acquisition

Interactive modeling programs CAD/CAM

H&B Figure 9.9

Page 58: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

CSG Boolean Operations

Create a new CSG node joining subtrees Union Intersection Difference

FvDFH Figure 12.27

Page 59: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

CSG Display & Analysis

Ray casting

Circle Box

Union

Page 60: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

OutlineOutline

• AcquisitionAcquisition

• SeashellsSeashells

• FractalsFractals

• VolumesVolumes

• Constructive Solid GeometryConstructive Solid GeometryModeling ProgramsModeling Programs

Page 61: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Popular rendering programs

3D Studio Max ($3.5k) Made by Autodesk (makers of CAD programs) Runs only on Windows (Win32 and Win64) Movies made w/Max: Incredibles, X-Men, Star Wars III, etc.

Maya ($2k or $6k) Made by Alias

Originally by SGI Bought by Autodesk in Oct 2006

Runs on Windows, Linux Blender (free!)

Others are less well known and less used

Page 62: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

http://en.wikipedia.org/wiki/Image:3dsmax8Screenshot.jpg

3D Studio Max

Page 63: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Maya

http://en.wikipedia.org/wiki/Image:Autodesk_Maya_8.0_win32.png

Page 64: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

http://en.wikipedia.org/wiki/Image:Blender_node_screen_242a.jpg

Blender

Page 65: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Comparison of renderers

http://wiki.cgsociety.org/index.php/Comparison_of_3d_tools

And a better formatted version…

Page 66: Modeling Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)

Elephant’s Dream

Downloadable at http://orange.blender.org/ An open movie

Meaning you can download the Blender files that were used to make it Made using only open-source software

Blender, GIMP, CinePaint, Inkscape, etc. Length is 11 minutes (including 90 sec of credits)

That’s 19,800 frames Took a 2.1 TFLOPS supercomputer cluster 125 days to render

Used Bowie State’s XSeed supercomputer Took 9 minutes and 2.8 Gb per frame

An “average” high-end PC has only a “few” GFLOPS (not TFLOPS!) So if you had a 3 Ghz computer w/4 Gb of RAM, it would take over 200 years to

render! Or 3 days per frame Assuming a 3 Gz computer can do 3 TFLOPS (a generous assumption)