ADD LOD TO OBJECT This command adds two additional mesh levels to an existing object.
Syntax
    ADD LOD TO OBJECT Object Number, LOD Object, LOD Level, LOD Distance
Parameters
    Object Number
Integer Object number of the main model
    LOD Object
Integer Object number of the object holding the new LOD mesh data
    LOD Level
Integer LOD level to assign the mesh data to. Use a value of zero for the medium LOD and a value of one for the lowest LOD level
    LOD Distance
Float The distance at which this LOD level is used in the scene
Returns
This command does not return a value.
Description
The two additional models must be created from the same source and almost identical except for a different number of vertices. When modelling an object, these additional files are created by reducing the complexity of the polygons and saving out a simpler shape.
Example Code
    sync on : sync rate 60

    ot=1

    load object "trunk_LOD1.X",ot

    dist=500

    load object "trunk_LOD2.X",ot+1

    add lod to object ot,ot+1,0,dist

    load object "trunk_LOD3.X",ot+2

    add lod to object ot,ot+2,1,dist*2

    delete object ot+1

    delete object ot+2

    load image "trunk.tga",1

    texture object 1,1

    do

    center text screen width()/2,20,"USE ARROW UP AND DOWN TO CHANGE DISTANCE FROM TREE"

    center text screen width()/2,40,"POLYGONS = "+str$(statistic(1))

    control camera using arrowkeys 0,10,2

    sync

    loop
See also
GAMEFX Commands Menu Index