This page sets out to explain how the rFactor engine handles collisions. This can be separated into two categories. The first is the terrain, objects which the car can drive on (Roads, Grass etc).. The second is objects that they can collide into, but not really drive on (Barriers). With both, a model is required and a material assigned to that model effects which properties are used. These properties are defined in the TDF file, see references for more.

Terrain Collisions

Terrain Collisions are setup by exporting an object with the following properties:

Additionally if you wish to have a non visible mesh, you can export it with the following:

Instance=RaceSurface_001
{
  MeshFile=RaceSurface_001.gmt CollTarget=True HATTarget=True 
}

Modelling

For driveable surfaces we need to consider the "feel" of the surface when driving, ensuring we have sufficient polygons for RealRoad to render correctly, and for the game to run at optimal performance.

Limits

Polygon Density - Main Roads

Polygon Density - Other Surfaces

Object Optimisation

Materials

Each surface must be assigned a material, which matches a prefix for driveable surfaces in the TDF file for the track. You can see the options available in that file by looking under [FEEDBACK] sections, and seeing the materials listed. It is also possible to create new definitions for different scenarios, however here are some common prefixes:


If a material match is not made, the surface will not be driveable and there will be strange behaviour in game. This is a common issue with pit garages where the concrete floor does not have a TDF file definition.

Object Collisions

Collisions for objects are setup by exporting objects with the following properties:

Additionally if you wish to have a non visible mesh, you can export it with the following:

These can all be grouped together into a single instance too.

Instance=BarrierCollisions
{
  Render=False 
  MeshFile=NoDrive_COLL.gmt CollTarget=True HATTarget=False 
  MeshFile=ArmcoCol001.gmt CollTarget=True HATTarget=False 
  MeshFile=ArmcoCol002.gmt CollTarget=True HATTarget=False 
  MeshFile=ArmcoCol003.gmt CollTarget=True HATTarget=False 
  MeshFile=ArmcoCol004.gmt CollTarget=True HATTarget=False 
  MeshFile=ArmcoCol005.gmt CollTarget=True HATTarget=False 
  MeshFile=ArmcoCol006.gmt CollTarget=True HATTarget=False 
  MeshFile=ArmcoCol007.gmt CollTarget=True HATTarget=False 
  MeshFile=ArmcoCol008.gmt CollTarget=True HATTarget=False 
  MeshFile=ArmcoCol009.gmt CollTarget=True HATTarget=False 
} 

Modelling

Collision meshes should be kept as low poly as possible with out creating a disconnect between the visible object and collision object.

Materials

In a similar way to terrain objects, the material defines the properties of the collision when driven into. Typical material prefixes for this are:

Unlike with terrain objects, if a material is not found, the object will still collide with default parameters.

References