Typical terrain cfg file

From Rigs Of Rods

This is an Ogre3D file. For more information on the content of this file, see [1], but some parameters can not be changed in RoR, like the terrain size. Here is a typical RoR terrain cfg file:

# The main world texture
WorldTexture=nhelens.bmp

# The detail texture
DetailTexture=terrain_detail.jpg

#number of times the detail texture will tile in a terrain tile
DetailTile=3

# Heightmap source
PageSource=Heightmap

# Heightmap-source specific settings
Heightmap.image=nhelens.raw

# If you use RAW, fill in the below too
# RAW-specific setting - size (horizontal/vertical)
Heightmap.raw.size=1025
# RAW-specific setting - bytes per pixel (1 = 8bit, 2=16bit)
Heightmap.raw.bpp=2
# Use this if you want to flip the terrain (eg Terragen exports raw upside down)
Heightmap.flip=true

# How large is a page of tiles (in vertices)? Must be (2^n)+1
PageSize=1025

# How large is each tile? Must be (2^n)+1 and be smaller than PageSize
TileSize=129

# The maximum error allowed when determining which LOD to use
MaxPixelError=3

# The size of a terrain page, in world units
PageWorldX=3000
PageWorldZ=3000
# Maximum height of the terrain 
MaxHeight=281

# Upper LOD limit
MaxMipMapLevel=5

#VertexNormals=yes
#VertexColors=yes
#UseTriStrips=yes

# Use vertex program to morph LODs, if available
VertexProgramMorph=yes

# The proportional distance range at which the LOD morph starts to take effect
# This is as a proportion of the distance between the current LODs effective range,
# and the effective range of the next lower LOD
LODMorphStart=0.2

The parameter you have to change for a new terrain are:

  • WorldTexture: put the name of your terrain texture
  • Heightmap.image: put the name of you raw heightmap
  • MaxHeight: put the maximum height difference in your heightmap (because the heightmap is normalized). This should match the max height you used in Terragen to compute the terrain texture, or else the terrain shadows will be wrong.

You can also play with the DetailTexture and DetailTile to experiment new detail textures.

You must not change the dimensions of the terrain, or the resolution and type of the heighmap, as the collision system loads the heighmap independantly to the terrain manager.

Personal tools