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

USDZ animation works on MacOS but not on iOS: Multiple Meshes and Single Armature #116

Open
enzyme69 opened this issue Dec 5, 2018 · 4 comments

Comments

@enzyme69
Copy link

enzyme69 commented Dec 5, 2018

puppet_share.zip

It's driving me mad when USDZ works on MacOS, but simply crashes on iOS without any error handling,...

The scene is basically some kind of flat puppets and everything is simple:

screen shot 2018-12-05 at 11 33 15 pm

[puppet_share.zip](https://github.com/kcoley/gltf2usd/files/2648791/puppet_share.zip)

Not sure why it crashes on iOS...

@kcoley
Copy link
Owner

kcoley commented Dec 6, 2018

@enzyme69 hmm, I am not sure why this is crashing on iOS, yet animates fine on Mac OS :/ This may be a bug or discrepancy with iOS's AR Quicklook implementation. Perhaps you can file a bug with Apple?

@enzyme69
Copy link
Author

enzyme69 commented Dec 6, 2018

Ok I will try doing that. As for iOS 12.1.1, it's still crashing.

Not sure if this related to previous thread on: not to use multiple color objects or something. Maybe not.

@enzyme69
Copy link
Author

enzyme69 commented Dec 6, 2018

I tried joining all the meshes into a single mesh, hoping that a single mesh + a single bone chain would do it, but when converting the GLTF, I am getting this error:

Traceback (most recent call last):
  File "gltf2usd.py", line 806, in <module>
    convert_to_usd(os.path.expanduser(args.gltf_file), os.path.abspath(os.path.expanduser(args.usd_file)), args.fps, args.scale, args.arkit, args.verbose, args.use_euler_rotation, args.optimize_textures)
  File "gltf2usd.py", line 754, in convert_to_usd
    usd = GLTF2USD(gltf_file=gltf_file, usd_file=usd_file, fps=fps, scale=scale, verbose=verbose, use_euler_rotation=use_euler_rotation, optimize_textures=optimize_textures)
  File "gltf2usd.py", line 55, in __init__
    self.gltf_loader = GLTF2Loader(gltf_file, optimize_textures)
  File "/Users/jimmygunawan/Desktop/puppet_share/_gltf2usd/gltf2loader.py", line 118, in __init__
    self._initialize()
  File "/Users/jimmygunawan/Desktop/puppet_share/_gltf2usd/gltf2loader.py", line 124, in _initialize
    self._initialize_materials()
  File "/Users/jimmygunawan/Desktop/puppet_share/_gltf2usd/gltf2loader.py", line 159, in _initialize_materials
    material = Material(material_entry, i, self)
  File "/Users/jimmygunawan/Desktop/puppet_share/_gltf2usd/gltf2/Material.py", line 115, in __init__
    self._pbr_metallic_roughness = PbrMetallicRoughness(material_entry['pbrMetallicRoughness'], gltf_loader) if ('pbrMetallicRoughness' in material_entry) else None
  File "/Users/jimmygunawan/Desktop/puppet_share/_gltf2usd/gltf2/Material.py", line 67, in __init__
    self._base_color_texture = Texture(pbr_metallic_roughness_entry['baseColorTexture'], gltf_loader) if ('baseColorTexture' in pbr_metallic_roughness_entry) else None
  File "/Users/jimmygunawan/Desktop/puppet_share/_gltf2usd/gltf2/Material.py", line 17, in __init__
    self._image = gltf_loader.get_images()[texture_entry['index']]
IndexError: list index out of range

@enzyme69
Copy link
Author

enzyme69 commented Dec 6, 2018

The issue seems to be resolved after I deleted one of the material that might be overlapping with the mesh. So I can convert the GLTF to USDZ.

And... the resulting USDZ is now working actually! One mesh, one armature is good.

img_2677

CONCLUSION for now:
Multiple meshes skinned into a single armature is not working on iOS, can still work on MacOS.

I am sending this "bug" to Apple.

@enzyme69 enzyme69 changed the title USDZ animation works on MacOS but not on iOS USDZ animation works on MacOS but not on iOS: Multiple Meshes and Single Armature Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants