Actor Level of Detail

Actor Level of Detail (or LOD) is the method of replacing high poly actors with lower poly actors as they get farther away from the camera and even replacing it with an image when the distance gets large enough. This can be setup to happen automatically in Reality Factory by defining certain things properly.

The lower poly actors (known as LOD actors) must be named in a special way in order for the Actor Manager to use them. There can be up to 3 LOD actors defined for one particular actor and each will be rendered at a specified distance. For example, if your base actor is named soldier.act then the LOD actors must be named like this:

soldier_LOD1.act highest poly version of LOD actors - LOD actor 1
soldier_LOD2.act lower poly version of LOD actors - LOD actor 2
soldier_LOD3.act lowest poly version of LOD actors - LOD actor 3

If you wish to replace the actor with an image at a certain distance then the image, which is a TGA file, must be defined as:

soldier_LOD.tga

and must be placed in the same folder as the actors.

The distances from the camera that the LOD actors (and image) will be rendered is set in the EnvironmentSetup entity. Pawns can set their own LOD distances using a script command that will override the default distances. See the High Level Pawn Script Methods section for information on the SetLODDistance command.

If all LOD distances are set to 0 or the EnvironmentSetup entity is missing then no actor LOD will be done. If a particular LOD distance is set to 0 then that LOD will be ignored when selecting which actor to render. The LOD distances are as follows:

LOD distance 1 after this distance render LOD actor 1
LOD distance 2 after this distance render LOD actor 2
LOD distance 3 after this distance render LOD actor 3
LOD distance 4 after this distance render LOD bitmap
LOD distance 5 after this distance do not render anything

LOD distance 5 is like a far clip plane for actors in that after this distance no actors will be rendered. If a LOD actor is not defined for a particular distance then the actor from the previous distance will be used instead. This allows you to define less than 3 LOD actors and still get some LOD benefits.

The image is scaled by the same amount that the actor is scaled so it will always remain the same relative size to the actor. As the distance from the camera increases from LOD distance 4 to LOD distance 5 the alpha of the bitmap will decrease and it will slowly fade away.

In the EnvironmentSetup entity there is also a LODAnimation flag that is used to control where the animation information for the LOD actors comes from. If this flag is false (the default state) then the animation information is taken from the base actor. In this mode the LOD actors don't require any built-in animation data. If the flag is true then each LOD actor must supply its own animation information.