1 / 14

The 3D Pipeline

The 3D Pipeline. Jim Van Verth (jim@essentialmath.com) Lars M. Bishop (lars@essentialmath.com). The 3D Pipeline. Three problems: want to construct hierarchy of objects transformation of object combined with its children want to manipulate camera viewing transformation

oblevins
Download Presentation

The 3D Pipeline

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The 3D Pipeline Jim Van Verth (jim@essentialmath.com) Lars M. Bishop (lars@essentialmath.com)

  2. The 3D Pipeline • Three problems: • want to construct hierarchy of objects • transformation of object combined with its children • want to manipulate camera • viewing transformation • want to render objects to screen • projection/screen transformation Essential Math for Games

  3. The 3D Pipeline • Where geometric objects are transformed through a series of spaces • They are fed in as 3D objects in their own space (model space) • They come out as pixels on the screen (screen space) Model World View NDC Screen Essential Math for Games

  4. z x Model Space y • AKA local space, object space • Where object vertices are defined • Origin at center of object (or at pivot) • Right-handed is common • Z up arbitrary, also see Y-axis up Essential Math for Games

  5. z x World Space y • Where objects are placed • Origin at center of world or scene • Right-handed is good (consistency) • View position, orientation usually expressed here Essential Math for Games

  6. Hierarchical Spaces • Suppose have arm connected to body in world • First transform arm to body space • Then transform arm to world space • Standard order: scale, rotate, translate • Often, objects are modeled around a “pivot point” (e.g. shoulder for arm) Essential Math for Games

  7. Hierarchical Transforms • First transform arm to body space MAB = TARAsA Arm in Arm’s Model Space Arm in Body’s Model Space Essential Math for Games DEMO

  8. Hierarchical Transforms • Then body, arm to world space MBW = TBRBsB MAW = MBWMAB Essential Math for Games DEMO

  9. Hierarchical Transforms • In practice, body and arm have separate transforms • Arm transform is relative to body • Draw body with its transform (MBW) • Draw arm with concatenation of body and arm transforms (MBW MAB) • Objects can move independently Essential Math for Games

  10. Scene Graph • Common structure for hierarchical scenes • Jointed (or skinned) characters are the most frequent applications • Using like a tree – doesn’t have to be • Instancing makes it a DAG Essential Math for Games

  11. Example Scene Graph Node Node Body Scene Graph need not be a binary tree! Nodes can have as many children as needed Node Turret Barrel Essential Math for Games

  12. Scene Graph(One Implementation) • Spatial • Base class, handles transforms, bounds • Node • Maintains hierarchy (array of children) • Geometry • Leaf nodes, contain renderable geometry Essential Math for Games

  13. Using Scene Graph • Update transforms • Pass down from top to geometry nodes • Concatenate and store world transforms at each level • Used for collision, culling • Render • Recursively call Render() on all children • Bounding volumes allow for fast culling Essential Math for Games DEMO

  14. References • Foley, James D., Andries van Dam, et. al., Computer Graphics: Principles and Practice, Addison-Wesley, Reading, MA, 1990. • Blinn, Jim, Jim Blinn’s Corner: A Trip Down the Graphics Pipeline, Morgan Kaufman, San Francisco, 1996. • Eberly, David H., 3D Game Engine Design, Morgan Kaufmann, San Francisco, 2001. Essential Math for Games

More Related