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

Reimporting assets that use KHR_materials_variants breaks variants #2431

Open
The0Dev opened this issue Dec 4, 2024 · 1 comment · May be fixed by #2432
Open

Reimporting assets that use KHR_materials_variants breaks variants #2431

The0Dev opened this issue Dec 4, 2024 · 1 comment · May be fixed by #2432
Labels
bug Something isn't working

Comments

@The0Dev
Copy link

The0Dev commented Dec 4, 2024

Describe the bug
When I export an asset that uses KHR_materials_variants and import it back it somehow ends up broken.

To Reproduce
Steps to reproduce the behavior:

  1. Import suzanne_mv_test.glb (this asset passes validation without any errors and can be viewed in Babylon.js)
  2. See that variants are not displayed properly.
    Exporting this asset back produces a broken gltf file.
    image

Expected behavior
It should be possible to export and reimport assets that use KHR_materials_variants and preserve their functionality.

.blend file/ .gltf (mandatory)
material_variants.zip

Version

  • OS: Linux
  • Blender Version: 4.2
@julienduroure
Copy link
Collaborator

Confirmed.
The root issue is not the import, neither re-exporting it.
But the root cause is the initial export that creates the suzanne_mv_test.glb file, with extras.
This extras (that store variant) info needs to be excluded from export.
Because, when importing variants + extras, there are some conflict.

Tested with importing without any extras (in debug), and can see the variants, and re-export is OK (tested in babylonjs)

@julienduroure julienduroure added the bug Something isn't working label Dec 4, 2024
julienduroure added a commit that referenced this issue Dec 4, 2024
@julienduroure julienduroure linked a pull request Dec 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants