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

glTF importer fails to apply "normalized" accessor parameter #44744

Closed
adamscott opened this issue Dec 28, 2020 · 1 comment
Closed

glTF importer fails to apply "normalized" accessor parameter #44744

adamscott opened this issue Dec 28, 2020 · 1 comment

Comments

@adamscott
Copy link
Member

adamscott commented Dec 28, 2020

Godot version:

v3.2.3.stable.official
v3.2.4.beta.custom_build.74512fd8765782ba6e12c3816966e2313833a81f
v4.0.dev (783ec77)

OS/device including version:

Ubuntu 18.04, GLES3 (v3.2.3.stable.official)
Windows 10, GLES3/Vulkan (for v3.2.3.stable.official and the others)

Issue description:

Since (at least) Blender 2.91, the export glTF plugin exports vertex colors using the "normalized" accessor parameter. This parameter, if true, serves to announce that the data needs to be normalized before using it. (link to the definition)

For my project using PS1-style shaders, I intend to use vertex colors instead of textures for a lot of models, and as a custom shader must be applied, I cannot use standard materials. Therefore, I want to rely on the vertex colors set in Blender.

For this example, I will use my simple test model. It uses only vertex colors, no material is present in the file. The .glb and .gltf files of this example are present in the uploaded Godot minimal examples (in assets/models/).

Here is what my simple test model in glTF viewers:
normal-import

Here is what the model looks like in Godot 3.2 (it looks the same on 4.0; one sphere is the .glb, the other is the .gltf file; and I set the shading to unshaded for the demonstration):
glitched-import

When I print the vextex color data for each vertex, the data that shows up match the displayed sphere in Godot, not the gltf (or glb) file.

Steps to reproduce:

  • Import a .gltf or .glb file with one of their accessors having the parameter "normalized" set to true.

Minimal reproduction project:

issue-import-accessor-normalized-parameter-4.0.zip
issue-import-accessor-normalized-parameter-3.2.zip

@adamscott adamscott changed the title glTF importer fails to apply normalize accessor parameter glTF importer fails to apply "normalized" accessor parameter Dec 28, 2020
@akien-mga akien-mga added this to the 4.0 milestone Dec 28, 2020
@akien-mga
Copy link
Member

Fixed by #44745.

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

2 participants