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

Validation for gltf export fails #47120

Closed
fire opened this issue Mar 17, 2021 · 3 comments
Closed

Validation for gltf export fails #47120

fire opened this issue Mar 17, 2021 · 3 comments

Comments

@fire
Copy link
Member

fire commented Mar 17, 2021

Godot version:
e57f6e2

OS/device including version:
Nvidia RTX 3000 series on win 10

Issue description:
glTF2 export should be loadable in Blender.

Steps to reproduce:

https://genshin.mihoyo.com/ja/news/detail/5885 Open lumine.

Load into Blender.

Install cats plugin.

Load mmd and click on the morph section to filter.

Convert material from mmd material to principled gltf.

Export as gltf.

Import into godot.

Export as glb.

Fail validation via https://github.khronos.org/glTF-Validator/.

Minimal reproduction project:

GLB that is export from Godot Engine.

mihoyo_lumine.zip

Godot Project.

Mihoyo Lumine Project.zip

mihoyo_lumine_report.zip

@fire
Copy link
Member Author

fire commented Mar 17, 2021

            {
                "code": "GLB_CHUNK_LENGTH_UNALIGNED",
                "message": "Length of 0x004e4942 chunk is not aligned to 4-byte boundaries.",
                "severity": 0,
                "offset": 187164
            },
            {
                "code": "MESH_PRIMITIVE_ATTRIBUTES_ACCESSOR_INVALID_FORMAT",
                "message": "Invalid accessor format '{VEC4, FLOAT}' for this attribute semantic. Must be one of ('{VEC3, FLOAT}').",
                "severity": 0,
                "pointer": "/meshes/0/primitives/0/targets/0/TANGENT"
            },
  1. chunk is not aligned to 4-byte boundaries
  2. tangents are vec3

@fire fire changed the title Fail validation for gltf export Validation for gltf export fails Sep 29, 2021
@fire fire assigned fire and lyuma Sep 29, 2021
@lyuma
Copy link
Contributor

lyuma commented Oct 5, 2021

The only validation error is this, repeated once per vertex:

            {
                "code": "ACCESSOR_WEIGHTS_NON_NORMALIZED",
                "message": "Weights accessor elements (at indices 0..3) have non-normalized sum: 0.9999849796295166.",
                "severity": 0,
                "pointer": "/meshes/0/primitives/0/attributes/WEIGHTS_0"
            },

I believe this is caused by the compression or quantization Godot uses on its in-memory format. 0.99998 seems close enough that it really shouldn't be an error, so I do not think this issue needs to be fixed...

But, if we feel this should be fixed, it could be by dividing by the sum of the weights on export as well (currently we only do this on import).

@fire
Copy link
Member Author

fire commented Nov 1, 2021

Fixed by #54249

@fire fire closed this as completed Nov 1, 2021
@akien-mga akien-mga added this to the 4.0 milestone Nov 1, 2021
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

4 participants