3D Lingo Dictionary > L-N > lod (modifier) |  |

lod (modifier)

Syntax

    member(whichCastmember).model(whichModel).lod.lodModifierProperty

Description

3D modifier; dynamically removes detail from models as they move away from the camera.

This modifier can only be added to models created outside of Director in 3D modeling programs. The value of the `type` property of the model resources used by these models is `#fromFile`. All such models use detail reduction whether or not the `lod` modifier is attached. Attaching the modifier allows you to control the properties of detail reduction. The modifier cannot be added to primitives created within Director.

The `lod` modifier data is generated by 3D modeling programs for all models. Setting the `userData` property `"sw3d_no_lod = true"` allows you to specify that the `lod` modifier data and memory be released when streaming is complete.

Be careful when using the `sds` and `lod` modifiers together, because they perform opposite functions (the `sds` modifier adds geometric detail and the `lod` modifier removes geometric detail). Before adding the `sds` modifier, it is recommended that you disable the `lod.auto` modifier property and set the`lod.level` modifier property to maximum resolution, as follows:

    member("myMember").model("myModel").lod.auto = 0
    member("myMember").model("myModel").lod.level = 100
    member("myMember").model("myModel").addmodifier(#sds)

The `lod` modifier has the following properties:

auto allows the modifier to set the level of detail reduction as the distance between the model and the camera changes. The value of the modifier's `level` property is updated, but setting the `level` property will have no effect when the `auto` property is set to `TRUE`.

bias indicates how aggressively the modifier removes detail from the model when the modifier's `auto` property is set to `TRUE`. The range for this property is from 0.0 (removes all polygons) to 100.0 (removes no polygons). The default setting for this property is 100.0.

level indicates the amount of detail reduction when the modifier's `auto` property is set to `FALSE`. The range of this property is 0.0 to 100.00.

Note: For more detailed information about these properties, see the individual property entries.

See also

`sds (modifier)`, `auto`, `bias`, `level`, `addModifier`