TerrainModelFlags
Public / Constants
Culling
Perform visibility culling for the model?
Visibility culling uses the IModel.Collider object, which must be recreated each time the structure or geometry of a 3D model has changed. If a model is updated frequently, this flag can be used to avoid unnecessary computations.
ExpandZRange
Use the bounding sphere of the model to expand the Z-range that is used for rendering?
By default, the Z-range for rendering is calculated automatically, based on the distance between the camera and the visible horizon of the terrain. When this flag is present, the Z-range is extended (if necessary) so that it fully contains the bounding sphere of the model.
Since the renderer uses logarithmic Z-buffering, expanding the Z-range extensively is not a problem (e.g. to make it contain the Moon at realistic distance to the Earth).
Shadowing should be disabled when this flag is set, i.e. neither ShadowCaster nor ShadowReceiver should be set. For largely expanded Z-ranges, shadow mapping quality will be reduced significantly.
LightingAlways
Forces lighting to be enabled when rendering this model.
By default, lighting is enabled if any of the terrain layers has lighting enabled.
LightingNever
Forces lighting to be disabled when rendering this model.
By default, lighting is enabled if any of the terrain layers has lighting enabled.