Home Technical Talk

Rebaking normal maps with new rotated uvmap problemo.

polycounter lvl 11
Offline / Send Message
riceart polycounter lvl 11

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


  1. Top one is simple 8vert cube with baked normal map
  2. Bottom example is same cube with new uv island arrangement. Basicly rotated. Then ive baked top normal map (simple emission map).
  3. 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

  • lluc21
    Offline / Send Message
    lluc21 polycounter lvl 6

    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.

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter

    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

  • riceart
    Offline / Send Message
    riceart polycounter lvl 11

    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.

  • Noors
    Offline / Send Message
    Noors greentooth

    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.

  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter

    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.

Sign In or Register to comment.