View Full Version : Normal map question

11 November 2005, 07:08 PM
I was watching a tutorial where a normal map was applied to a low poly pistol. The pistol had some mirroring of the UV's. Before he generated the map he moved the mirrored UV's off of the UV layout. In the video the artist never moved them back or explained why this works.

I always figured it couldn't be done since the normals of a symetrical side of an object would be flipped over an axis, right? Is this only available for tangent?

11 November 2005, 08:34 PM
Most Normal map generating softwares generate normals for only those UVs in the 0 to 1 space. So anything outside of this space would be unaccounted for.

Basically, if he kept his mirrored UVs in the 0 to 1 space, they'd screw up the calculations, and the converter would not easily figure out which normals to calculate for, and you'd end up with a garbled mess.

Moving half the UVs just removes them from the equation.

11 November 2005, 04:34 AM
He definitly moved the mirrored UV's out of the 0 to 1 space. The thing is the video never showed him moving them back. I know that you cant have overlieing UV's when generating a normal map. Is moving them off, generating the map, and moving them back simply a way of accomplishing this?

I modeled a character I wanted to normal map and found that a lot of my 0 to 1 space was taken up by UV's that could have been overlapping, for instance gloves and boots. As a result I lost detail in other areas such as the face. Is it standard practice to do what I saw in the video?

11 November 2005, 05:00 AM
Yeah there are many ways to achieve this, What I do is keep two copy of the low poly with same uv, one copy is to just to generate the normalmap which has all the mirrored parts deleted i.e boots, hand etc. Once you generate the normalmap apply it to your other copy, it works for me anyway.

You could move out the 0 to 1 space but some normalmap plugins don't like this so they tend to crash.

11 November 2005, 06:02 AM
Hi tintin50,
maybe you can give me the link of the video tutorial? I'm also interested in learning for create and apply normal maps to lowpoly models :-)

11 November 2005, 04:25 PM
Sorry I havn't got the links to them and don't know which ones they are, I will write a tutorial on this process pretty soon.

11 November 2005, 05:57 PM
I've seen and used a few instances where mirrored uv's get offset by they don't generate with the normal mapper, and since the uv's tile, it copies them wouldn't have to move them back at all.
I've had some trouble with it though, as it generates in real time one way, and in max rendering another, had to invert the green channel to render properly.

I'm inclined to think that just laying it ALL out in the uv's is easier than mirroring like this, you just have to paint 2x as much :P

11 November 2005, 06:45 PM
Painting everything is great if you have a large texture space, in game models well you have to mirror some to save texture space, take for example doom3 and quake4 most of the models are mirrrored on 512x512 and 1024x1024 space.

11 November 2005, 07:42 PM
With normal maps you can overlap, tile, but never mirror uv's. Its bad practice.
You cannot mirror uv's for normal maps because of the nature of the information encoded into them. Models done this way are incorrect and will not properly light on the mirrored side.

Normal maps encode direction vectors, and use the uv's (texture space) as a reference space. Mirroring the uv's will thus mirror the vector directions, and the effect during render.
Youll notice that if you mirror uv's, when passing a light source over the model the non-mirrored side will render correctly, but the mirrored side will have the lighting inversed (normal mapped details will have shadows towards the light and speculars away from).

I think the guy in the tutorial intended to show the workflow, and not necessarily complete the project in the video.

11 November 2005, 09:19 PM
so can you not mirror at all when working with normal maps? or is that only when generating the normal maps?

11 November 2005, 11:00 PM
so can you not mirror at all when working with normal maps? or is that only when generating the normal maps?

No, mirroring is not possible for the reasons stated above. Unless your game engine is able to recognize flipped uv's and invert the data for those polies. But then i imagine it is more hardware efficient to just not mirror them at all.

As for normal map generating, you should avoid any overlapping uv's of any kind whatsoever. Otherwise the renderer will raytrace over the same texture space several times, causing strange artifacts and errors.
I tend to generate my normal maps in stages. And then assemble it in photoshop later.
In instances of overlapping area, polies using the same texture space, i tend to delete polies on the lowrez as to have only one sample of the area, so the area is raytraced once and not overwritten by the other polies sharing the texture space.

11 November 2005, 11:05 PM
I think most game engines can work with mirrored UVs, I have no idea of how it works, but it's about something related to bitangents. I wouldn't bet a finger for it though.

11 November 2005, 03:47 AM
I think most game engines can work with mirrored UVs, I have no idea of how it works, but it's about something related to bitangents. I wouldn't bet a finger for it though.

I really wouldnt say "most", but some yes. But even though, right now i am on an engine supporting this feature and we choose to use unique uv's.
For one when you have an advanced engine, you can probably afford unique uv's.
Also to avoid the typical centerline seam, And to allow the artists freedom of non-symetrical detail. In my opinion the whole point of nextgen is to do away with limitations of these types of optimizations.

CGTalk Moderation
11 November 2005, 03:47 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.