Modeling

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

description

Modeling. Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys). Outline. Acquisition Seashells Fractals Volumes Constructive Solid Geometry Modeling Programs. Model Construction. Interactive modeling tools CAD programs - PowerPoint PPT Presentation

Transcript of Modeling

Page 1: Modeling

Modeling

Aaron BloomfieldCS 445: Introduction to Graphics

Fall 2006(Slide set originally by Greg Humphreys)

Page 2: Modeling

OutlineOutline

AcquisitionAcquisition

• SeashellsSeashells

• FractalsFractals

• VolumesVolumes

• Constructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 3: Modeling

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

Interactive Modeling Tools

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

Cosmoworlds, SGI

Page 5: Modeling

Interactive Modeling Tools

Example: Mechanical CAD

H&B Figure 9.9

Page 6: Modeling

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

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

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

Laser Range Scanning

Stanford Graphics Laboratory

Example: 70 scans Volumetric reconstruction

Page 10: Modeling

Scanning tools

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

Page 11: Modeling

Scanning tools

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

Page 12: Modeling

Computer Vision

Infer 3D geometry from images Stereo Motion Constraints etc.

Page 13: Modeling

Computer Vision

Infer 3D geometry from images Stereo Motion Constraints etc.

Page 14: Modeling

Computer Vision

Infer 3D geometry from images Stereo Motion Constraints etc.

Debevec96

Page 15: Modeling

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

OutlineOutline

• AcquisitionAcquisitionSeashellsSeashells

• FractalsFractals

• VolumesVolumes

• Constructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 17: Modeling

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

Example: Seashells

Sweep generating curve around helico-spiral axis

Fowler et al. Figure 1

Helico-spiral definition:

Page 19: Modeling

Example: Seashells

Connect adjacent points to form polygonal mesh

Fowler et al. Figure 6

Page 20: Modeling

Example: Seashells

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

Fowler et al. Figure 1

Page 21: Modeling

Example: Seashells

Generate different shells by varying parameters

Fowler et al. Figure 2Different helico-spirals

Page 22: Modeling

Example: Seashells

Generate different shells by varying parameters

Fowler et al. Figure 3Different generating curves

Page 23: Modeling

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

OutlineOutline

• AcquisitionAcquisition

• SeashellsSeashellsFractalsFractals

• VolumesVolumes

• Constructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 25: Modeling

Fractals

Defining property: Self-similar with infinite resolution

H&B Figure 10.100Mandelbrot Set

Page 26: Modeling

Fractals

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

H&B Figure 10.80

Page 27: Modeling

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

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

Deterministic Fractal Generation

Apply generator repeatedly

H&B Figure 10.69

Koch Curve

Page 30: Modeling

Deterministic Fractal Generation

Mandelbrot Figure X

Useful for creating interesting shapes!

Page 31: Modeling

Deterministic Fractal Generation

Mandelbrot Figure 46

Useful for creating interesting shapes!

Page 32: Modeling

Deterministic Fractal Generation

H&B Figures 75 & 109

Useful for creating interesting shapes!

Page 33: Modeling

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

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

Statistical Fractal Generation

Example: terrain

H&B Figure 10.83b

Page 36: Modeling

Statistical Fractal Generation

H&B Figure 10.83a

Useful for creating mountains

Page 37: Modeling

Statistical Fractal Generation

H&B Figure 10.82

Useful for creating 3D plants

Page 38: Modeling

Statistical Fractal Generation

H&B Figure 10.79

Useful for creating 3D plants

Page 39: Modeling

OutlineOutline

• AcquisitionAcquisition

• SeashellsSeashells

• FractalsFractalsVolumesVolumes

• Constructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 40: Modeling

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

Motivation 1

Some acquisition methods generate solids Example: CAT scan

Stanford University

Page 42: Modeling

Motivation 2

Some applications require solids Example: CAD/CAM

Intergraph Corporation

Page 43: Modeling

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

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

Voxel Acquisition

Scanning devices MRI CAT

Simulation FEM

SUNY Stony Brook

Stanford University

Page 46: Modeling

Voxel Storage

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

Page 47: Modeling

Voxel Boolean Operations

Compare objects voxel by voxel Trivial

=

=

Page 48: Modeling

Voxel Display

Isosurface rendering Render surfaces bounding volumetric regions of

constant value (e.g., density)

Isosurface VisualizationPrinceton University

Page 49: Modeling

Voxel Display

Slicing Draw 2D image resulting from intersecting voxels

with a plane

Visible Human(National Library of Medicine)

Page 50: Modeling

Voxel Display

Ray casting Integrate density along rays through pixels

Engine BlockStanford University

Page 51: Modeling

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

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

Quadtree Boolean Operations

A B

A BA B

FvDFH Figure 12.24

Page 54: Modeling

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

OutlineOutline

• AcquisitionAcquisition

• SeashellsSeashells

• FractalsFractals

• VolumesVolumesConstructive Solid GeometryConstructive Solid Geometry

• Modeling ProgramsModeling Programs

Page 56: Modeling

Constructive Solid Geometry (CSG)

Represent solid object as hierarchy of boolean operations Union Intersection Difference

FvDFH Figure 12.27

Page 57: Modeling

CSG Acquisition

Interactive modeling programs CAD/CAM

H&B Figure 9.9

Page 58: Modeling

CSG Boolean Operations

Create a new CSG node joining subtrees Union Intersection Difference

FvDFH Figure 12.27

Page 59: Modeling

CSG Display & Analysis

Ray casting

Circle Box

Union

Page 60: Modeling

OutlineOutline

• AcquisitionAcquisition

• SeashellsSeashells

• FractalsFractals

• VolumesVolumes

• Constructive Solid GeometryConstructive Solid GeometryModeling ProgramsModeling Programs

Page 61: Modeling

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

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

3D Studio Max

Page 63: Modeling

Maya

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

Page 64: Modeling

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

Blender

Page 65: Modeling

Comparison of renderers

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

And a better formatted version…

Page 66: Modeling

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)