Normal mapping from a texture map

From $1

Table of contents
  1. 1. About:
    1. 1.1. Part one:
      1. 1.1.1. - Step 1 :
      2. 1.1.2. - Step 2 :
      3. 1.1.3. - Step 3 :
      4. 1.1.4. - Step 4 :
      5. 1.1.5. - Step 5 :
      6. 1.1.6. - Step 6 :
      7. 1.1.7. - Step 7 :
      8. 1.1.8. - Sep 8 :

By Steaph

  

About:

This first tutorial will show you how to creat a normal map from the mapped texture, and how to import it in the material editor.

The tool we will use here is the Normal map generator developed by AMD/ATI. Take note that If you own Photoshop, you can also give a try to the plugin from Nvidia that you can find here. Another commercial alternative is “crasy bump”. This software gives you the possibility to control any aspect of your map in a extremely precise way, but has a quite high pricing policy.

 

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

Part one:

Creating the normal map using a normal map generator.

Requirements:

For this part, you’ll need
  1. - Your favourite image manipulator (Gimp, Photoshop,.... )
  2. - The NormalmapGenerator from AMD/ATI (here).
  3. -  A mesh with a mapped texture.

- Step 1 :

First, unzip the normal map generator from ati. Actually, this little software allows you to import a .tga image, and transform it for you into a multichannel image. (to obtain a .TGA image, use Photoshop, Gimp, Paint.net, or any image manipulator you like.

For this tutorial we will use the same cube than for “your first import in Visual3D.net”. So before going further, check where on your computer where is the texture map we have used (It should be in"Projects/Demo Assets/#Media/Models/MyModels/Cube"). If you haven’t complete this tutorial, just use the cube and the texture map attached at the bottom of this page.

./NMTA-1.jpg

- Step 2 :

Open the TGAtoDOT3.exe from your freshly extracted file . In the import window, search for the cube texture map and open it. If everything goes right, a “success” popup window should appear, and you should find you newly created Normal map just beside the texture map.

./NMTA-2.jpg

          ./NMTA-1b.jpg

- Step 3 :

Place your new Normal map in the Visual3D.NET directory, in the same folder than your '.mesh' model, along with is texture map and his '.material'. If you have followed the "First import" tutorial, it should be "Projects/Demo Assets/#Media/Models/MyModels/cube/".

- Step 4 :

Launch Visual3D.NET, and go in the material editor. Create a new material and name it "cubemap-NM" (or any other name you like). Now, lets take a look to the material editor options:

  •  - Texturing mode.  Here, you can choose between "Solid fill", "2D texture", or "Environment map". We will chose obviously "2D texture", as our cube has a texture map. Take note that you can also choose "solid fill", as this option only influence the primary aspect of your object, and not the "extra" mapping. "Environment map" can be used as well, but it will allows us to create a special reflection effect using a second spherical texture displaying the surroundings of our mesh. It's not the purpose of this tutorial.

  • - Lighting model.  Three lighting models are available. "Ambient" only take in count static light. "Lambert" take in count diffuse light (dynamic light) and "Blinn-Phong", faster shader derived from the Phong shader display diffuse and specular lighting. "Blinn-Phong is best suited for reflecting or polished surfaces like glass or metal. For something more "mat", prefere "Lambert". Let's assume that our cube is in plastic, and let's choose "Blinn-Phong".

  • - Normal map.   Here, we can choose between "Normal map", "steep Normal map" and "parallax mapping". What's the difference between this three option? Normal map let you import your normal map without the possibility to control the "power" of your map. If you want to adjust it, use "steep Normal map" instead. "Parallax mapping" is a kind of Normal map improvement. Actually, while normal map only modify the light incidence on you texture, "Parallax" displace your texture on a short distance, which imply that your meshs actually HAVE extraly relief. As this option will be discussed in an other tutorial, we will choose "Steep Normal map".

  • - Transparency mode. We choose an opaque cube.

        

          

- Step 5 :

Go to the "texture" panel and open it. In the asset window, find the texture map of your mesh, and drag&drop it in the viewer. The "model preview" window should update and now show your texture on the preview mesh.

- Step 6 :

Now open the "Normal map" panel. In the asset window, find your Normal map, and drag&drop it in the viewer. Once again, your model preview should update, and show you the effect of your normal map.

Now, lets take a look at the Normal map panel options.

- Step 7 :

  • - Filter : This option allow you to select the level of "smoothness" of your texture during rendering. Be aware that the use of such filters will decrease the speed of the rendering. Particularly for the trilinear and anisotropic filters. Using "none" will make your texture looks like a pattern of square pixels when magnified. "Bilinear" will create a simple smooth effect, while "trilinear" will use take in count the player point of view to adjust the smoothness. Finally, the "anisotropic filter will enhance the quality of oblique viewing textures.

  • - Normal map Steepness Factor : Here, you can control the "power" of your Normal map. A higher value will give you a higher relief. Take note that you can enter manually value superior to 2.

  • - UV Set : For object having more than one texture map, you can choose which texture map coordinates will be used for the current Normal map.

Your material is now ready. Remember that you can save it in a xml file using the "save as" button.
 ./warning.jpg

   If your Normal map is displayed badly in the mesh viewer and, in the meantime seems good in the material viewer, try to uncheck the "tangent vector in TEXCOORD1" box. The purpose of this option is to let you use the tangent vector stored in the level 1 coordinates. If your tangents are in the level 0, uncheck it.

   

- Sep 8 :

Go to the model viewer, and open your model by dropipng it inside from the asset window.

Open the "Parts and Materials" window, and select the part where you want to apply the Normal mapped material.

Open the Material explorer using the "..." button, and select the NM material. Click ok.

Your Normal map should appear on your mesh.

   

---------------Work In Progress - Image to be added soon -----------------
  
Tags:
none
Comments (0)
You must Login to post a comment.
 
Images (4)
Viewing 1 - 4 of 4 images | View All
No description
warning.jpg  Actions
No description
NMTA-1b.jpg  Actions
No description
NMTA-2.jpg  Actions
No description
NMTA-1.jpg  Actions