Object representations

5,345 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
5,345
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
261
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Object representations

  1. 1. Computer Graphics Object Representations Taher S.
  2. 2. Recap: Rendering Pipeline <ul><ul><li>Modeling transformations </li></ul></ul><ul><ul><li>Viewing transformations </li></ul></ul><ul><ul><li>Projection transformations </li></ul></ul><ul><ul><li>Clipping </li></ul></ul><ul><ul><li>Scan conversion </li></ul></ul><ul><li>We now know everything about how to draw a polygon on the screen, we now learn how to represent them efficiently using appropriate data structures. </li></ul>
  3. 3. Types of Objects <ul><li>Polygon Surfaces (Order =1) </li></ul><ul><li>Quadric Surfaces (Order <=2) </li></ul><ul><li>Sphere </li></ul><ul><li>Ellipsoid </li></ul><ul><li>Torus </li></ul><ul><li>Curved Lines and Surfaces (Order <=3) </li></ul><ul><li>Spline Representations </li></ul>
  4. 4. Object Representation Methods <ul><li>Boundary Representations (B-reps) </li></ul><ul><li>The B-reps describes a 3D object as a set of surfaces that separate the object interior from the environment </li></ul><ul><li>Space Partitioning </li></ul><ul><li>The Space partitioning representation describes interior properties by partitioning the spatial region containing an object into a set of small, non-overlapping, contiguous solids. </li></ul>
  5. 5. Types of Data Structures <ul><li>Polygon Tables </li></ul><ul><li>Plane Equations </li></ul><ul><li>Polygon Meshes </li></ul><ul><li>BSP Trees </li></ul><ul><li>Octrees </li></ul>
  6. 6. Binary Space Partition Trees (1979) <ul><li>BSP tree: organize all of space (hence partition ) into a binary tree </li></ul><ul><ul><li>Preprocess : overlay a binary tree on objects in the scene </li></ul></ul><ul><ul><li>Runtime : correctly traversing this tree enumerates objects from back to front </li></ul></ul><ul><ul><li>Idea: divide space recursively into half-spaces by choosing splitting planes </li></ul></ul><ul><ul><ul><li>Splitting planes can be arbitrarily oriented </li></ul></ul></ul>
  7. 7. BSP Trees: Objects
  8. 8. BSP Trees: Objects
  9. 9. BSP Trees: Objects
  10. 10. BSP Trees: Objects
  11. 11. BSP Trees: Objects
  12. 12. Rendering BSP Trees
  13. 13. Rendering BSP Trees
  14. 14. Polygons: BSP Tree Construction <ul><li>Split along the plane defined by any polygon from scene </li></ul><ul><li>Classify all polygons into positive or negative half-space of the plane </li></ul><ul><ul><li>If a polygon intersects plane, split polygon into two and classify them both </li></ul></ul><ul><li>Recurse down the negative half-space </li></ul><ul><li>Recurse down the positive half-space </li></ul>
  15. 15. <ul><li>No bunnies were harmed in my example </li></ul><ul><li>But what if a splitting plane passes through an object? </li></ul><ul><ul><li>Split the object; give half to each node </li></ul></ul>Discussion: BSP Tree Cons Ouch
  16. 16. Octrees <ul><li>Frequently used in modern video games </li></ul><ul><ul><li>A BSP tree subdivides space into a series of half-spaces using single planes </li></ul></ul><ul><ul><li>An octree subdivides space into eight voxels using three axis-aligned planes </li></ul></ul><ul><ul><ul><li>A voxel is labeled as having polygons inside it or not </li></ul></ul></ul>www.gamasutra.com/features/19970801/octree.htm
  17. 17. Octrees <ul><ul><li>A voxel may have geometry inside it or subdivide </li></ul></ul><ul><ul><ul><li>Can have as many as eight children </li></ul></ul></ul><ul><ul><li>Thus we partition 3-D space into 3-D cells </li></ul></ul><ul><ul><li>Checking visibility with polygons is now faster due to only checking particular cells </li></ul></ul><ul><ul><li>Quadtrees are a 2-D variant </li></ul></ul>
  18. 18. Quadric Surfaces: <ul><li>Sphere </li></ul><ul><li>Ellipsoid </li></ul><ul><li>Torus </li></ul><ul><li>Paraboloid </li></ul><ul><li>Hyperboloid </li></ul>
  19. 19. Sphere: Cartesian form: Parametric Form:
  20. 20. Ellipsoid: Cartesian form: Parametric Form:
  21. 21. Torus: Clifford Torus Turning a punctured torus inside-out
  22. 22. As the distance to the axis of revolution decreases, the ring torus becomes a spindle torus and then degenerates into a sphere.
  23. 23. Cartesian form: Parametric Form: Red arrow :  φ Blue arrow : θ
  24. 24. Paraboloid:
  25. 25. Hyperboloid: One -Sheet Two- Sheet

×