Level of Detail (LOD)
Description
This chapter briefly describes Level Of Detail techniques supported by Candera.
Chapters
See also:
Example Solution:
Introduction
Level of Detail
Level of detail (LOD) is a discipline of interactive computer graphics attempts to bridge complexity and performance by regulating the amount of detail used to represent the virtual world.
(Level of Detail for 3D Graphics, David Luebke, Morgan Kaufmann Publisher, 2003)

Picture source: http://milkostoev.co.uk/2009/01/cobra-gt500/cobragt500wire
Motivation
Reduce render complexity in order to increase runtime performance with minimal or without visual penalty
Detail Simplifications
Level of Detail - Geometry Reduction Types
Discrete LOD
Continuous or progressive LOD
View-dependent LOD

Picture source: http://research.microsoft.com/en-us/um/people/hoppe/proj/vdrpm/default.htm
Level of Detail - Chain
Typical LOD Chain
The following figure depicts a typical LOD chain:

Candera - Discrete LOD Concept
Candera::LodNode, LoD Level
The class Candera::LodNode implements discrete LOD technique. Any Candera class derived from class Candera::Node is accepted as LOD representation.
Each LOD level in Candera::LodNode defines:

Picture source: http://www.opensg.org/wiki/Tutorial/OpenSG1/NodeCores
LOD Render Strategy
The LOD render strategy defines the transition between adjacent LOD levels.
LOD Criterion
The LOD criterion delivers a source value to map onto the LOD nodes visibility boundaries.
Candera - LOD Render Strategy
Discrete LOD Render Strategy

Blend Transition LOD Render Strategy

Candera - LOD Architecture Overview

Example - LOD in SceneComposer
Example - Level of Detail in SceneComposer
This chapter shows a typical LOD use case and explains how the transition from two different LODs can be realized with CGI Studio SceneComposer.
To experiment with LOD transition, the following can be used:
Use Case
The example solution is based on following use case:
You can experiment with following node properties:
See also:
Example - Blended LOD
Blended LOD
Change CameraDistance or start CameraPosition animation to see the smooth transition.
In application code the LodNode is set up as follows:
Initializing the LodNode
// init LodNode bounds
static_cast<void>(lodNode->SetLodLevel(0, lodNode->GetLodLevel(0).node, m_lowBoundHigh, m_upBoundHigh));
static_cast<void>(lodNode->SetLodLevel(1, lodNode->GetLodLevel(1).node, m_lowBoundLow, m_upBoundLow));
// end init
Define Criterion and RenderStrategy
// Define DistanceToCameraLodCriterion and BlendLodRenderStrategy
static DistanceToCameraLodCriterion cameraLodCriterion; // LOD is automatically selected by distance to camera.
static BlendLodRenderStrategy blendLodStrategy; // LOD is automatically blended between non-adjacent boundaries
// End Define DistanceToCameraLodCriterion and BlendLodRenderStrategy
Link pieces together
// Init BlendLodRenderStrategy and set to LodNode
blendLodStrategy.SetLodCriterion(&cameraLodCriterion);
lodNode->SetLodRenderStrategy(&blendLodStrategy);
// End Init BlendLodRenderStrategy and set to LodNode
Example - Step-wise LOD
Step-wise LOD
Change CriterionValue property appropriate to see the transition.
In application code the LodNode is set up as follows:
Initializing the LodNode
// init LodNode bounds
static_cast<void>(lodNode->SetLodLevel(0, lodNode->GetLodLevel(0).node, m_lowBoundHigh, m_upBoundHigh));
static_cast<void>(lodNode->SetLodLevel(1, lodNode->GetLodLevel(1).node, m_lowBoundLow, m_upBoundLow));
// end init
Define Criterion and RenderStrategy
// Define GenericLodCriterion and DiscreteLodRenderStrategy
static GenericValueLodCriterion genericLodCriterion; // Application defined criterion value can be set.
static DiscreteLodRenderStrategy discreteLodStrategy; // Stepwise LOD switch.
// End Define GenericLodCriterion and DiscreteLodRenderStrategy
Link pieces together
// Init DiscreteLodRenderStrategy and set to LodNode
genericLodCriterion.SetCriterionValue(m_criterionValue); // Set application defined criterion value.
discreteLodStrategy.SetLodCriterion(&genericLodCriterion);
lodNode->SetLodRenderStrategy(&discreteLodStrategy);
// End Init DiscreteLodRenderStrategy and set to LodNode
Example - Set LOD directly
Set LOD directly
// Create LodNode object with 2 empty LOD levels. m_lodNode = LodNode::Create(2); // Set LOD 0 active and deactivate LOD 1. No RenderCriterion is attached. m_lodNode->GetLodLevel(0).node->SetRenderingEnabled(true); m_lodNode->GetLodLevel(1).node->SetRenderingEnabled(false);