Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invisible geometry importing glTF with more than 4 bone weights #56705

Closed
punto- opened this issue Jan 11, 2022 · 6 comments
Closed

Invisible geometry importing glTF with more than 4 bone weights #56705

punto- opened this issue Jan 11, 2022 · 6 comments

Comments

@punto-
Copy link
Contributor

punto- commented Jan 11, 2022

Godot version

v3.4.3.rc.custom_build [dd00219]

System information

windows 10, gles3

Issue description

When importing the attached glb, the geometry is invisible, seems to be empty, no vertices, When importing in 3.3 or 4.0, it loads correctly. The model has a skeleton and some animations, both seem to load fine

Steps to reproduce

import glb into project, load scene

Minimal reproduction project

bird.zip

@fire
Copy link
Member

fire commented Jan 11, 2022

Can confirm.

image

Photo is with the fix.

image

image

The bug happens when the skeleton is at the root.

Attached fixed bird.

bird_rev.zip

@lyuma
Copy link
Contributor

lyuma commented Jan 12, 2022

Well, I tried the model and got this error:

 modules/gltf/gltf_document.cpp:2684 - Condition "a.has("JOINTS_0") && a.has("JOINTS_1")" is true. Continuing.

This error means this model is not supported in Godot 3.4, because it uses more than 4 bone weights per vertex.

During the development of the glTF module, I remember that it was decided that models with more than 4 bones could not be reasonably imported (based on some chat conversations I had with @fire and others), because some pathological cases exist which require more than 4 bone weights to function. My opinion is that the top 4 bones could be selected and renormalized, but I would need to understand more to know if this is a viable approach.

I don't actually know how Godot <=3.3 dealt with models with >4 bone weights, such as JOINTS_0 and JOINTS_1. it's possible it just ignored JOINTS_1, but did it renormalize the remaining bones?

@fire
Copy link
Member

fire commented Jan 12, 2022

My last attempt at normalizing bones is here. #48360

@fire
Copy link
Member

fire commented Jan 12, 2022

Discussed what happens when the number of godot weights is above 8 like 16 weights with @punto-

  1. want to use the same algorithm as normalizing 4 weights
  2. normalize with the constants of 8 weights to solve more weights
  3. can also make @reduz 's once per frame compute shader support arbitrary weights

@Chaosus Chaosus added this to the 3.5 milestone Jan 12, 2022
@Calinou Calinou changed the title Invisible geometry importing glb Invisible geometry importing glTF with more than 4 bone weights Jan 17, 2022
@RockyMadio
Copy link

I can also confirm this. Either some rotation values are added into some bones (usually spines). After reimporting the gltf a few times, all meshes disappear.

@akien-mga
Copy link
Member

Fixed by #61912.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants