Questions about Normals, Inverse Normals, and Mixing Normals

First question:
I have two example normal maps that look like this:
norm.001 and norm.002

I want to subtract the second from the first to get a result like this:
norm.003

Ideally, I would like a way to do it in Photoshop, but the only tutorials I’ve been able to find were about combining the normals, not subtracting them.

The way I would normally do this in Blender is with a setup like this which has the desired result:

This works by turning each image into a normal map and subtracting the base, empty normal from each.
Then, I can add, subtract, multiply etc. (in this case subtract) before re-adding the empty normal map with the result above.

Is there a way to do the inverse of the normal map node, so I go from this:
norm.004 to this: norm.003?
Note that this very last image, the desired result, was created using the original sphere and cylinder and doing a boolean difference, then baking the result directly as a normal. I want to be able to do this in Photoshop or shader nodes after I have already baked them

This is basically what I am trying to do in Photoshop but can’t figure out. I could easily do it in Blender if I knew how to reverse the Normal Map node. I need to do this in order to combine some normal maps I am working on (my shader has a bunch of different baked normals that I’m adding together)

Basically I have a mesh, I sculpted a bunch of different shape keys into it, baked out each shape key as a normal, then put them back together again in shader nodes so I would be able to blend between them on the fly, and for this all take place as normal maps as opposed to actual shape keys to keep the final file size down.

Yes, I could do this in shader nodes but I am trying to optimize the final setup, each one of the normal maps is huge because in addition to the parts I’m interested in, the parts that change, all have the normals for the base mesh included, and that makes the files pretty big. I only want save the parts of the bake that change for each different key, not the parts that are always there.

Second Question:
Finally, on a similar note, if I create simple image in blender and use that for the bake, I get this:
norm.001
But if I create an image with 32 bit float checked, I get this:
norm32
which looks a lot like if I took the first image and switched from sRGB to Non Color Data

A: Why does 32 bit float do this?
B: Is there any way to reverse this transform? to make it go back to the first example?

Hello !

I’m not 100% sure , but try to add 1 and multiply by 0.5.
I think the output of blender’s normals is mapped from -1 to 1…

Yeah you must make sure photoshop doesn’t screw things up with color management.
Operation should be done in linear.

A : blender save 8 bits image in SRGB, however when saving exr it’s saved in linear.
I’m not sure we can do something about it, maybe open the image in another editor and convert from linear to srgb.

Hope that helps !

2 Likes

This worked! and I think solves all my problems, now I can just render the result of the combinations on a plane to get what I want! It worked for the example, now I just hope it works for the real thing.

Yes, this points me in the right direction. I might be able to figure it out from there,

Thank you very much for the prompt and helpful answers!

1 Like

It worked for my project! It took the file size down from about 13 mb to about 750kb for each image. Considering how many I’m using, that is HUGE!
I will say that I DID have to paint out some parts in Photoshop, so this wasn’t entirely a Blender solution. But it got me past a crucial step in optimizing, so thank you very much!

1 Like