Is your '.mesh' ready for normal mapping

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 :
  2. 2. Part two :
      1. 2.1.1. - Step 1 :
      2. 2.1.2. - Step 2 :
      3. 2.1.3. - Step 3 :

By Steaph  

About:

Before beginning to work on the normal mapping of your mesh, you have to make sure it is ready for normal mapping. But, what means "ready for normal mapping"?

Let's try to be as simple as possible. We can imagine that the normal map is a cloth (with a relief on it) that covers your mesh perfectly. To do that, the render engine must have some kind of a precise idea of the shape of the mesh, how is its surface. This kind of information is given by the tangent vectors of the mesh. And the "sum" of the vectors is called "tangent space".  

Actually, many '.mesh' exporter don't export "tangent space" coordinates by default (i.e. The Blender exporter or the Deled exporter). So, this tutorial will show you how to check if your model has tangent coordinates, and, if not, how to add them to your mesh. (take note, that an auto-detection of tangent is on the work, and has soon has at will be released, this chek will be pointless).  

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

Part one:

Checking for tangent coordinates in the mesh viewer.

Requirements:

For this part, you’ll need
  1. - Your model in '.mesh' 

- Step 1 :

First, import your mesh in Visual3D.NET. If you experience problems in doing that, have a look to the "Your first import" tutorial.

- Step 2 :

Open Visual3D.NET and go to the Model viewer window.

Find your mesh in the asset panel, and drag&drop it in the Model Viewer

./CHECK1-1.jpg

           

 ./warning.jpg

Before testing your mesh, create a copy of it, as already imported meshs react sometimes badly to an upgrade.

- Step 3 :

In the right menu of the model viewer, click on the "<<more" button. This will open a sub menu where you'll find the summarize of the different coordinates of your mesh. Check out for "Tangent coord".

./CHECK1-2.jpg

If you can find it, your mesh is ready for normal mapping, and you can go directly to the second tutorial. If you can't find them, you'll have to do some little work on your mesh.

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

Part two :

Adding a tangent space to your mesh with OGRE's MeshUpdater.

Requirements:

For this part, you’ll need
  1. - Your model in '.mesh'.
  2. - The OGRE's MeshUpdater that is available in this package. 

        

- Step 1 :

Install the OGRE Command-line tools package in the place of your choice.

Once the install is finished, go to the repertory, and, among others command-line tools, you will find the "mesh updater".

- Step 2 :

We now have to parameterize the Mesh Updater to have him create a tangent space when updating your model.

To do that, we will use the parameter [-t].

Create a shortcut to the mesh updater. Place it anywhere you want, and right click on it. Go to "propriety" and in the "shortcut panel", at the end of ["D:\OgreCommandLineTools\OgreMe.exe"], add a little -t.

You should now have something like ["D:\OgreCommandLineTools\OgreMe.exe" -t] or [D:\OgreCommandLineTools\OgreMe.exe -t].

./CHECK2-1.jpg

Save changes, and quit the menu. Your MeshUpdater is now ready.

- Step 3 :

Now, simply drag&drop your '.mesh' ON the shortcut. The command line window should open for a second and close. A little "report" should also appear besides you mesh.

If everything has gone right, your model should now have tangent space.

./CHECK2-2.jpg

          

 ./warning.jpg

 Don't drop a .mesh that have already been imported in Visual3D.NET. This can cause strange results.

Tags:
none
Comments (0)
You must Login to post a comment.
 
Images (5)
Viewing 1 - 5 of 5 images | View All
No description
warning.jpg  Actions
No description
CHECK2-2....  Actions
No description
CHECK1-2....  Actions
No description
CHECK1-1....  Actions
No description
CHECK2-1....  Actions