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

Cannot resolve normalized_image_path #56

Open
henrytriplette opened this issue Jan 9, 2024 · 4 comments
Open

Cannot resolve normalized_image_path #56

henrytriplette opened this issue Jan 9, 2024 · 4 comments
Labels

Comments

@henrytriplette
Copy link

henrytriplette commented Jan 9, 2024

Expected Behavior

When trying to optimize a glb file, application should return an optimized glb file.

Current Behavior

When trying to optimize a glb file, application returns ValueError: Cannot resolve *13 and quits

Steps to Reproduce

  1. Using latest Windows version - yoga 1.3.1
  2. Using latest Windows version of Blender - blender 4.0.2
  3. Using Blender glb/gltf exporter, export 3D model
  4. Using Yoga, run yoga model input.glb output.glb

Context (Environment)

  • OS: Win 11
  • Blender: 4.0.2
  • Yoga: 1.3.1 / 1.3.0

Detailed Error Log

Traceback (most recent call last):
  File "C:\yoga\yogawin.py", line 6, in <module>
  File "C:\yoga\yoga\__main__.py", line 25, in main
  File "C:\yoga\concurrent\futures\_base.py", line 449, in result
  File "C:\yoga\concurrent\futures\_base.py", line 401, in __get_result
  File "C:\yoga\concurrent\futures\thread.py", line 58, in run
  File "C:\yoga\yoga\model\__init__.py", line 251, in optimize
  File "C:\yoga\yoga\model\helpers.py", line 135, in model_embed_images
ValueError: Cannot resolve *13

Possible solution

Maybe is something related to the blender exported file?

@flozz flozz added the bug label Jan 12, 2024
@flozz
Copy link
Member

flozz commented Jan 12, 2024

Hello,

Can you provide a 3D model that cause this error to allow me to reproduce? :)

@henrytriplette
Copy link
Author

Sure thing,

Here is the file [LINK]

@flozz
Copy link
Member

flozz commented Jan 12, 2024

Ok, it seems we do not handle properly textures embedded in GLB...

If I provide a fallback texture, it works bit the output files goes to 10 MB...

$ python -m yoga model --fallback-texture fallback.png issue56.glb out.glb
Warning: Cannot resolve *13, using the fallback texture instead.
Optimizing fallback texture...
Warning: Cannot resolve *14, using the fallback texture instead.
Warning: Cannot resolve *12, using the fallback texture instead.
Warning: Cannot resolve *10, using the fallback texture instead.
Warning: Cannot resolve *11, using the fallback texture instead.
Warning: Cannot resolve *9, using the fallback texture instead.
Warning: Cannot resolve *7, using the fallback texture instead.
Warning: Cannot resolve *8, using the fallback texture instead.
Warning: Cannot resolve *6, using the fallback texture instead.
Warning: Cannot resolve *4, using the fallback texture instead.
Warning: Cannot resolve *5, using the fallback texture instead.
Warning: Cannot resolve *3, using the fallback texture instead.
Warning: Cannot resolve *1, using the fallback texture instead.
Warning: Cannot resolve *2, using the fallback texture instead.
Warning: Cannot resolve *0, using the fallback texture instead.

$ ls -lh out.glb
-rw-rw-r-- 1 fabien fabien 9,6M janv. 12 16:35 out.glb

I am not good enough on the 3D/Assimp part to help more with this issue :/


Maybe related issues:

@flozz
Copy link
Member

flozz commented Jan 12, 2024

Also, there is noticeable changes between texture of the original GLB and the outputed one:

image

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

No branches or pull requests

2 participants