Blender Race Track Tutorial

From Rigs of Rods Wiki

Jump to:navigation, search

Contents

Introduction

Hi I'm 3dracer01 I'll teach you on how to create a race track.

Programs

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

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

Materialtab.png
  1. Open the Material Panel, to do this:
    1. click on shading
    2. then the materials button
  2. click on the Add New Button to add a new material
  3. under the material tab click on Shadeless button

Add a Texture

Texture Tab

Texturetab.png
  1. Open the Texture Panel
    1. click on shading
    2. then the texture button
  2. click on the Add New button to add a texture.
    • to change the name of the texture click on Tex.001 and type in a new name, in our case heightwould be appropriate
  3. Next, select Blend from the Texture Type "pulldown" menu.

Colors Tab

Colortab.png
  1. Go under the color tab and click on the Colorband button.
  2. There is a Field labeledA with a value of 0.000, change the value to 1.000
  3. Select the second color point by clicking on the white vertical band on the right of the colorband.
  4. change the color of the second colorpoint to white by making the R value 1.000

Mapping the texture

Mapinputtab.png
  1. Now go back to the Materials
  2. under the Texture Tab make sure there is a check next to the name of the texture you just added.
  3. go into the Map Input tab
  4. 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

Camertab.png
  1. Go back into Object Mode (Objectmode.png)
  2. Under the View menu select View select View Properties
  3. Under 3D Cursor change the x, y, z values to 1.50, 1.50, 5.00.
  4. press spacebar and select Add -> Camera
  5. hit {{key|f9} or click the editing button to and you'll see a camera tab.
  6. click the Orthographic button
  7. change the value of scale to 3.00

Setting up the rendering

Formattab.png
  1. press f10 to enter the scene panel
  2. below the format tab change SizeX, and SizeY to 1025
  3. under that, there is a menu for the formats, it defaults Jpeg. click on this pulldown and select OpenEXR
  4. select the BW button 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.

Cfgfile.jpg

Heightfieldscale.jpg

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.

Exporting.jpg

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.

Done.jpg

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.

Links