I was wondering if anyone got a material setup for using object-space normal maps?
My meshes are not deformed (just moved/rotated/scaled) and I want my normal maps to be in object space and I unchecked the “Tangent space normals” in the material so that it uses world-space normals.
However the lighting rotates with the the object now, which means the normals need to be transformed from object space to world space somehow. I can’t seem to figure out how to do this.
In the material I tried the “Transform Vector” node(local to world) to transform the normals given by the object space normal map(making sure the normals
are in -1|+1 range) into worldspace but it doesnt work .
Maybe any of you guys have a clue how to do this correctly or even a working material that uses object-space-normal maps?
I am not sure, but I remember having issues with retrieving local transform with Transform Vector node. Perhaps, you could try using Transform Position node instead.
means ? I am researching on that topic too, but there is not much to find on that kind of topic. I would greatfully appreciate if you share some insights on that
NormalMap compression does not work for other than tangent space normals because it’s assumes that z is always positive and reconstruct it from x and y. You still need to multiply normal with 2 to get unit length normal. This isn’t strictly needed because engine will normalize the normal for you.
Hi, 1 year later, I use this forum to document my discovery and to help me in the future so I archive my material here.
I use Power(X, 0.4574), then no need to uncheck the sRGB all the time, otherwise you may get confused when there are many textures and you forget one of them.
I transform the normals with the invert of the scale: Multiply(N, Divide(1, Scale_XYZ)).