The LOD.txt technique converts .FBX models to .TRAINZMESH game files. Using the configuration command, the models will be converted to the format. Here we will show what the command looks like and what and what the commands mean.
In the first case, we have to create individual models, which will gradually be depleted in the number of polygons. This can be achieved, for example, by Preoptimization in 3ds max, where the texture of the model is preserved, but the number of polygons is reduced by a percentage. Here for this example I will create four separate models (House0 = which has 100% polygons and up to House3 = which has 1% polygons)
version 1.0
offset = 0.001;
calcPoint = center;
multiplier = 1;
animationCutOff = 0.0;
renderCutOff = 0.00;
attachmentCutOff = 0.0;
mesh("0.005")
{
name="house3.trainzmesh";
}
mesh("0.1")
{
name="house2.trainzmesh";
}
mesh("0.6")
{
name="house1.trainzmesh";
}
mesh("1.0")
{
name="house0.trainzmesh";
}
version 1.0 | Must be included but for internal use only;leave value as 1.0 |
offset = 0.001; | The offset that prevents “popping” between two levels of of detail repeatedly |
calcPoint = center; | The position where the level of detail is calculated from (center,near,far) |
multiplier = 1; | A level of detail multiplier (leave as 1.0) |
animationCutOff = 0.0; | The level of detail where animation stops (to screen width) 1.00 = full width, 0.5 = half screen, 0.00 = never stop animation |
renderCutOff = 0.00; | The level (to screen width) where rendering stops (no longer visible) |
attachmentCutOff = 0.0; | The level where Cull flagged attachments are dropped (to screen width) *See note below Note: Meshes referenced within a LOD file must be in ascending width order. |
mesh(“0.005”) | When the mesh is displayed at 0.005 of the screen, the mesh “house3.trainzmesh” is displayed. Note: the figure is just bigger than the attachment cut off figure above. This ensures the modeled bogeys in this LOD mesh are rendered before the actual bogeys are culled. |
mesh-table
{
mesh
{
auto-create 1
mesh "lod.lm"
effects
{
...
}
}
}