Hi, as title said im having a little trouble with rebaking normal maps. Im looking for a way to compensate rotation of uv islands.
ive made an example
- Top one is simple 8vert cube with baked normal map
- Bottom example is same cube with new uv island arrangement. Basicly rotated. Then ive baked top normal map (simple emission map).
- As you can see bottom example is broken cause rotation of uv island matters for normal map vectors to work.
So my question is, is there a way to rebake images like normal maps with new rotation of uv islands in mind.
Replies
There is probably some simple math to rotate a NM 90º (maybe interchange R and G channels and flip them or something...) But really you don't need to care about that.
In Blender you can bake the Normal map from the low poly to the other low poly, just like you would do with the high poly and it will keep in mind the NM that is applied in the model for the bake. This also works in Marmoset.
For 90degree rotations you could swap red and green channels. You might need to invert one or both after
It's a shit hack though. Just rebake it
Actually ive found solution so i will leave it right here so maybe someone will find it helpful. This normal map node has this box to choose uvmap source. This forces image to be treated as vector information.
@lluc21 the thing is that i want to rebake multiple objects to one massive atlas and rearange them. Scaling and moving is not a problem cause this does not affect vectors. The issue was with rotation,
@poopipe 90deg is just an example.
Yeah you can't simply rebake a normal map as a an emission texture, because the pixels encode for a 3D vector, based on a space defined by the surface normal and surface U direction (aka tangent space). New UV orientation = the tangent space has changed.
Llucs suggestion of baking from one UV set to another it's the best option. This can be done in designer as well.
simply make target object UVs match your desired atlas layout and bake to them from the original object.