Normals get messed up when changing scale of root bone in animation

Godot Version

4.2.1

Question

There is an issue I am facing when trying to mirror a 3D animation. The quickest way I found to mirror my 3D animations is multiplying the x scale of my root bone by -1 and then using a copy of the animation I want to mirror that also inverts the rotation along the y axis. This has worked and it lets me actually mirror my character animation, saving me tons of manual labor flipping my key frames manually. I do run into an issue however, that I have no clue how to begin to fix. I think that this inverts the normal maps of all the meshes that the root bone affects. Or maybe, it mirrors my character, but the normals stay in place? Either way, my character becomes dark and any reflections come from the wrong direction, etc. etc. Basically it looks like shit and my character changes his colors whenever executing a mirrored anmiation, which I would like to avoid. Does anyone have any idea how to avoid or fix this?

Most likely because you are inverting the model by scaling by -1, so you are seeing the backfaces which have the vert normals, tangents and bi-normals pointing the wrong way, thus not being lit properly.

I imagine there is a safer way to mirror animations as this will be a problematic way as if you wanted to do this, you’d have to invert the normal map in the shader based on the two sided sign function, though not sure 100% what that function is in the shader.

EDIT: try making sure your Cull Mode property on the material you are using is set to Back, see if that helps.

EDIT EDIT: if you still need culling off, you can try this in a shader:


this should allow for inverting/flipping the model.