1 / 13

Modeliranje kompleksnih modelov

Modeliranje kompleksnih modelov. Hierahična, drevesna struktura modela. Polygonal Meshes. Used to model solid objects Objects are defined by: List of vertices List of normals Face list. 3. 2. 7. 6. 0. 1. 4. 5. Vertex List. 4. 3. 0. 1. 2. 5. Normal list. 0: Rear Face

carljenkins
Download Presentation

Modeliranje kompleksnih modelov

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. Modeliranje kompleksnih modelov Hierahična, drevesna struktura modela

  2. Polygonal Meshes • Used to model solid objects • Objects are defined by: • List of vertices • List of normals • Face list

  3. 3 2 7 6 0 1 4 5 Vertex List

  4. 4 3 0 1 2 5 Normal list 0: Rear Face 1: Right Face 2: Front Face 3: Left Face 4: Top Face 5: Bottom Face

  5. 3 2 7 6 0 1 4 5 Face List 0: Rear Face 1: Right Face 2: Front Face 3: Left Face 4: Top Face 5: Bottom Face

  6. # Vertices # Normals # Faces Vertices Normals Faces Data File • 8 6 6 • 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 • 1 0 1 1 1 1 0 1 1 • 0 0 -1 1 0 0 0 0 1 1 0 0 0 1 0 • 0 -1 0 • 4 0 3 2 1 • 4 1 2 6 5 • 4 4 5 6 7 • 4 0 4 7 3 • 4 2 3 7 6 • 4 0 1 5 4

  7. Spatial Data Structures • Used to organize geometry in n-dimensional space (2 and 3D are of this course’s interest) • For accelerating queries – culling, ray tracing intersection tests, collision detection • They are mostly hierarchy by nature • Topics: • Bounding Volume Hierarchies (BVH) • Binary Space Partitioning Trees (BSP trees) • Octrees

  8. Anwendungen für Objekthierarchien • Culling • Raytracing • Radiosity • Navigation

  9. Binary Space Partitioning (BSP) Trees • Main purpose – depth sorting • Consisting of a dividing plane, and a BSP tree on each side of the dividing plane (note the recursive definition) • The back to front traversal order can be decided right away according to where the eye is back to front: A->P->B P BSP A BSP B back to front: A->P->B

  10. BSP Trees (cont’d) • Two possible implementations: Axis-Aligned BSP Polygon-Aligned BSP Intersecting?

  11. 0 1a 1b B A C 2 D E Axis-Aligned BSP Trees • Starting with an AABB • Recursively subdivide into small boxes • One possible strategy: cycle through the axes (also called k-d trees) D E B 2 1b 1a A C 0 Q: objects intersect the boundaries?

  12. A B C D E F Polygon-Aligned BSP Trees • The original BSP idea • Choose one divider at a time – any polygon intersect with the plane has to be split • Done recursively until all polygons are in the BSP trees • The back to front traversal can be done exact • The dividers need to be chosen carefully so that a balanced BSP tree is created F B C A D E result of split

  13. Octrees • Similar to Axis-Aligned BSP trees • Each node has eight children • A parent has 8 (2x2x2) children • Subdivide the space until the • number of primitives within • each leaf node is less than a • threshold • Objects are stored in the leaf • nodes

More Related