Skip Navigation
Resources
Group Information

How to do basic bump mapping with PhotoShop





http://developer.nvidia.com/object/nv_texture_tools.html

You will need the plug-in above. Place in c/…/PhotoShop/plug-ins/filters.

1.You will need a black and white 512 x 512-jpg image as the base for the height map. If you have a base image go to 2.

If you wish to make a height map of an existing texture, open the texture in PhotoShop. Go to the tab "filter>sketch>photocopy". This will give you a black and white image; you can adjust settings to flatten texture. If there are still a few gray areas on your texture it can be flattened further by using "Image>adjust>brightness/contrast"

Black areas will be recessed and white areas raised.

2.Open this image in PhotoShop.

3.Go to the "window" tab and select "show channels".

In the channel window, left click as show to open menu and select new channel. A pop-up will open with the new channel details. Name-alpha 1,color indicates-masked area, opacity-50%, click ok.



Click on the tab within the circle and select "new channel"

4.In the channel window select alpha, red, green and blue channels (shift + left mouse). Channel tabs will turn blue when selected.

5.Go to the "filter" tab and select "nvtools/normalmapfilter"

Height generation: - 3x3 or 5x5(sharper image) are best and scale sets height. You may need to experiment with these settings to get the result you want.

Height source: - average RGB.

Alpha field: - height.

Click "ok"



6.Save as tga at 32bit.

7.The image you used as a base (black and white), add the word front to it and save as a tga at 24bit 256 x 256. This will be your editor image, by putting the word on it, it is easier to see its orientation in the map editor.

You should now have three texture, your editorimage (256 x 256tga), your heightmap (512 x 512tga) and the texture that will appear in game.

Shader

///thank to omnix///

textures/your_map/your_texture

{

qer_editorimage textures/ your_map/your_editorimage_texture.tga

q3map_lightmapsamplesize 1x1

q3map_normalimage textures/ your_map/your_heightmap_texture.tga

{

map $lightmap

}

{

map textures/ your_map/your_texture.tga

blendFunc GL_DST_COLOR GL_ZERO

}

}

This shader can be used on any brush or patch and has the nice side affect of allowing you to cast detailed shadow on to it with out using a function_group.

Take care to insure that the texture is correctly aligned on the brush or your light map may be reversed.

Compile with q3map2.3.32 and q3map2build.

In the world_spawn add _lightmapscale – "2"

BSP /> -meta

VIS /> normal

Light /> -fast –v –super 2 (+ patchshadow, if needed)

To check your work you can use the console command "/r_lightmap 1". This will remove the textures so only the lightmap is visible.



Any problems please post in the forum

Tutorial by Detoeni


Surface mini-logo Surface mini-logo