Blender Race Track Tutorial
From Rigs of Rods Wiki
Contents |
Introduction
Hi I'm 3dracer01 I'll teach you on how to create a race track.
Programs
- Blender
- L3DT
- NASCAR 2003 Sandbox: Sandbox.zip
Sandbox Setup
- Extract the zip
- Run the setup
- go to the folder you installed it in and right click the icon and then click send to desktop
Sandbox Basics
- Zoom In: Z
- Zoom Out: X
- Actions: Right Click
- make your track using these keys
- there's not a lot of documentation on the program
- Export the track as .dxf
Track Resources
- NASCAR.com
- Google other tracks for specs
Blender
- Import the .dxf file
- Place a plane under the track in editmode
this part is from Blender Terrains
- select outer verts you want to bank and raise them up
Making the height Gradient
ok, now it gets trickier.
Add a Material
- Open the
MaterialPanel, to do this:- click on
shading - then the materials button
- click on
- click on the
Add NewButton to add a new material - under the
materialtab click onShadelessbutton
Add a Texture
Texture Tab
- Open the
TexturePanel- click on
shading - then the
texturebutton
- click on
- click on the
Add Newbutton to add a texture.- to change the name of the texture click on
Tex.001and type in a new name, in our caseheightwould be appropriate
- to change the name of the texture click on
- Next, select
Blendfrom theTexture Type"pulldown" menu.
Colors Tab
- Go under the color tab and click on the
Colorbandbutton. - There is a Field labeled
Awith a value of0.000, change the value to1.000 - Select the second color point by clicking on the white vertical band on the right of the colorband.
- change the color of the second colorpoint to white by making the
Rvalue1.000
Mapping the texture
- Now go back to the Materials
- under the Texture Tab make sure there is a check next to the name of the texture you just added.
- go into the
Map Inputtab - in the lower left of this tab you'll see the mappings, select Z for all of mappings
Cricky this is taking a long time to write!! but at least the texture is done now.
Making the Camera
- Go back into
Object Mode(
)
- Under the View menu select
ViewselectView Properties - Under
3D Cursorchange thex,y,zvalues to1.50,1.50,5.00. - press
spacebarand selectAdd->Camera - hit {{key|f9} or click the
editingbutton to and you'll see a camera tab. - click the
Orthographicbutton - change the value of scale to 3.00
Setting up the rendering
- press
f10to enter the scene panel - below the format tab change
SizeX, andSizeYto1025 - under that, there is a menu for the formats, it defaults
Jpeg. click on this pulldown and selectOpenEXR - select the
BWbutton below that
Phew!! good news is that at this point everything is basically set up! Save this file so you can use it as a starting point for future terrains.
For the lazy that just want to skip to this point here is a blender file saved at this point. Media:terntemplate.blend
Test Render
since everything is set up at this point lets do a test render. simply press f12 if a window pops up with some stats int he top with a gray image in the middle everything is working as it should.
Importing into L3DT
- File>Import>Heightfield find the .jpeg file and import
This part has been taken from the l3dt tutorial
Exporting to RoR
To convert your map to the Rigs of Rods format, you will have to first copy the files from the aspen map, aspen.cfg, aspen.jpg, aspen.raw, and aspen.terrn. I put these in a new folder, and renamed them mymap1.xxx. Go into the mymap.terrn, and remove everything. Replace with:
My map mymap.cfg 0.93, 0.86, 0.76 1828,15,2198.75, 1964,15,2140, 1818,15,2200 end
yes, I did get that from bonehead's tutorial. If he minds, I'll make my own. After that's done, open mymap.cfg in your favourite text editor. I use notepad++ (http://notepad-plus.sourceforge.net/uk/site.htm) Find the lines circled in Red, and replace those with what is shown. The part circled in green is the total height of the map. To get the green number, I go into L3DT and go to operations->height Field-> change vert scale. Take the non-negative version of the min altitude and add it to the max altitude. Replace the number circled in green in the cfg file and replace it with this value. That makes sure your map isn't stretched or anything.
At this point, all we have to do is make a .raw and a texture file, then put them into RoR!
To make a RAW, in L3DT go view->show map->Height field. Next to go to file->export->active map. You get a pop-up. Change file format to RAW, and hit the re-size button. Change 1024 to 1025. Because L3DT is so awesome, for the name hit browse and select your renamed aspen.raw file. It'll rewrite it with this one, so you don't have to move anything. Hit save, then OK. You now have a working .raw file.
To get your texture map, go to view->show map-> texture map. then file->export->active map. Tell it to export as a .jpg, then use browse to find your old texture. hit OK.
Move all of these files back into your data/terrains/ folder. You now should have a working version of your map, in RoR. You may have to change the spawn locations of your character and your cars, b/c they could be spawning in the ground. Do this in your mymap.terrn folder. Change the second and third strings of numbers, specifically the second number in the string.
The last thing you need is a mymap-mini.png. It's a 256x256 scaled down version of your texture file.
I got it in game, no problems.
Wrapping it up
- Now you should have a basic drivable track
- To make your track pretty make models to detail it
- If you have any questions or comments pm 3dracer01 on the forums.












(gold)
(silver)
(bronze)

