TerrainModelFlags
Description
Enumeration of 3D model flags.
These flags control visual aspects of a 3D model:
These flags control the model behaviour in the scene:
- See also
Public / Constants
Render
The 3D model will be visible in the 3D scene.
This flag controls whether the model will be rendered into the framebuffer.
ShadowCaster
The 3D model will cast a shadow.
This flag controls whether the model will be rendered into the shadow maps.
- See also
ShadowReceiver
The 3D model will receive shadows.
This flag controls whether shadow mapping will be active when rendering the model.
- See also
Culling
Perform visibility culling for the model?
Visibility culling uses the IModel.Bounds 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.
- See also
LightingNever
Forces lighting to be disabled when rendering this model.
By default, lighting is enabled if any of the terrain layers has lighting enabled.
- See also