Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS475 3D Game Development Level Of Detail Nodes (LOD)

Similar presentations


Presentation on theme: "CS475 3D Game Development Level Of Detail Nodes (LOD)"— Presentation transcript:

1 CS475 3D Game Development Level Of Detail Nodes (LOD)
Roger Webster, Ph.D. D&E Communications Computer Science Wing Caputo Hall Dept. of Computer Science Millersville University Millersville, PA Some info & images from: University of Wisconsin - CS679 Copyright © 2016 Roger Webster, Ph.D.

2 Level of Detail Nodes (LOD)
When an object is close to the viewer, we want a high resolution model Maybe thousands of polygons, high-resolution textures When an object is a long way away, it maps to relatively few screen pixels, so we want a low resolution model Maybe only a six polygons, or tens of polygons Level of Detail (LOD) techniques draw models at different resolutions depending on their relevance to the viewer Covers both the generation of the models and how they are displayed A large research topic

3 Images from: University of Wisconsin - CS679
Sample LOD Models Images from: University of Wisconsin - CS679

4 Sample LOD Models

5 Standard LOD The current standard for LOD in games is to use a finite set of models Models may be hand generated or come from automatic decimation or simplification of the base mesh (highest resolution) Models are switched based on the distance from the object to the viewer, or projected screen size Better metric is visual importance, but it is harder to implement For example, objects that the viewer is likely to be looking at have higher resolution, objects at periphery have lower resolution

6 LOD Models Medium resolution model High resolution model
Low resolution model

7 LOD Sub-problems LOD Generation: Creating the different resolutions
Best method is to do it by hand Otherwise, automatic simplification algorithms, of which there are many Selection: Choosing which model to display Simple per-object methods, like distance Complex global methods for optimizing cost/benefit Switching: Moving from one resolution to the next without artifacts Just pop between them Various blending methods

8 LOD Switching The biggest issue with switching is popping, the sudden change in visual appearance as the models are swapped Particularly poor if the object is right at the switching threshold – may flicker badly There are several options: Leave the popping but try to avoid flicker Show a blended combination of two models, based on the distance between the switching points Image blend – e.g. render both models for a transition period Geometric blend – define a way to geometrically morph from one model to the next, and blend the models Have more models that are so similar that the popping is not evident

9 Selecting LOD Models For any given frame, we have to decide which model to display for each object Assume that we have a discrete set of models for each object, at varying resolutions Option 1: Choose each model for each object independently based on some error tolerance Typically assume error depends on distance from viewer or similar The current standard practice: fast, simple Potential problem: You still might have too many polygons, in total Option 2: Choose a number of polygons you can display, and find a set of models that lead to minimum error Ensures near constant frame rate, but harder to implement

10 LOD for Animated Characters
Character->GetDetail() Character->SetDetail(d) Cal3D provides automated LOD generating and rendering

11 Switching Thresholds Distance: Simply compute the distance from the viewer to a representation point on (in) the object Projected Area for spherical bounds Store the “radius” of the object Compute distance in viewing direction Scale by near clip plane distance (why?) Estimated projected area is: Projected area for bounding cubes have a different method

12 LOD Mesh Simplification
Take a high resolution base mesh and approximate it while retaining its visual appearance Desirable properties: Fast (although not real-time) Generates “good” approximations in some sense Handles a wide variety of input meshes Allows for geometric blending from one mesh to another Two essential questions: What operations are used to reduce the mesh complexity? How is “good” measured and used to guide the approximation?

13 Mesh Operations Operations seek to eliminate triangles while maintaining appearance Key questions: What does the operation do? Can it connect previously unconnected parts of the mesh? Does it change the mesh topology? How much does it assume about the mesh structure? Must the mesh be manifold (locally isomorphic to a disc)? Can it handle, or does it produce, degenerate meshes? Can it be construed as a morph? Can it be animated smoothly?

14 Vertex Clustering Partition space into cells
grids [Rossignac-Borrel], spheres [Low-Tan], octrees, ... Merge all vertices within the same cell triangles with multiple corners in one cell will degenerate Slide from Michael Garland,

15 Vertex Decimation Starting with original model, iteratively
rank vertices according to their importance select unimportant vertex, remove it, retriangulate hole A fairly common technique Schroeder et al, Soucy et al, Klein et al, Ciampalini et al Slide from Michael Garland,

16 Iterative Contraction
Contraction can operate on any set of vertices edges (or vertex pairs) are most common, faces also used Starting with the original model, iteratively rank all edges with some cost metric contract minimum cost edge update edge costs Slide from Michael Garland,

17 Edge Contraction Single edge contraction (v1,v2)  v’ is performed by
moving v1 and v2 to position v’ replacing all occurrences of v2 with v1 removing v2 and all degenerate triangles v’ v2 v1 Slide from Michael Garland,

18 Vertex Pair Contraction
Can also easily contract any pair of vertices fundamental operation is exactly the same joins previously unconnected areas can be used to achieve topological simplification Slide from Michael Garland,

19 LOD Nodes


Download ppt "CS475 3D Game Development Level Of Detail Nodes (LOD)"

Similar presentations


Ads by Google