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

Bug: GLTF 1.0 Importer emission not loaded #6003

Open
crazyjackel opened this issue Feb 17, 2025 · 5 comments
Open

Bug: GLTF 1.0 Importer emission not loaded #6003

crazyjackel opened this issue Feb 17, 2025 · 5 comments
Labels
Bug Global flag to mark a deviation from expected behaviour

Comments

@crazyjackel
Copy link
Contributor

Describe the bug
GLTF Importer does not ever load in emission colors/textures

To Reproduce
https://github.com/assimp/assimp/blob/master/code/AssetLib/glTF/glTFAsset.inl

It is noticed that emission is not loaded in as a TexProperty with diffuse, ambient, and specular.

I have not had time to confirm, but I looked at all references and saw no other loading for the value. I just want to make note of this.

Expected behavior
Emission should be loaded in as per normal

Additional context
This was conducted by code read-through. I am not sure it is good to report read-through bugs as they haven't yet caused any issues, but thought I would mention this.

@crazyjackel crazyjackel added the Bug Global flag to mark a deviation from expected behaviour label Feb 17, 2025
@kimkulling
Copy link
Member

glTF1.0 or glFT2.0?

@crazyjackel
Copy link
Contributor Author

glTF 1.0, I provide asset. A good way to see this is to ctrl-f 'emission' and ctrl-f 'specular' noting how specular is read in and emission is not.

@tellypresence
Copy link
Contributor

tellypresence commented Mar 1, 2025

glTF emissive texture support in assimp has been solid for years, at least for glTF 2.0.

Please close this issue, or rename to make clear it's specific to glTF 1.0 (note that latest khronos sample assets only provides glTF 2.0 models)

Here's glTF 2.0 DamagedHelmet.glb from the legacy/archived khronos glTF models repo demonstrating working emissive texture:

@tellypresence
Copy link
Contributor

glTF 1.0, I provide asset

@crazyjackel Please attach asset or add download url, thank you

@crazyjackel
Copy link
Contributor Author

crazyjackel commented Mar 1, 2025

glTF 1.0, I provide asset

@crazyjackel Please attach asset or add download url, thank you

I want to really apologize, I did not reread my own comments. I discovered during a code read-through that the 'emissive' variable is not used to be set on the material.

In Material::SetDefaults, when it runs: SetVector(emission.color, 0, 0, 0, 1);, that emission.color is always the default as it is not read in during during Material::Read inside glTFAsset.inl.

https://github.com/assimp/assimp/blob/master/code/AssetLib/glTF/glTFAsset.inl
When I wrote "glTF 1.0, I provide asset." I meant to refer to this link ^.

I originally reported this as 'specular', which is a similar property, is handled differently.

@crazyjackel crazyjackel changed the title Bug: GLTF Importer emission not loaded Bug: GLTF 1.0 Importer emission not loaded Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour
Projects
None yet
Development

No branches or pull requests

3 participants