Bump map: Difference between revisions
(Added additional information about bumpmaps on decals in CSGO) |
(→Programs: Programs under "Other" are god-knows-how-long years outdated, and were updated. Re-add any if you feel necessary. (Some report incompatibility with modern OS or trip antiviruses, or some don't exist anymore. [Reported by "solved"])) |
||
Line 59: | Line 59: | ||
:[[Normal Map Creation in The GIMP|The GIMP]] | :[[Normal Map Creation in The GIMP|The GIMP]] | ||
:[http://www.youtube.com/watch?v=xDZDWvTUz-c nDo] | :[http://www.youtube.com/watch?v=xDZDWvTUz-c nDo] | ||
:[http://filterforge.com/filters/8774.html Filter Forge] | |||
;3D | ;3D | ||
:[[Normal Map Creation in XSI|XSI]] | :[[Normal Map Creation in XSI|XSI]] | ||
Line 71: | Line 72: | ||
:[http://xnormal.net/ xNormal] | :[http://xnormal.net/ xNormal] | ||
;Other | ;Other | ||
:[ | :[https://cpetry.github.io/NormalMap-Online/ NormalMap Online]: A website for generating normal maps online. | ||
:[ | :[https://sourceforge.net/projects/ssbumpgenerator/ SSBump Generator 5.3]: Despite the name, it can also be used to generate bumpmaps, not just [[$ssbump|self-shadowing bump maps]]. | ||
:[http:// | :[http://store.steampowered.com/app/325910/ Substance B2M3]: Previously known as BitMap2Material. | ||
:[https://sites.google.com/site/ccdsurgeon/download/ InsaneBump]: Specifically made to be a free alternative to | :[https://sites.google.com/site/ccdsurgeon/download/ InsaneBump]: Specifically made to be a free alternative to the now-superseded software "CrazyBump" (may trip antiviruses due to incompatibility) | ||
=== Conversion === | === Conversion === |
Revision as of 05:41, 3 November 2021

Textures often called Bump Maps, or Normal Maps are used to simulate three-dimensional details on a two-dimensional surface by manipulating its lighting.


Format
Each pixel in a bump map contains the (x, y, z) coordinates that define a normalized vector.
Because of this each color channel in a bump map has a meaning:
- Red
- Horizontal facing (X axis)
- 0 = left
- 128 = forward, or facing viewer
- 255 = right
- Green
- Vertical facing (Y axis)
- 0 = up
- 128 = forward, or facing viewer
- 255 = down
- Blue
- Height (Z axis).
- 0 = facing 'in' to the texture, away from the viewer. This is a 'bad' value. Anything under 128 means that the surface should be facing away from the player, which is not possible.
- 128 = maximum depth capable of receiving dynamic light. It's a bad idea to go under this.
- 255 = facing 'out' of the texture towards the viewer.

dev/flat_normal
is a flat bump map present in every game.The three channels represent a normal vector for every pixel which represents the direction that the pixel is facing in 3D space. This allows the engine to generate shadows and highlights on a two-dimensional surface, or give a 3D model more detail.
A bump map is largely useless for really flat surfaces like smooth concrete or metal, but even smooth concrete sometimes has enough depth to it to make one worthwhile.
Creation
A bump map should be rendered in Tangent space and use vector directions X+ Y- Z+.

Programs
Various programs can automate the creation of bump maps, either by image analysis or by using 3D geometry the user provides.
- 2D
- Photoshop or Paint Shop Pro
- Substance Designer
- The GIMP
- nDo
- Filter Forge
- 3D
- XSI
- ZBrush
- Lightwave
- 3ds Max
- Maya
- Blender
- NVIDIA Melody
- Cinema 4D
- NormalMapper
- xNormal
- Other
- NormalMap Online: A website for generating normal maps online.
- SSBump Generator 5.3: Despite the name, it can also be used to generate bumpmaps, not just self-shadowing bump maps.
- Substance B2M3: Previously known as BitMap2Material.
- InsaneBump: Specifically made to be a free alternative to the now-superseded software "CrazyBump" (may trip antiviruses due to incompatibility)
Conversion
In VTFEdit
When converting your texture:
- Choose your image format. Uncompressed formats like BGR888 are higher-quality than compressed formats like DXT1, but be wary of file size.
- Check the "Normal map" box in the texture's flags list after the import is complete. It's about 1/5 of the way down the list.

In Vtex
- Save your normal map as a TGA. Give it a name that ends in _normal. The _normal at the end of the name will affect how Vtex converts it. For the brick wall example, we would name the file
brickwall_normal.tga
. - Add
nocompress 1
andnormal 1
to <texture filename>.txt in the same folder as your texture, then compile.
Implementation
See $bumpmap.
See also
- $ssbump: creation and usage of Valve's new self-shadowing bump maps.
- An old article that explains normal mapping quite well
- Polycount wiki page about normal maps
- Creating a Material