190 likes | 312 Views
Background Caches for Large Outdoor Scenes. Bill Hess. Motivation:. Motivation:. View Frustum. Volume enclosed by 6 planes Objects outside the frustum are not drawn Back plane decides how deep the scene is. Problem: Depth Buffer. Geometry depth is stored at every pixel
E N D
View Frustum • Volume enclosed by 6 planes • Objects outside the frustum are not drawn • Back plane decides how deep the scene is
Problem: Depth Buffer • Geometry depth is stored at every pixel • Allows objects to be drawn in any order • Allows objects to intersect each other • Depth buffer precision is fixed in hardware • Multiple scene depths can map to one depth buffer value • As the back plane is pushed back, the range of values that can map to the same depth value increases
Problem: Projection • View Frustum volume increases with the cube of the scene depth • Potentially 8 times more geometry to draw just to double scene depth
Solution • Draw backgrounds less frequently • Draw background as a flat image • Common methods • Render/Draw backgrounds ahead of time • Render backgrounds into a texture at run-time
Skybox • Scene surrounded by a textured cube • Cube is textured with a backdrop representing the background • Cube does not move with the scene • Appears “infinitely” far away
Skybox limitations • Players can never reach the background • Gap between foreground and background • No parallax effect • Really only good for… sky.
3D Skybox • Used in Valve’s Source engine • Background geometry is drawn to 1:16 scale in a hidden part of the map • Camera is placed into the “skybox” to render the background • Use the depth buffer twice • Background is only a mockup, not explorable
Related Research • Pre-Computed backgrounds • Scene is broken into view-cells • Backgrounds are stored on disk • City walkthrough • Buildings are rendered to flat Impostors • Camera is constrained to street tracks
Layered Depth Images • Render scene but record multiple colors and depths at each pixel • Use inverse camera transformation to reposition each pixel for a new camera angle • Parallax effect • Hidden surfaces are revealed • Storage required equal to depth complexity of the image (max number of overlapping objects)
Goal • Dynamically generate background images • Show parallax for view changes • Transition between background and foreground • Work in real-time • Combination of Skybox and Layered Depth Image
Work So Far • Recreate the problem