Scene Modeling - Rochester Institute of Technology
Transcript of Scene Modeling - Rochester Institute of Technology
![Page 1: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/1.jpg)
Scene Modeling
July 1, 1999
![Page 2: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/2.jpg)
July 1, 1999
Motivational Film
✔Grinning Evil Death– MIT Media Lab (1990)
![Page 3: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/3.jpg)
July 1, 1999
Logistics
✔Paper summaries on Scene Modeling– Any takers?
✔Projects– Presentations
• Presentation week…need 2 additional hours(early or late)
• 15 minutes / presentation• signup -- schedule on Web
![Page 4: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/4.jpg)
July 1, 1999
Photography and Light
pho•tog•ra•phy, n., the process or art ofproducing images of objects by the action oflight on a sensitized surface, esp, a film in acamera.
Yeah, we get it…photography,light…whatever..
![Page 5: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/5.jpg)
July 1, 1999
Computer Graphics as Virtual Photography
camera(captureslight)
syntheticimage
cameramodel
(focusessimulatedlighting)
processing
photoprocessing
tonereproduction
realscene
3Dmodels
Photography:
ComputerGraphics:
Photographicprint
![Page 6: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/6.jpg)
July 1, 1999
Today’s Class
✔Scene Modeling– Placing individual object model, lights, etc.
into a single scene
![Page 7: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/7.jpg)
July 1, 1999
Today’s Class
✔Scene Modeling– Coordinate transformations
– Object hierarchy– Scene Description Languages
• OpenGL• Graph Based• Object-Oriented
![Page 8: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/8.jpg)
July 1, 1999
Coordinate Transformations
✔How to specify placement of individualobjects into a scene
✔Two coordinate systems– Object coordinate system
– World coordinate system
![Page 9: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/9.jpg)
July 1, 1999
Coordinate Transformations
✔Homogeneous Coordinates– (x,y,z) -> (X, Y, Z, W)
– (x,y,z) = (X/W, Y/W, Z/W, 1)
✔Why?– Easily incorporate projections into
transformation model…more when we getto camera models
![Page 10: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/10.jpg)
July 1, 1999
Coordinate Transformation
✔Transformation Matrix
{ {objecttiontransforma
44434241
34333231
24232221
14131211
world
11
⋅
=
o
o
o
w
w
w
z
y
x
mmmm
mmmm
mmmm
mmmm
z
y
x
4444 34444 21
![Page 11: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/11.jpg)
July 1, 1999
Coordinate Transformation
✔Transform operations– Scaling
– Translation– Rotation
![Page 12: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/12.jpg)
July 1, 1999
Coordinate Transformation
✔Scaling– Make object bigger or smaller
=
1000
000
000
000
),,(z
y
x
zyx s
s
s
sssS
![Page 13: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/13.jpg)
July 1, 1999
Coordinate Transformation
✔Translation– Move object to a new location
=
1000
100
010
001
),,(z
y
x
zyx d
d
d
dddT
![Page 14: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/14.jpg)
July 1, 1999
Coordinate Transformation
✔Rotation– rotate object about a given axis
−
=
1000
0100
00cossin
00sincos
)(θθθθ
θzR
![Page 15: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/15.jpg)
July 1, 1999
Coordinate Transformation
✔Rotation
−
=
1000
0cossin0
0sincos0
0001
)(θθθθ
θxR
−=
1000
0cos0sin
0010
0sin0cos
)(θθ
θθ
θyR
![Page 16: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/16.jpg)
July 1, 1999
Coordinate Transformations
✔Individual operations can be composedinto a single matrix.
xy RSTRM ⋅⋅⋅=
![Page 17: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/17.jpg)
July 1, 1999
Coordinate Transformation
✔Beware: Transformation is notcommunitive
TRSRRSTR xyxy ⋅⋅⋅≠⋅⋅⋅
![Page 18: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/18.jpg)
July 1, 1999
Coordinate Transformation
✔So how do you transform objects?– On a point by point basis
– Example• Sphere• NURB• Polygonal Mesh
![Page 19: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/19.jpg)
July 1, 1999
Object Hierarchy
✔Wish to rotate wrt p
BA
p
![Page 20: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/20.jpg)
July 1, 1999
Object Hierarchy
✔TBW = transformation of B wrt world✔TAW = transformation of A wrt world✔TBA= transformation of B wrt A
AWBABW TTT ⋅=
✔To rotate about p, change TBA
![Page 21: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/21.jpg)
July 1, 1999
Object Hierarchy
✔Stack of transformation matrices
Arm wrt world
Body wrt world
Finger wrt world
![Page 22: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/22.jpg)
July 1, 1999
Object Heirarchy
✔Enough about transformations….whatabout languages?
✔Any questions?
![Page 23: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/23.jpg)
July 1, 1999
Scene Modeling Languages
✔From the low level to the high level– OpenGL
– Inventor (Graph Based Scene Languages)– True Object Oriented Model Languages.
![Page 24: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/24.jpg)
July 1, 1999
Scene Modeling Languages
✔Open GL– Originally designed as an API for SGI’s
rendering hardware– Very low level “C” programming library– Includes:
• Scene modeling• Rendering• Animation• Some rudimentary and low level interactivity
![Page 25: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/25.jpg)
July 1, 1999
Scene Modeling Languages
✔OpenGL - scene modeling– Objects
• only knows about polygons (different kinds ofpolygons, but just polygons)
• Polygons are specified by vertex list• You are responsible for definition of normal
vector.
![Page 26: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/26.jpg)
July 1, 1999
Scene Modeling Languages
✔OpenGL– Transformations
• Routines for scaling, translation, and rotation• Routines for direct manipulation of
transformation matrix• Maintains a stack of transformation matricies
for support of object hierarchy
![Page 27: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/27.jpg)
July 1, 1999
Scene Modeling Languages
✔OpenGL– Shading
• Support for flat at smooth shading• Support for ambient, diffuse, and specular
material components• Native support for texture mapping
![Page 28: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/28.jpg)
July 1, 1999
Scene Modeling Languages
✔OpenGL– Lighting
• support for ambient light• support for multiple individual light sources• support for spotlights
![Page 29: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/29.jpg)
July 1, 1999
Scene Modeling Languages
✔OpenGL– Models a state machine. Maintains
current:• Color• Transformation (transformation stack)• Material properties
– New polygonal objects will use currentcolor, transforms and materials.
![Page 30: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/30.jpg)
July 1, 1999
Scene Modeling Languages
✔Open GL– Summary
• Low level “C” interface• Polygonal model• State machine• Transformation Stack
![Page 31: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/31.jpg)
July 1, 1999
Scene Modeling Languages
✔Open GL - Further Reading– Fosner, OpenGL Programming for
Windows95 and WindowsNT– http://www.sgi.com/Technology/openGL
![Page 32: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/32.jpg)
July 1, 1999
Scene Modeling Languages
✔Graph Based Languages (Inventor)– Object oriented wrapper around GL
• Not a truly Object Oriented scenerepresentation.
– Scene is represented by a tree structure(scene graph)
– Scene graph is passed to a viewer which isresponsible for rendering
– Basis for VRML and Java3D
![Page 33: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/33.jpg)
July 1, 1999
Scene Modeling Languages
✔Graph Based Languages (Inventor)– Object oriented wrapper around GL
• Not a truly Object Oriented scenerepresentation.
– Implemented as C++ library withassociated file format.
![Page 34: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/34.jpg)
July 1, 1999
Scene Modeling Languages
✔Inventor– Scene is represented by a tree structure
(scene graph)– Scene graph is passed to a viewer which is
responsible for rendering
– Basis for VRML and Java3D– Max will be talking about VRML in a couple
of weeks.
![Page 35: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/35.jpg)
July 1, 1999
Scene Modeling Languages
✔Inventor -- Graph Nodes– Shape nodes
• represent physical objects• cone, cylinder, sphere, 3Dtext, triangleMesh,
NURB surface
– Lighting Nodes• introduces lights to a scene• directional, point, spot
![Page 36: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/36.jpg)
July 1, 1999
Scene Modeling Languages
✔Inventor– Camera Nodes
• Introduces a camera model• Orthographic/Perspective camera
– Property nodes• Appearance nodes (texture, color, material)• Transformations nodes (scale, rotate, translate)• Other (environment, normal, draw style)
![Page 37: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/37.jpg)
July 1, 1999
Scene Modeling Languages
✔Inventor– Group nodes
• Support for definition of “objects”• Locally groups subgraphs• Switch node (switch between 2 subgraphs)
![Page 38: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/38.jpg)
July 1, 1999
Scene Modeling Language
✔Inventor
![Page 39: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/39.jpg)
July 1, 1999
Scene Modeling Languages
✔Inventor -- Node Kits
![Page 40: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/40.jpg)
July 1, 1999
Scene Modeling Languages
✔Graph Actions– Traversal of scene graph for a particular
purpose.– Examples
• Rendering• Searching• Compute Bounding Box• Interactivity / Picking• Write to file
![Page 41: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/41.jpg)
July 1, 1999
Scene Modeling Languages
✔Inventor - Rendering– Like OpenGL, Inventor assumes a state
machine.– Unlike OpenGL, entire state can be placed
on a stack.
– Visiting a shape node introduces a newobject with “current” properties
– Visiting a property node is equivalent tomaking a given material current.
![Page 42: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/42.jpg)
July 1, 1999
Scene Modeling Languages
✔Inventor - Rendering– Entering a group node pushes current
state on stack– Leaving a group node pops current state
off stack.
![Page 43: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/43.jpg)
July 1, 1999
Scene Modeling Language
✔Inventor -- Interactive aspects:– Event model
• Ability to define and respond to events
– Sensors• Tracks changes in scene and responds• Performs node change at given time intervals
– Manipulators• Interface to input devices (e.g. mouse,
trackball)
![Page 44: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/44.jpg)
July 1, 1999
Scene Modeling Language
✔Inventor - summary– “Object oriented” wrapper to OpenGL
– Scene represented as graph– Actions performed on graphs for specific
purposes (like rendering)
– Supports events and interactivity– Precursor to VRML and Java3D
![Page 45: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/45.jpg)
July 1, 1999
Scene Modeling Languages
✔Inventor - further reading– [Strauss92]
– Strauss/Carey, The Inventor Mentor
![Page 46: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/46.jpg)
July 1, 1999
Scene Modeling Language
✔Inventor - not a truly OO scene model– Separation between object and materials
– Still based on state machine model.– Created for CG user. Still doesn’t fit real
world paradigm• e.g. We usually aren’t concerned
transformation matricies
![Page 47: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/47.jpg)
July 1, 1999
Scene Modeling Language
✔GROOP– truly object oriented scene description
– transformations, material, geometry, andcolor are all associated with an object
– uses a camera/actor/stage paradigm.
![Page 48: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/48.jpg)
July 1, 1999
Scene Modeling Languages
✔GROOP
![Page 49: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/49.jpg)
July 1, 1999
Scene Modeling Language
✔GROOP– Scene object is a collection of objects in a
scene.– Objects are introduced by literally “Adding”
them to a scene.
– Unlike Inventor, order of addition is notimportant.
![Page 50: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/50.jpg)
July 1, 1999
Scene Modeling Languages
✔GROOP– Extensibility achieved by use of C++
inheritance.
![Page 51: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/51.jpg)
July 1, 1999
Scene Modeling Languages
✔GROOP - summary– example of a truly object oriented scene
description mechanism– intuitive– extensible
– Alas, not used….never caught on.
![Page 52: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/52.jpg)
July 1, 1999
Summary
✔Scene Modeling– means of assembling objects into a scene
– Coordinate Transformations– Scene Modeling Languages
• Open GL• Inventor• GROOP
![Page 53: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/53.jpg)
July 1, 1999
Next Class
✔Switch from modeling to rendering✔Rendering Equation
– basic theory behind rendering algorithms
![Page 54: Scene Modeling - Rochester Institute of Technology](https://reader034.fdocuments.us/reader034/viewer/2022042603/6262aee50cb28d63df1288b4/html5/thumbnails/54.jpg)
July 1, 1999
Remember
✔Class Web Site:– http://www.cs.rit.edu/~jmg/virtualPhoto
✔Any questions?