CalculateLevelOfDetailCenter

This command calculates the level-of-detail center at the centroid of the level-of-detail node.

Using This Command

Select a level-of-detail node and apply the command.

  1. Examine the hierarchy.
  2. Select the node[s] for which you wish to calculate level-of-detail center values.
  3. You must select only level-of-detail nodes.
  4. Right click and select Calculate Level-Of-Detail Center from the listed options.
  5. The level-of-detail center is calculated at the centroid of the node. This is a world coordinates position.

Figures

A level-of-detail node allows you to specify the distance from the camera at which any child nodes are switched on and off. The level-of-detail center is the point from which the camera distance is measured. Basically, the level-of-detail center is the reference point. When the center distance from camera exceeds the value set in the Switch Out parameter, the level of detail node no longer renders its contents. The level-of-detail "center" is usually set at the geometric center of the node, but this is not a requirement. The level-of-detail center must always be set in world coordinates!

Figure 1.1. You can see the bounding box. Its coordinates are Minimum -32,-32 ,0 and Maximum 32,32,0. The geometric center is at 0,0,16. [The algorithm for the center on X is (Minimum X / 2 + Maximum X / 2).] The level-of-detail Switch Out Distance is 64 units. This node will switch out when the camera is more than 64 units from the center position of 0,0,16. NOTE: You can set the center to any position. Level-Of-Detail Center

Figure 1.2. You can see the level of detail center and the spherical area of effect introduced by the level of detail test. The area of effect is spherical because the use of a center value creates a radius of visibility. The camera must be within the first circle to render the highest level of detail, and within the second circle to render the lower level of detail. After that, the node is invisible. Obviously, the size of the bounding box must be considered when setting the Switch Out Distance. Switching will be erratic/ineffective if the distances are not set correctly. Level-Of-Detail Center

Registration

Command registration information is as follows:

Category TypeInformation
ImplementationSCRIPT
ModuleLEVEL_OF_DETAIL.SSL
CategoryGroup Commands
GUID{1F91FABF-F612-46D4-A453-4B81096121A9}
Source NameCalculateLevelOfDetailCenter
Interface NameCalculate Center Values
CoreNo
SampleYes
AccessSelect a level-of-detail node and choose Modify » Level-of-Detail from the main menu or right click on a level-of-detail node.

See Also

For more information: