Way Faster Normal Map Node (for realtime animation playback with tangent space normals)

I think I saw a fix for this in oldbens repo

does this scheme work with procedural maps or only with image node?

With procedural maps you wouldn’t really need it, as most of Blender’s procedurals are greyscale and you can use a bump node for those, which is cheaper (and it’s also what this setup uses).

Blender 3.2 support is fixed in my fork:

Will propose the fix to oldben as well

5 Likes

i’m in the process of making a tutorial on this and I was wondering if you could tell me an example of some modifiers that need to get updated every frame besides the armature modifier I’ve already made a couple tutorials on this that show how fast of a speed boost that you get on a character with an armature modifier But if I could have some other examples that would be cool too to show other benefits

When using the Normal Map node, I think everything that deforms the mesh forces the tangents to be regenerated. This includes shape keys and most modifiers.
From my testing it seems like Blender only checks if the mesh is deformed by anything that’s effected by key frames.
This means that adding a single key frame to a modifier will make it update every frame, even if it doesn’t change anything.

Aside from speeding up animation, another advantage of the technique is that it can be used to generate tangents for procedural UVs.
While the current node group isn’t setup like this it should be as easy as replacing the UV map node in it with the custom UV.
The main disadvantage is that it uses the flat geometry to generate the tangents, which can lead to a faceted look when using stronger normal maps on curved surfaces.

1 Like

OK so does that mean that if I have an object that does not have an armature modifier and yet it has at least one shape key that has key frames and tangent normal maps that i will get a speed boost…

and…dont get this part…can u simplify it

“”
Aside from speeding up animation, another advantage of the technique is that it can be used to generate tangents for procedural UVs.
While the current node group isn’t setup like this it should be as easy as replacing the UV map node in it with the custom UV.
The main disadvantage is that it uses the flat geometry to generate the tangents, which can lead to a faceted look when using stronger normal maps on curved surfaces. “”

like how do i " replacing the UV map node in it with the custom UV. "

and you do mean your optimized normal map node group right?.. When you say the current node group isn’t set up like this?

I am getting real time 24 frame per second animation in EVEE render mode on a high polycharacter with over a 100,000 faces(and strand based hair of course)… The character has tangent space normal maps on her shoes her shirt and her pants And that’s it and this add on increases it to 24 FPS from 7 FPS IN RENDER MODE…128 VIEWPORT SAMPLES… 57 light bounces and ambient occlusion, screen space reflections motion blur and Bloom all enabled!.. Haven’t even tested why…this is supposed to just work in evee…but I switched to cycles render mode and was getting 20 fps

how did this give you a performance boost when texture painting

can someone implement this into the default normalmapping node code?

and use automaticaly the gpu mode?