Bump map shader

From Rigs of Rods Wiki

Jump to:navigation, search

Bump Map Shader Tutorial   


This will walk you through the steps to add a bump map to your mesh object. 

First, take a look at the difference between a regular mesh vs. the same mesh with a bump map. 

Regular mesh vs. Bump mapped mesh

The bump map adds details such as bumps, scratches, dents etc, to a otherwise plain textured mesh. 


Now that we know what Bump mapping does, here's how to apply it to your mesh object.


This tutorial assumes you have already textured your mesh, and have a texture pic done.


  1. Download this zip: TutorialBumpMap.zip
  2. Extract and put the two files with your mesh file.
  3. Now you need to rename a few things inside the Tutorial.material file.
    1. Open the Tutorial.material file you extracted from the zip, and use the find > replace function in wordpad or notepad.
    2. Tutorial.jpg gets renamed to your texture picture name.  There are 4 Tutorial.jpg's in the Tutorial.material file.  You need to rename all 4!Bump2.JPG
    3. Tutorial-Normal.jpg gets renamed to your Normal map picture (how to create a normal map is below).  There is only one Tutorial-Normal.jpg to rename.Bump1.JPG
    4. Rename the main material name to whatever your mesh material is set to use
      Bump.JPG
  4. How to create the Normal map
    1. There are several normal map plugins available:
    2. Open your texture pic in Photoshop (or any other)
    3. In the toolbar in Photoshop, go to Filter > NvidiaTools > Normalmap filter... and hit OK. (may be different for your editor) (For much, much, much, much better results, see this tutorial: img521.imageshack.us/img521/9046/normalmapminitutrf7.jpg)
    4. Now you should have a pinkish looking picture.  Go ahead and save it. (remember to rename the Tutorial-Normal.jpg in the material file to whatever you save this normal map as.  See 3c above).
    5. The Normal map picture plays a huge part in how your bump map looks.  Darken it, lighten it, up the contrast, lower the contrast, all these will drastically affect how your bump map looks in game.  So play around with the normal map pic until your happy.
  5. Considering you did all these steps, your done!  You should have a fully bump mapped mesh to use in game.


-Box5diesel