Presentation is loading. Please wait.

Presentation is loading. Please wait.

Rendering Engine Basics CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia.

Similar presentations


Presentation on theme: "Rendering Engine Basics CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia."— Presentation transcript:

1 Rendering Engine Basics CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia

2 Real-Time Rendering 2 David Luebke Ewen Cheslack-Postava: ATI 1800XT demos Demo Time

3 Real-Time Rendering 3 David Luebke The Rendering Engine Job: render the scene (duh) –From camera –From other viewpoints ( why? )

4 Real-Time Rendering 4 David Luebke The Rendering Engine Job: render the scene (duh) –From camera –From other viewpoints ( why? ) Shadow maps Render to texture e.g. for reflection maps –Multiple times from the same viewpoint ( why? )

5 Real-Time Rendering 5 David Luebke The Rendering Engine Job: render the scene (duh) –From camera –From other viewpoints –Multiple times from the same viewpoint ( why? ) Multipass shaders with blending (show Enemy Territories video) Z-only pass Deferred shading –With different settings ( why? )

6 Real-Time Rendering 6 David Luebke The Rendering Engine Job: render the scene (duh) –From camera –From other viewpoints –Multiple times from the same viewpoint –With different settings ( why? ) May not need color (Z-only pass, shadow maps) Low-res texture and/or geometry LOD may be okay May need different render target, resolution, viewport, GL state…

7 Real-Time Rendering 7 David Luebke Rendering Engine Concepts Need to support several ways of accessing scene –Functional/relational/hierarchical The scene graph –Spatial For example, for culling or (rough) front-to-back sorting –Material Sorted by state for efficient issue to GPU Need to support updating object pose, deformation

8 Real-Time Rendering 8 David Luebke Rendering Engine Concepts Need to support several ways of accessing scene –Functional/relational/hierarchical –Spatial –Material Interacts with other components! –Physics engine (e.g., collision detection) –Animation engine (e.g., IK, animation cycles) –AI engine (e.g., sightlines)

9 Real-Time Rendering 9 David Luebke The Scene Graph A hierarchy representing objects and relationships –The gun on the turret on the tank –The hand on the forearm on the upper arm on the trunk –The mouse on the cheese on the table Typically represented as a DAG ( what’s that? ) –Arcs represent relationships, sometimes xforms –Nodes represent objects, groupings of objects, sometimes properties of objects – What kind of things might nodes represent?

10 Real-Time Rendering 10 David Luebke Scene Graph Node Examples Objects Groups of objects LOD selectors Animation “effectors” –“Flipbook” animation selectors –Transform drivers –Deformers –Skeletal animation players Transforms Useful state –Bounding boxes, partitions Graphics state –Which textures, shaders bound –Material –Other state - glEnable(GL_FOO) “Raw” geometry –Vertices and triangles Note: often actual geometry only exists at leaves

11 Real-Time Rendering 11 David Luebke Scene Graph Traverals Classical use of scene graph: –Traverse in depth-first fashion –Apply effects of “action” nodes when reached LOD selectors, animation effectors –Push/pop matrices when reach/leave xform nodes –Issue geometry as reached Not very efficient for complex scenes ( why? ) –Unnecessary pushing/popping –Constantly switching graphics state –No spatial organization –Lots of recalculation for multiple passes


Download ppt "Rendering Engine Basics CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia."

Similar presentations


Ads by Google