godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.42k stars 20.24k forks source link

Normals are incorrect when applying a blendshape to a skinned mesh #43215

Open Arnklit opened 3 years ago

Arnklit commented 3 years ago

Godot version: 3.2.3.Stable

OS/device including version: Windows 10 Pro v.2004 / Inspiron 7373 Core i7-8550U / Intel(R) UHD Graphics 620

Issue description: Normals are incorrect when applying a blendshape to a skinned mesh. This is a glTF imported model. I tried to compare to an fbx file to see if it was an import issue, but the blendshapes don't seem to affect the normals at all on fbx imported models. image

Steps to reproduce: Open attached project and observe the normals when applying the blendshape

Minimal reproduction project: glTF_blendshape_normal.zip

EDIT: I added details about this being a glTF model in description

Calinou commented 3 years ago

Related to https://github.com/godotengine/godot/issues/42620.

RevoluPowered commented 3 years ago

Question, does this happen with stuff which is not FBX too?

Arnklit commented 3 years ago

This happens with glTF. It does not happen with fbx, but fbx has the error of not adjusting the normals at all when a blendshape is applied. I have not tried with the new fbx importer that I think is in beta now in 2.3.4 and I have not tried with Collada since the Better Collade exporter for blender doesn't seem to be kept up to date any more.

Calinou commented 2 years ago

Related to https://github.com/godotengine/godot/issues/55812.

I can reproduce this on 3.5.beta 11d40d76a (Linux, NVIDIA GeForce GTX 1080):

GLES3

image

GLES2

image

In both rendering backends, enabling Flags > Ensure Correct Normals in the SpatialMaterial does not resolve the issue. It does change the normals' appearance a bit, but it doesn't fix them.