L3DT Map Making
L3DT is a Windows application for generating terrain maps and textures. It is intended to help game developers and digital artists create vast high-quality 3D worlds.
This page will teach you how to export an L3DT terrain into Rigs of Rods version 0.4.8.0+.
Please read everything carefully and do not skip any steps.
- L3DT (Standard or Professional) (Pro 16.05 will be used here)
- GIMP 2.10
- DDS plugin for GIMP (This page will not show you how to install it, ask Google)
- A brain, some basic computer knowledge, and some patience
For this tutorial, I will assume you already have a ready-to-export terrain in L3DT.
This is a simple 1024x1024 terrain generated by L3DT's "Design Map" feature.
I've uploaded the project files here for reference.
You may only be able to open the project file in the Pro version due to it using 4096x4096 textures.
Start by downloading a template terrain. For simplicity sake, choose the
Once downloaded, extract the zip into any folder.
simple2_asphalt_normalheight.dds as you will not be needing them.
Rename the files to what you'd like your terrain to be named (for this tutorial I will just name it
Now open all the files in Notepad++ by selecting them then right click ->
Edit with Notepad++
CTRL+F to open the Find menu, then switch to the
Set "Find what" to
template_04_raw and "Replace with" with your terrain name, then click
Replace All in All Opened Documents.
If successful, you should see something similar to
Replace in Opened Files: 5 occurrences were replaced.
Save All to save your current files.
We're ready to export the heightmap now.
Exporting the heightmap
In L3DT, right click the
Heightfield layer ->
Set the "File format" to
... button to browse to where your terrain files are located. Name the file the same as you did previously (i.e.
Now check the
Re-size for export box and set the Width and Height to the same values as you did when you generated the terrain (i.e. 1024x1024).
You should now have a
.raw file in your working directory.
The OTC file
Now go back to Notepad++ and open
l3dt_tutorial.otc. The file will look similar to this:
Heightmap.0.0.raw.size=5 Heightmap.0.0.raw.bpp=2 Heightmap.0.0.flipX=0 WorldSizeX=3000 WorldSizeZ=3000 WorldSizeY=0 disableCaching=1 PageFileFormat=l3dt_tutorial-page-0-0.otc MaxPixelError=0 LightmapEnabled=0 SpecularMappingEnabled=1 NormalMappingEnabled=1
Size of your heightmap. For this terrain, it is
Bytes per pixel (1 = 8bit, 2=16bit). Leave this at
If the terrain heightmap needs to be flipped. since L3DT doesn't export the heightmap upside down leave this at
Size of the terrain. Since this is a 1024x1024 terrain, set both to
Maximum height of the terrain. To get this value, in L3DT go to
Change vertical range....
Add the non-negative minimum value to the maximum value.
If you get a decimal, you should be safe to round it (i.e.
This prevents the game from caching the heightmap. For testing purposes, leave it at
Name of the file that defines the terrain textures. Since we already renamed it earlier, there's no need to change this.
MaxPixelError=0 LightmapEnabled=0 SpecularMappingEnabled=1 NormalMappingEnabled=1
Advanced heightmap/texture settings, it's best to leave these at their current values.
The finished file:
Heightmap.0.0.raw.size=1024 Heightmap.0.0.raw.bpp=2 Heightmap.0.0.flipX=0 WorldSizeX=1024 WorldSizeZ=1024 WorldSizeY=139 disableCaching=1 PageFileFormat=l3dt_tutorial-page-0-0.otc MaxPixelError=0 LightmapEnabled=0 SpecularMappingEnabled=1 NormalMappingEnabled=1
We're ready to export the textures now.
Texture map ->
Set the "File format" to
Just as you did previously, browse to your terrain directory and set the file name (i.e.
Re-size for export box and set your texture size (in this case,
Now right click
Terrain normals ->
Export layer... and repeat the same steps as last time.
You should now have two textures in your working directory.
Applying alpha mask
To prevent the terrain texture from being overly shiny in-game, you will have to apply an alpha mask to both the texture map and the normal map. To do this, open both textures in GIMP.
Add Layer Mask...
Black (full transparency) then click
Now go to
Change the file extension to
.dds then click
If you installed the DDS plugin correctly, you should now have a
Save as DDS dialog.
BC3 / DXT5 then click
OK to export.
Repeat the same steps for the normal map texture.
Once you're done, you should have two new DDS files in your working directory.
You can now delete the two PNG textures we exported earlier as they're no longer needed.
The page file
l3dt_tutorial-page-0-0.otc. The file will look similar to this:
l3dt_tutorial.raw 1 ; worldSize, diffusespecular, normalheight, blendmap, blendmapmode, alpha 4, simple2_asphalt_diffusespecular.dds, simple2_asphalt_diffusespecular.dds
The name of your heightmap RAW file. Since we already renamed it earlier, there's no need to change this.
The number of texture layers. Since we only have 1 layer, leave it at
4, simple2_asphalt_diffusespecular.dds, simple2_asphalt_diffusespecular.dds
The size of your terrain. It typically is the same as the
WorldSizeX/WorldSizeZ values. So in this case,
The names of your texture map and normal map. For this terrain, they are named
The finished file:
l3dt_tutorial.raw 1 ; worldSize, diffusespecular, normalheight, blendmap, blendmapmode, alpha 1024, l3dt_tutorial.dds, l3dt_tutorial_normal.dds
The Terrn2 file
The last file we need to edit is the
l3dt_tutorial.terrn2 file. It will look similar to this:
[General] Name = Template 0.4 (RAW Heightmap) Terrain GeometryConfig = l3dt_tutorial.otc Water=0 #WaterLine=1.0 AmbientColor = 0.93, 0.86, 0.76 StartPosition = 512, 1, 512 #CaelumConfigFile = SandStormCubeMap = tracks/skyboxcol Gravity = -9.81 CategoryID = 129 Version = 1 GUID = 995a989c-28a7-4836-b5fe-bc699b81b97b //TractionMap = l3dt_tutorial-landuse.cfg [Authors] template = CuriousMike [Objects] l3dt_tutorial.tobj= [Scripts]
Name = Template 0.4 (RAW Heightmap) Terrain
The name of your terrain. In this example, I will name it
L3DT Tutorial Terrain V2.
GeometryConfig = l3dt_tutorial.otc
The filename of your terrain's main OTC file. Since we already renamed it earlier, there's no need to change this.
If your map has water, set this to
1. Otherwise, leave it at
If your terrain doesn't have water, skip this step. Otherwise, remove the
# from the beginning of the line.
To get this value, go back to the
Change vertical range... dialog you got the minimum/maximum height values from earlier.
The non-negative minimum value is your
WaterLine value. For this terrain, it is
Again, you should be safe to round it.
AmbientColor = 0.93, 0.86, 0.76 StartPosition = 512, 1, 512 #CaelumConfigFile = SandStormCubeMap = tracks/skyboxcol Gravity = -9.81 CategoryID = 129 Version = 1
These values can currently be left as is.
GUID = 995a989c-28a7-4836-b5fe-bc699b81b97b
The ID that uniquely identifies your terrain. You can generate one here.
//TractionMap = l3dt_tutorial-landuse.cfg
The file that defines the different ground types. Since we don't currently have one, leave it commented out.
[Authors] template = CuriousMike
The authors of the terrain. Just set your username. For example
terrain = CuriousMike.
The name of your objects file. Since we already renamed it earlier, there's no need to change this.
The AngelScript filename. Since we don't have one, just ignore this.
And finally, zip all your files up and place them into your
Now launch RoR and load your terrain!
If everything went well, your terrain should look almost indentical to how it does in L3DT's Sapphire:
Changing the spawn position
When you loaded the terrain, you most likely spawned in the water or on the side of a mountain.
To fix this, move RoRBot to where you'd like to spawn at.
Then press the
h key. This is will log the current position to
Now browse to
C:\Users\%username%\Documents\Rigs of Rods 0.4\logs and open the
Scroll to the bottom of the file. You should find a line similar to this:
22:21:51: Position: 885.289, 113.769, 586.640, 0.0, 0.0, 0.0
Now open your
.terrn2 file and find the
StartPosition = 512, 1, 512
Copy the first 3 numbers from the position line, for example:
StartPosition = 885.289, 113.769, 586.640
Save the file and launch RoR. You should now spawn in the position you set.
Congratulations! You have learned how to get your L3DT terrain in-game!
Download the finished terrain here.
Stream size does not match calculated image size
Ogre::InvalidParametersException::InvalidParametersException: Stream size does not match calculated image size
Heightmap.0.0.raw.size value does not match the size of your exported raw file. Make sure the size you set in the export dialog is the same.
In-game world scale doesn't match the L3DT terrain
Q: My terrain isn't sized correctly in-game!
A: Make sure your
WorldSizeZ matches the size in L3DT. Also check if you calculated the
WorldSizeY value correctly.
Terrain texture is solid black
Q: My terrain's textures appear as solid black in-game!
A: Your texture names in your page file don't match the filename.
Terrain texture is shiny
Q: My terrain's texture is very shiny in-game!
A: You didn't apply the alpha mask in GIMP correctly.
RoR crashes while loading the terrain
Q: My game crashes when I try to load my terrain!
A: Check all your files and make sure you didn't make any syntax errors. You can also check your
RoR.log to see where the crash occurs at.
Q: My issue isn't listed, please help!
A: If you have a different issue than the one listed here and you're sure you didn't do anything obviously wrong,
then please make a thread in the correct subforum or join our Discord server and ask your question in the