Blending two Normal maps (1 Material) makes animation very sluggish and laggy

hello there,

I try to do the following:

I got one material, that has two different color-textures and two different normal maps assigned to it. Now, I setup a node-network and added keyframes (at 0 and 60) on a timeline, so that blending between this frames will be done by a mix-shader´s value (0-1).

At frame 0 the value is 0 at frame 60 it’s 1 and the blend is done. I also setup blendshapes “Shape Keys[date=2021-02-09 timezone=“Europe/Berlin”]” that blend in the same time-frame (0-60)

It all works, but as soon as I involve the normal-blending, moving the timeline-slider is very choppy and blending is shown in very rough steps. No smooth back’n’forth anymore.

As soon as I unplug the normal-part of this blend, it works just fine.

So: is blending from one normal map to another that costly?
Why does it bring blender to it´s knees?

My Rig is pretty good, I’d say (RTX 3080, Ryzen 7 5800x yadayadyada)

Any ideas, how to blend the normals in a not so taxing wy?
Or is it just a bug in 2.92 and should normally work?

I am not sure if this is what you are trying to do, but with this setup works perfectly for me, no lag. I key-framed the shader mixer. My rig is much worse than yours!


If this is not what you are after try sharing your node setup for the material, to see what you really want.

hey DNorman,

thanks for your reply.

I tested two different setups:

both are working fine on it’s own. As I move the “Mix Shaders Fac” left and right, the colormap
and normal map are blending in/out perfectly (as quick as I move the slider)

But if I add blendshapes into the mix and try to move the slider on timeline:

Things are going south, the slider does not move smooth, but more with a 3 second lag and jumps in larger increments, you basically can not control it anymore.

Like I said, when moving timeline slider without having the normals in the shader to blend, everything is fine and smooth.

What I want to archieve is blending from Shape A to B and also blend the textures (color and normal) in this transition (blend from A to B)

hope that helps

Cheers!

I’m having trouble recreating this, although it might be due to testing on an overly simple setup.

If rendering in Eevee, are you using “high quality normals” in properties/render/performance? Try disabling that.

1 Like

Hi bandages,

high quality normals were not enabled, rendering in Eevee.
My blendshape has 500k faces / 250k verts so it is not so simple - but not astronomically high.

my blendshapes are setup like this: YT Video

With simple low-medium poly and it works fine, the problem is such a high vert count. There are lags when blender has to calculate geometry changes for objects with high poly counts (see the “slow performance in edit mode thread”). Although shape keys are not edit mode they are editing geometry on every step of the slider therefore every frame. The normal calculation just adds to the lag as it has to recalculate the normals for every frame while the geometry changes.

1 Like

Yes, this is what I was thinking… there is no noticeable lag when only blending between the shapes.

There is also none when blending only between textures.

But the combination of this is too much it seems.

So - any ideas, how to do blendshapes and also swap out the normal map?

Cheers

Well no real ideas apart from trying to simplify the geometry, I tied to bake the animation but it did not help.
Edit: You could edit your scene without plugging in the normal maps and then just plug the in for the final render.

1 Like

There’s an addon that convert normals node to node group that uses bump mapping instead which bypasses the high performance hit of the doing tangent space calculation on the CPU.

1 Like

thanks everybody!

@0451 0451 - looks like there is only this solution, if I do not want to lower the polycount for the meshes.

1 Like