Normal Map Creation: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Categorized and moved sections. (Still more to come - just need to eat something first.))
(Done.)
Line 3: Line 3:




==Normal Map from a Heightmap==
==Using a Heightmap==


As the Source tool [[Height2Normal]] doesn't work anymore, you will have to resort to other tools in order to convert a heightmap to a normal map.
As the Source tool [[Height2Normal]] doesn't work anymore, you will have to resort to other tools in order to convert a heightmap to a normal map.
Line 10: Line 10:




==Normal Map from an image editing program==
==Using an image editing program==


*[[Normal Map Creation in Photoshop or Paint Shop Pro|Photoshop or Paint Shop Pro]]
*[[Normal Map Creation in Photoshop or Paint Shop Pro|Photoshop or Paint Shop Pro]]
Line 17: Line 17:




==Normal Map from a 3D program==
==Using a 3D program==
*[[Normal Map Creation in XSI|XSI]]
*[[Normal Map Creation in XSI|XSI]]
*[[Normal Map Creation in ZBrush2|ZBrush2]]
*[[Normal Map Creation in ZBrush2|ZBrush2]]
Line 26: Line 26:
*[http://developer.nvidia.com/object/melody_home.html NVIDIA Melody]
*[http://developer.nvidia.com/object/melody_home.html NVIDIA Melody]
*[[NormalMapper]]
*[[NormalMapper]]
===XSI===
*ver 5.0: [http://www.softimage.com/products/xsi/v5/nfvt/default.asp Ultimapper]
*ver 4.x: GPU Surface FX2 {{note|You need XSI foundation or higher to take advantage of this feature, as the Mod Tool has a resolution limit.}}
*ver 3.5: GPU surface FX
The name has been changing, but the basic usage is the same:
*Move the high resolution model over the low resolution model.
*Select the low resolution one.
*Select GPU Surface FX2 (or Ultimapper in ver 5.0) from Get>Property.
*In GPU Surface FX2 menu:
**Pick the high resolution model (or group).
**Make sure '''normal''' is checked.
**Change settings such as normal map resolution, path, sampling, as you want.
**If you are ready, click '''Regenerate''' button. XSI will make the normal map.
**To preview the result, set Preview Display and Hardware correctly and click '''Create Preview'''.
**'''Important:''' It is necessary to '''invert the green channel of the output file'''. If you don't do this, your up/down normals will appear '''inverted''' in the engine. The simplest way to do this in Photoshop is to open a channel window, (window:channel) select the green channel (which controls up/down), and press Ctrl+I.




Line 50: Line 31:
==Getting the Normal Map in the Game==
==Getting the Normal Map in the Game==


<ol><li>Save your normal map as a [[TGA]] in the same resolution as the original texture. Give it a name that ends in _normal. Then convert it to a VTF. The _normal at the end of the name will affect how [[Vtex]] converts it. For the brick wall example, we would name the file <code>brickwall_normal.tga</code>. Place the new VTF in the same place as your original texture.</li>
<ol><li>Save your normal map as a [[TGA]] in the same resolution as the original texture. Give it a name that ends in ''_normal''. Then convert it to a VTF. The ''_normal'' at the end of the name will affect how [[Vtex]] converts it. For the brick wall example, we would name the file <code>brickwall_normal.tga</code>. Place the new VTF in the same place as your original texture.</li>
<li>Add this line to the VMT somewhere between the braces:<br/>
<li>Add this line to the VMT somewhere between the braces:<br/>


Line 73: Line 54:
*[[Creating Materials]]
*[[Creating Materials]]


[[category:tutorials]]
 
 
[[Category: Tutorials]]


{{otherlang:en}} {{otherlang:en:jp|Creating Normal Maps:jp}}
{{otherlang:en}} {{otherlang:en:jp|Creating Normal Maps:jp}}

Revision as of 10:51, 27 August 2007

A normal map should be created in the same dimensions as the image texture (color map) it will go with. There are a few options for how to create one, depending on the quality you want, your skill with various programs, or your patience.


Using a Heightmap

As the Source tool Height2Normal doesn't work anymore, you will have to resort to other tools in order to convert a heightmap to a normal map.

Todo: Which ones?


Using an image editing program


Using a 3D program


Getting the Normal Map in the Game

  1. Save your normal map as a TGA in the same resolution as the original texture. Give it a name that ends in _normal. Then convert it to a VTF. 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. Place the new VTF in the same place as your original texture.
  2. Add this line to the VMT somewhere between the braces:
    "$bumpmap" "texture name"

    and fill in the path and name of your normal map VTF. Here's an example VMT for a normal-mapped material:

    "LightmappedGeneric"
    {
        "$basetexture" "walls/brickwall"
        "$surfaceprop" "brick"
        "$bumpmap" "walls/brickwall_normal"
    }
    Note.pngNote:Multiple materials can use the same normal map file.
  3. When compiling your maps with vtex, Add this line to the <texture filename>.txt file in the same directory as your textures then compile with vtex.
    "nocompress" "1"
    "normal" "1"


See Also

Template:Otherlang:en Template:Otherlang:en:jp