Mirrored + shared Normal map now works with softimage 2010


#1

i ve been struggling for almost a year for this.
but finally now it works.
just follow the render tree here

I provide with normal map preset file, so you can use it and replace it with ur own normal map image
you can load this preset in your normal map node
http://arifcreations.com/xsifiles/Normalmap.Preset

make sure you freeze your tangent, (freeze model)





#2

Well first,
If the game engine you are exporting the asset to does not support mirrored UVs on normals maps, then creating the asset using this method is useless and you’ll have to redo it. So verify your graphic engine’s features first. The feature may have to be activated or created.

And although it may work in this particular instance, the method is wrong. It only works here because your symmetry is on the Y axis, so inverting the red channel works. If you have a UV symmetry on the X axis - or any axis other than a perfect Y axis symmetry - the method will not work. It also makes use of a weight map which would not exist on the game side unless it is stored as a vertex color map, and even then the game would have to be able to extract this information and use it.

A normal map is unpacked from the [0,1] range to the [-1,1] range, then transformed from tangent space to world space by a matrix. The matrix is built from the vertex normal, tangent and binormal. The tangent is taken from UV.x and the binormal is usually reconstructed by a cross product with the Normal and Tangent.

In tangent space, Z faces you. When you symmetrize a normal map, you are flipping over these triangles in tangent space, effectively reversing the binormal on those triangles.

Take your right hand, stick out your thumb. This is X. Point it towards the right, or U. Stick out your index, this is Y, or V. It points up. Stick out your middle finger half way, this is Z, or W, it points towards you. This is a tangent space Axis, following the right-hand rule.

What happens when you symmetrize UVs is your axis gets flipped over around X. So now your thumb is pointing the right way, Your index is in the opposite direction and Z is pointing away… except Z will remain towards you because the vertex normal was not flipped and the blue channel was not inversed. So if Z is pointing correctly “up” (dont try this with your fingers, youll break it :p), all that has inversed is your index, or Y: The Binormal.

Whether the binormal is pointing the “right way” or “wrong way” is called the binormal sign.

XSI has an option in the tangent menu to store the binormal sign in the tangent alpha. This channel will return either 1 or -1 (reversed). This is what this information is used for; So that when you transform your normal, you multiply the binormal component of the matrix with this, so that it inverses properly (*-1) with flipped UVs.

i dont have xsi in front of me right now, so i cant tell you the exact how-to, but thats the theory. Maybe one of your graphics programmers can help out.


#3

whoa thx for pointing out >.< my bad!, :scream:

to be honest i never had successfully transferring this method in game engine.
I did this because when i use marmoset , my symetrized normal seems to work. ( which is i think I havent test what happen if i rotate that 2d normal to other axis than y)

but thanks for the explanation, I might need to learn about binormal.


#4

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.