godotengine / godot

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

Skinned meshes with blendshapes do not render on Android using GLES3 #43217

Open Arnklit opened 4 years ago

Arnklit commented 4 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: Skinned meshes with blendshapes do not render on Android. Issue was the same using glTF files and FBX files. I currently only have access to one android device. It is a Galaxy S6 running android 7.0. Using GLES3. image image

Steps to reproduce: Open the attached project and try to run it on an android device.

Minimal reproduction project: glTF_skinned_blendshape_no_render.zip

Calinou commented 4 years ago

It is a Galaxy S6 running android 7.0.

Unfortunately, that's quite old as far as mobile GPUs go. I doubt the OpenGL ES 3.0 support there is that good.

Arnklit commented 4 years ago

I know it's 5 years old at this point, but as far as I can find it's GPU launched with GLES 3.1 support. https://www.notebookcheck.net/ARM-Mali-T760-MP8.140006.0.html

But maybe someone with a newer device can do a test.

Zireael07 commented 4 years ago

A Mali device? Those are infamous for claiming to support GLES 3.1, but then doing a ... poor job of it.

EXOMODE commented 3 years ago

I fully confirm the presence of the bug (v3.2.4.rc1). I have attached a minimal production project that exports a character model from DAZ3D (also test with CC3 models, no diffs), try running the project on Android. When Force Software Skinning is enabled, the model is displayed and skeletal animations work, but the blendshapes do not work, when the parameter is disabled, nothing works at all, the console is also empty. I tested the project on Nox Player and Memu Play of the latest version, the problem is reproduced even there, i.e. it is clearly not in the Mali chips, it does not work even on the GPU of the PC! This problem has completely stalled the development process of my main project, because bland shapes not work anywhere on Android.

EXOMODE commented 3 years ago

How it works on a PC and on an emulator running on the same PC:

https://user-images.githubusercontent.com/18744132/106907594-7892f780-670f-11eb-8014-b04473c0c066.mp4

image

bruvzg commented 3 years ago

A Mali device?

It's broken in the Adreno 630 device (POCO F1). 3.2.4 rc1.

glTF_skinned_blendshape_no_render ![Screenshot_2021-02-04-16-59-29-515_org godotengine gltfblendshapenormal](https://user-images.githubusercontent.com/7645683/106912518-c60d6580-670b-11eb-8c3c-8c52aaa0fb7e.jpg)
BlendShapesGLES3Test Slider cause black spots to move. ![Screenshot_2021-02-04-17-04-49-771_org godotengine blendshapesgles3test](https://user-images.githubusercontent.com/7645683/106912679-e9381500-670b-11eb-9b4f-b371022dddd8.jpg)
BlendShapesGLES3Test with Force Software Skinning Slider has no effect. ![Screenshot_2021-02-04-17-08-19-628_org godotengine blendshapesgles3test](https://user-images.githubusercontent.com/7645683/106912685-eb01d880-670b-11eb-97a3-f03b4f0e7864.jpg)
EXOMODE commented 3 years ago

If the same model is imported in glTF format, it will have a completely similar behavior, only errors already appear in the console:

image

E 0:00:26.901   _display_error_with_code: BlendShapeShaderGLES3: Vertex Program Compilation Failed:
ERROR: 0:115: 'out' : must use 'flat' interpolation here 

  <Исходный код C++>drivers/gles3/shader_gles3.cpp:164 @ _display_error_with_code()

Moreover, the same error occurs if I try to import any model with blendshapes from Blender in glTF format. Perhaps this is due to incorrect export in the blender itself, but the behavior is absolutely identical on all my devices and emulators based on Android.

RailKill commented 3 years ago

This problem still exists in Godot 3.3.4 and can happen even on web builds using GLES3. The errors are exactly the same as reported by @EXOMODE. As shown in the screenshot below, the player model is exported from Blender as .glb and has a blend shape, but will fail to render (Brave Version 1.31.87; Chromium: 95.0.4638.54):

Untitled

Once the blend shapes are removed, the model will render just fine.

MJacred commented 2 years ago

Sounds similar to https://github.com/godotengine/godot/issues/44648 (if you ignore the platform).

You you check in Godot 4?
Might be fixed with https://github.com/godotengine/godot/pull/44649 in Godot 4 -> Over there, it was because of a faulty ERR_FAIL_COND. If it's the same, then a cherry-pick might be feasible.