A quick question, but a vital one, I think.
Does OGRE support models with normal maps if said normal maps are UVmapped in such a way that two polygons pull from the same UV coordinates? In other words, if I unwrap the left half of a character model, and then set the right half of the model to use the same UV coordinates as the left half, and then render out a normal map, will OGRE be able to cooperate with the normal map?
If so: are there any considerations or settings that need to be dealt with in my modeling software (Max) or with the OGRE code?
I thank you in advance for your assistance.
Normal maps: Can two polys share UV coordinates?
-
sevenelements
- Gnoblar
- Posts: 1
- Joined: Wed Nov 02, 2005 5:13 am
- Jerky
- Orc Shaman
- Posts: 791
- Joined: Wed Mar 02, 2005 4:13 am
- Location: Springville, Utah
- Contact:
Normal maps work great in Ogre!
And yes, shared and tiled UVs still work with Normal maps inside Ogre. Check out some of the demos. The stone wall, for example, is a tiled, normal-mapped texture.
As far as mirroring goes, there was someone recently who ran into a problem doing exactly this, but it was in the normal map and tangent calculation to blame, and not specifically Ogre. Here is the thread:
http://www.ogre3d.org/phpBB2/viewtopic.php?t=13933
Here is an example of a normal mapped model that works fine inside Ogre:

Can't find my render in Ogre, will post again. This model has a lot of overlapping textures.
And yes, shared and tiled UVs still work with Normal maps inside Ogre. Check out some of the demos. The stone wall, for example, is a tiled, normal-mapped texture.
As far as mirroring goes, there was someone recently who ran into a problem doing exactly this, but it was in the normal map and tangent calculation to blame, and not specifically Ogre. Here is the thread:
http://www.ogre3d.org/phpBB2/viewtopic.php?t=13933
Here is an example of a normal mapped model that works fine inside Ogre:

Can't find my render in Ogre, will post again. This model has a lot of overlapping textures.
- Jerky
- Orc Shaman
- Posts: 791
- Joined: Wed Mar 02, 2005 4:13 am
- Location: Springville, Utah
- Contact:
Found it, I had to trick the dot3bump demo to use it. For some reason, this one crashes the 1.0.0 demos, but not the 1.0.4:

UV's are doubled over to increase detail, so the normal map is as well.
No crits please
, I am fully aware that the UV mapping and the textures suck, I slapped this guy together pretty fast.

UV's are doubled over to increase detail, so the normal map is as well.
No crits please
-
Bringer of Darkness
- Halfling
- Posts: 98
- Joined: Thu May 05, 2005 3:57 pm
Basically I think yes.
But there might be a problem with incorrect interpretation of the normal maps.
As you know normal map represent the vectors of the surface normals - but these ARE NOT the same on both sides. At the end you may end with incorrect surface display.
This would be especially visible, if you have for example the chest on the screen and two opposite sides share UVs - the final look of the chest would look correctly on the one side, but on the other side everything that was pushed out would be pulled in.
And I can hardly imagine what would be the result, if coplanar (90 degrees) sides of the chest share UVs...
But there might be a problem with incorrect interpretation of the normal maps.
As you know normal map represent the vectors of the surface normals - but these ARE NOT the same on both sides. At the end you may end with incorrect surface display.
This would be especially visible, if you have for example the chest on the screen and two opposite sides share UVs - the final look of the chest would look correctly on the one side, but on the other side everything that was pushed out would be pulled in.
And I can hardly imagine what would be the result, if coplanar (90 degrees) sides of the chest share UVs...
-
P
- OGRE Expert User

- Posts: 421
- Joined: Fri Jan 07, 2005 9:49 pm
- Location: UK
- x 2
- Contact:
Yes and no.
If you use normal maps to add details (like brick on a wall) you can have polygons sharing the same uv coordinates (overlapping polygons in the uvmap)
If you make your normal map by using a high and low poly model, and using a tool to make the nm from that, it ll only work if the the polygons which share the same uv coordinates are oriented exactly the same.
So having half a model uvmapped, make the normal map from that (with high and low poly model) and mirror the model will not work.
This is if the normal map is in tangent space. With others normal maps (world or object space), it's more complex, and i think overlapping polygons on the uv map will not work. Correct me if i'm wrong.
If you use normal maps to add details (like brick on a wall) you can have polygons sharing the same uv coordinates (overlapping polygons in the uvmap)
If you make your normal map by using a high and low poly model, and using a tool to make the nm from that, it ll only work if the the polygons which share the same uv coordinates are oriented exactly the same.
So having half a model uvmapped, make the normal map from that (with high and low poly model) and mirror the model will not work.
This is if the normal map is in tangent space. With others normal maps (world or object space), it's more complex, and i think overlapping polygons on the uv map will not work. Correct me if i'm wrong.
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
P is right, it depends on tangent vs object space normal maps. Many high-to-low detail normal maps with unique UVs use object space normal mapping, since it's a little cheaper in the vertex shader. However, if you want to share UVs you cannot use these same UVs to address the object space normal map, since it will reference the same normal on both sides. This is a the drawback of sharing UVs.
Tangent space normal maps can deal with this though, since the normal is based on the direction of the normal relative to the UV space, so if you mirror the UVs then the tangent space also gets altered, compensating for the fact that the same normal map value is used on both sides.
Tangent space normal maps can deal with this though, since the normal is based on the direction of the normal relative to the UV space, so if you mirror the UVs then the tangent space also gets altered, compensating for the fact that the same normal map value is used on both sides.
