1 / 25

Real-Time Rendering

Real-Time Rendering. SPEEDING UP RENDERING Lecture 04 Marina Gavrilova. Brief Outline. Culling Hierarchical z-buffering Hierarchical Occlusion Map (HOM) Impostors and Nailboards Hierarchical image caching Level of Detail (LOD) Triangle Stripping. Culling.

stacey
Download Presentation

Real-Time Rendering

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. Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova

  2. Brief Outline • Culling • Hierarchical z-buffering • Hierarchical Occlusion Map (HOM) • Impostors and Nailboards • Hierarchical image caching • Level of Detail (LOD) • Triangle Stripping

  3. Culling • To cut-off non-visible objects at an early stage of the rendering pipeline • Backface culling: Most frequently used culling • Dot product of surface normal and view vector • Clustered Culling: Determine using 1 test whether a group of polygon is visible or not

  4. Hierarchical View Frustum Culling • Bounding Volume (BV): Volume that encloses a group of objects • Compute BV Hierarchy and store as Directed Acyclic Graph (DAG) or tree • Leaf holds actual geometry, parent BV contains several child BV • Most common BV: Sphere, Axis Aligned Bounding Box (AABB), Oriented Bounding Box (OBB) Hierarchy of BV is often called a Scene Graph

  5. Rendering Scene with Hierarchical BV • Child is explored for visibility only if parent is completely or partially visible

  6. BSP trees for static scene • Excellent for static scene • Takes a long time to compute • Efficient culling test • AABB based BSP: • Take one plane of the box • Divide objects into two sets • Subsequent division • Polygon Aligned BSP: • Choose one polygon as divider • Use the chosen polygons plane to divide into two partition • Recursively divide the rest

  7. Rendering scene using BSP • Polygon aligned BSP trees can be traversed to find back to front order of objects • Render back to front: no z-buffer needed • Render front to back: no need to redraw pixels • Pixel span: span of pixels in a row. • No need to draw pixel spans • BSP is also known as k-d trees in computational geometry

  8. Portal culling • Used in architectural design • Used in Computer games inside buildings with doors • Occluders are large walls • Compute Potentially visible set (PVS) from one point of view • Divide the entire scene into cells (i.e. room) • Doors and windows are called portals • Method 1: impose a BSP on cells (align the partitioning planes with the walls) • Method 2: Subdivide cells and identify portals and construct a cell-to-cell visibility data structure • Dramatic Speedup (up to 100 times) when scene is very complex with many walls

  9. Portal Culling (cont’d) • It is a refinement process (diminishing view frustum) • Reflection can be seen as another portal (with associated PVS) • Used in Nintendo 64

  10. Detail Culling • Object to Screen Pixel Ratio: The area of the projected BV of an object (in number of pixels) • Omit objects who’s Screen pixel ratio is too small • Replace object with simpler model when screen pixel ratio is low

  11. Occlusion Culling • Z-buffer is not sufficient for densely packed objects (i.e. a forest) • Occlusion culling saves rendering time by preventing occluded objects from being rendered • General algorithm:

  12. Hierarchical Z-buffering • Hierarchical Visibility Algorithm (HV) • Maintain scene model in an Octree • Maintain a z-pyramid for occlusion test • Recursively subdivide scene into octree boxes (until each leaf contains<k primitives) • In 2D  Quadtree representation • Takes too much time to be generated in runtime (only suitable for static scene)

  13. HV algorithm • To maintain z-pyramid recurse the furthest value • Upto 100 times less depth test than standard z-buffer

  14. Other HV based techniques • Hierarchical polygon tiling  Very Efficient • Without hardware implementation HV is too slow for real-time graphics • Take advantage of frame-to-frame coherence • Rendering antialiased scenes hierarchically without error bounds (Greene and Kass) • Visibility skeleton method (Durand)

  15. The Hierarchical Occlusion Map (HOM) algorithm • Another efficient algorithm • Occlusion is tested using two mechanism: • Depth Test • Overlap Test • Identify potentially good occluders (preprocessing)

  16. 64 x 64 16 x 16 32 x 32 The HOM Algorithm • Occlusion map

  17. The HOM algorithm • Hierarchy can be generated by hardware texture MIP maps • Test of occlusion is based on a threshold opacity

  18. Shadow Culling • Find small number of large occluders • Make use of separating planes and supporting planes

  19. Impostors • Impostor: image of a complex object that is texture mapped onto a rectangle • Renders faster than the object • Exploits frame-to-frame coherence • Objects rendered to a texture from a particular viewpoint • Rendered object is reused until the view point changes significantly • Great for particle systems and complex objects • Similar to billboards (dynamic/adaptive billboard)

  20. Nailboards • Nailboard: an Imposter frame with an attached z-buffer (RGB, =z WRT impostor quad) • Avoids visibility problems of impostors Real Object Impostors (without ) Nailboard (2 bit ) Nailboard (8 bit )

  21. Level Of Detail (LOD) • Simpler objects as the object moves further away from the camera • LOD is often equals to # of triangles • A more general measure for error metric is screen pixel ratio • Problem: When LOD changes popping effects occur

  22. Correcting LOD popping effect • Alpha LOD: increase transparency of object as distance increases • Object fades away • More continuous • Object becomes invisible • Geomorph LOD • Use different geometry and perform smooth geometric interpolation between LOD • Smooth continuous transition of LOD • Hard to implement

  23. LOD management • Define an error metric for the object LOD • Optimally refine object to improve accuracy • Restrict refinement operations to a constant amount per frame

  24. Triangle Stripping • Define triangles of an objects as continuous strip • Improves rendering performance • SGI algorithm (greedy) • Stripe algorithm

  25. End of Lecture 04 Questions?

More Related