Bump map shader
From Rigs of Rods Wiki
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.
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.
- Download this zip: TutorialBumpMap.zip
- Extract and put the two files with your mesh file.
- Now you need to rename a few things inside the Tutorial.material file.
- Open the Tutorial.material file you extracted from the zip, and use the find > replace function in wordpad or notepad.
- 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!
- 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.
- Rename the main material name to whatever your mesh material is set to use
- How to create the Normal map
- There are several normal map plugins available:
- Photoshop: Download and install this Normal map filter for Photoshop:
http://developer.nvidia.com/object/photoshop_dds_plugins.html - GIMP: have a look there: http://developer.valvesoftware.com/wiki/Normal_Map_Creation_in_The_GIMP
- Paint.NET: http://paint.net.amihotornot.com.au/Features/Effects/Plugins/Color/Normal_Map/ (Simply download the .dll and drop it in your [Paint.NET Root Folder ]/Effects)
- Photoshop: Download and install this Normal map filter for Photoshop:
- Open your texture pic in Photoshop (or any other)
- 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)
- 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).
- 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.
- There are several normal map plugins available:
- Considering you did all these steps, your done! You should have a fully bump mapped mesh to use in game.
-Box5diesel


(gold)
(silver)
(bronze)

