Optimize UV space


#1

Hi!!

I’ve seen that the Morpheus Character shown from Epic has a loooooot of mirrored parts in the color texture!

What I don’t understand is how do they make it invert the X coordinate of the normal map, because it doesn’t look inverted in any side, when putting the mirrored normal map for both parts should cause this! (we all know there can’t be overlapping UVs when generating a normal map just for this reason).

I hope you understood what I’m saying.

Thanks :slight_smile:


#2

If the Color and Normalmap was written using the same UV data, there shouldn’t be any problem.


#3

mmmh, thanks for the fast reply!

Anyways maybe I’m confusing…

I agree that you can reuse any UV space when it comes to the color map. It has been done always.

On the other hand, when I hear about normal maps, I understand that you can reuse the same normal map colors in different objects that are the equal, but not in mirrored objects. In the case of mirrored objects or zones of a model (the feets for example), the X coordinate (red color) would need to be flipped in the normal map of the mirrored part IMO, to be lighted properly. If it’s not done, then a light from the right would light both sides of the model. Correct me if I’m wrong.

What do you think? any thoughts?


#4

Not that big of a problem. There are two kinds of normal maps (you probably know this, but just want to explain the usage in this situation); Object Space and Texture Space. A texture space is something you can use in all objects. When the UVs gets mirrored, the direction changes, but you have to remember that the change is uniform, so even if one where to use an Object Space, I guess he could write the HLSL to switch that particular axis (a weird way, but a stupid solution!). That is if Vector A is rotated around the Axis ‘X’, then that means the Normals are rotated hence making the Normalmap useless for this mirrored object. But in Texture space the Normal Map independant of the Object orientation. This is why you can assign a Normal map for Brick and the same for a Wall with different poly count.

My guess is they used the TextureSpace one. Not sure. There are plenty of ways around it. But if they are doing in run time (which I doubt), then they have to go through some things to fix the mirror problem if the Normal map is in Object space


#5

Thanks rakmaya. Although I’m afraid u’re not referring to what I mean.

I think that you will all see the main issue here:

As you can see, I want to use the same UV space for some of the parts of left right that for the right part, reusing the textures of those parts (including normal maps of course). As the geometry is mirrored, the UVs are too and I can’t mirror them again because they wouldn’t match with the ones of the opposite part, so the texture wouldn’t be reuseable. This will cause all the mirrored faces have an inverted look. But Epic guys make it, so It is possible.

Now, without moving the UVs, how would you fix this? programming some special shader for the opposite part? Flipping the UVs but not moving them? (how can I do this?) any more choices?

I’ve also seen this document which talks about this kind of stuff, but I don’t understand it 100%.
http://developer.nvidia.com/object/gdc_tspacereal.html

Could you lend me a hand? with it?

Thanks a bunch cgtalkers :slight_smile:


#6

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.