Jump to content

Terrain 2 System Track Conversion Tutorial (0.37/0.39 >>> 0.4)


Helen Weales

Recommended Posts

Hello,


This is a tutorial explaining the conversion process for the old and new terrain systems for Rigs of Rods 0.36-0.39 (.terrn) to 0.4 (.terrn2).

 

Introduction
The tracks (terrains) we typically use in this community are very simple when compared to traditional RoR ones -- ours are basically models (mesh files) of arenas or pieces of land floating on either:

 

  • Nothing, which gives the illusion that you are driving in mid-air when outside of the arena/land

Or

  • A small tiled texture (such as concrete, grass or dirt), which is what you typically see if you were to venture outside of an arena.

 

"Normal" terrains (for example: Desert Trails) use heightmap images which determine flat land, valleys, peaks, etc. Because our track system is typically so simple, it is not necessary to follow the full conversion process.

First, let's look at what makes up a terrain for 0.37-0.39 --> 0.4+ (all of these can be edited with any text editor, I prefer WordPad):

 

  • terrn --> .terrn2: Every terrain needs this. This is what tells RoR there is a track to load -- it contains information such as the track name, spawn point position, object position, etc. This file system was replaced by a combination of both .terrn2 and  .tobj systems in versions .4.0 and up. These are likely all you will need to convert a basic track (read further).
  • cfg --> .otc: Contains info for terrain texture, heightmaps, world sizes, how the texture gets tiled, etc. This file system was replaced by the .otc system in version .4.0 and up. It is not required for a terrain to function.
  • os: This is the configuration file for the Caelum sky/weather, and is the same for all versions of RoR. It is also not a required file, especially if using a skybox model.
  • odef and .material: Technically these are not part of the terrain system, but you will see them. Think of them as extensions for .mesh files (props) -- ODEF tells RoR whether a prop is collidable or not, and what the surface will be (for example: dirt, concrete, asphalt, metal etc). Material files simply contain information for the prop textures and tells RoR how to use a texture (for example: if an object should be shiny, flat, transparent etc). These two file systems are used in every version of RoR so no changes are needed.

 

The conversion
This is very easy and likely only requires the creation of two new files, YourTrack.terrn2 (basic info) and YourTrack.tobj (prop positions).

Let's start with the main terrain file. Let's assume you want to convert an existing track named Houston2016.terrn. Create a new text file and name it Houston2016.terrn2. Copy and paste the following:

[General]
Name = Your Track
GeometryConfig = YourTrack.otc
Water=0
AmbientColor = 1, 1, 1
//CaelumConfigFile = YourTrack.os
StartPosition = 512 0 512
SandStormCubeMap = tracks/skyboxcol
Gravity = -9.81
CategoryID = 129
Version = 2
GUID = dc178e9c-840d-443f-b249-434433ae5fd0

[Authors]
terrain = Your Name

[Objects]
YourTrack.tobj=

 

Replace all instances of "YourTrack" with the name of the terrain you wish to convert (for example: "YourTrack" to "Houston2016"), along with the name of the track and the author's name as follows:

[General]
Name = Houston 2016
GeometryConfig = houston2016.otc
Water=0
WaterLine=0
AmbientColor = 1, 1, 1
//CaelumConfigFile = houston2016.os
StartPosition = 512 101 512
SandStormCubeMap = tracks/skyboxcol
Gravity = -9.81
CategoryID = 129
Version = 2
GUID = dc178e9c-840d-443f-b249-434433ae5fd1

[Authors]
terrain = Helen Weales

[Objects]
houston2016.tobj=

 

Next, create a text file named Houston2016.tobj. This is the file that determines where your track props will be placed. Copy the following from the old Houston2016.terrn, and paste it in Houston2016.tobj:

 

nNB5kkM.png

 

To

 

Lt2e3qy.png

 

If you want to alter the Caelum sky/weather settings (not required), the following is a template (an example of its filename would be "houston2016.os"):

caelum_sky_system Houston2016.terrn.os
{

    sun {
        ambient_multiplier 0.5 0.5 0.5
        diffuse_multiplier 3 3 2.7
        specular_multiplier 0.35 0.35 0.35

        auto_disable_threshold 0.05
        auto_disable true
    }

    moon {
        ambient_multiplier 0.2 0.2 0.2
        diffuse_multiplier 1 1 .9
        specular_multiplier 0.1 0.1 0.1

        auto_disable_threshold 0.05
        auto_disable true
    }

    sky_dome {
        haze_enabled no
        sky_gradients_image WhiteSky.png
        atmosphere_depth_image AtmosphereDepth.png
    }
}

 

Unfortunately I don't know anything about these settings, so alter at your own risk!

Something worth noting is the "StartPosition" line in the .terrn2 file. This controls where the first truck spawns. It's likely you will want to copy the first three set of numbers from the main model position coordinates (in the .tobj file). Alter as needed.

Place the new files in the track ZIP or folder (deletion of older files is not necessary and allows for the terrain to be compatible for all RoR versions). Next, open Rigs of Rods 0.4.5 and test the terrain to make sure everything works properly. That's it! A simple process that once learned, should only take a few minutes to complete.

 

One final note (not sure how to properly explain this so please bear with me): Your model must be COMPLETELY on or off the tiled portion of the world or else the part not on the tiled portion will be non-collidable. I don't know why this happens.

 

Once I figure out how to add mud I will update this tutorial. If anyone knows, please PM me.

 

Best of luck.

-HW

  • Upvote 6
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 2 weeks later...
  • 1 month later...
  • 1 month later...
  • 3 weeks later...
  • 6 months later...

Nevermind, I Found Out. Thanks For The Convert Help Helen!

 

I Went To Open 0.4.6 And 0.4.5 But Mesa2000New By Edy, Every Time It Was Loading Mesa Into Group Terrain Folder Or Whatever It Is, My Game Crashes. I Alt Esc And I See The Error Say "The Terrain Name Cannot Be Empty". How Do You Fix This?

Edited by MonsterJam4Lyfe
Something Stopped Working After Posting.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...