Aug/31
2009

Creating a bump map

The good news is that Unity is able to create bump maps for you automatically. Follow these steps to see it happen:

1. At the top of the screen, click 'game object' then 'create other' and select 'cube'.

2. Drag a standard diffuse material on to the cube. Now, from the project area, select the texture itself and press ctrl + d to duplicate it.

3. Select the duplicated material and look at the property inspector. Check 'generate bumpmap' and move the slider up to the top, then click 'apply'.

4. From the scene view, select your cube. Change the shader to 'bumped specular' and drag your newly generated bump map into the empty slot.

You should end up with something like this...

That covers it for bump maps. Just remember that you get the most out of a bump map when there's a dynamic light source about. Try creating a point light and moving it around your cube to see how the shader reacts.

If you were serious about it, you could also create your own bump maps, manually. The advantages of making one yourself are that it ends up being cleaner and more accurate. If you just wanted the seams of the brickwork for instance you would trace them with a black colour. If you were to ensure than that your bump map was just white, with black for the bumpy areas, Unity would generate a far more accurate map from that image than it could by attempting to extrapolate from the diffuse material.

On to the next page for cube maps!

Pages: 1 · 2 · 3 · 4 · 5