Export an Object LOD

This page details the export of an object with multiple LODs.

rFactor 2 does not explicitly support LODs. We just setup multiple objects with the correct draw in and out distances and group them together for this to work.

Object Export

The first point is to setup the draw distances for the objects so that they switch at exactly the same time. This means that the "LOD Out" value in the exporter for LOD0 should be exactly the same as the "LOD In" value for LOD1.

Once these are set you can setup different objects settings for the different meshes if you desire. For example you may not require the LOD to cast a shadow, or it may use different ShadowGroup settings.

Please note though, there are certain settings that need to be per instance rather than per mesh. These include Render=False and Visgroup settings.

SCN Entry

The generated SCN output from the SCN will look something like this:

Instance=TyreStacksA001
{
  MeshFile=TyreStacksA001.gmt CollTarget=False HATTarget=False ShadowCaster=(Static, Solid) 
}
Instance=TyreStacksAL001
{
  MeshFile=TyreStacksAL001.gmt CollTarget=False HATTarget=False ShadowCaster=(Static, Solid)  ShadowGroups=(14)
}

We just wish to modify this so that they are all the LODs are inside same instance block, as well as ensure any unique tags for each LOD are on the same line for that mesh. We can put this into our main Scene SCN file. 

When we add the ObjectLodding=True line, then the first MeshFile will automatically becomes LOD0. The next MeshFile becomes LOD1 and so on.

By doing this the game will make sure that the LOD Distances are calculated from the same point for both meshes, regardless of differences in their placement or size. So be careful with this.

Instance=TyreStacksA001
{
  ObjectLodding=True
  MeshFile=TyreStacksA001.gmt CollTarget=False HATTarget=False ShadowCaster=(Static, Solid) 
  MeshFile=TyreStacksAL001.gmt CollTarget=False HATTarget=False ShadowCaster=(Static, Solid)  ShadowGroups=(14)
}

Please note that if the LODOut value for LOD0 is different to the LODIn value of LOD1 then you will be shown an error message when loading the track. You should make sure to correct these errors.