kcoley / gltf2usd

command-line utility for converting glTF 2.0 models to USD
MIT License
263 stars 39 forks source link

Multiple objects animation (no armature) failed to convert #168

Open enzyme69 opened 5 years ago

enzyme69 commented 5 years ago

I have spheres and cones that were constrained into bones (BVH mocap animation), which I then baked, so I have like 100+ animated objects.

As GLTF, I can see them animating when I use gltf viewer (online). However converting them into USDZ and I am getting just a static result. Wondering why?

If using Apple's own usdzconvert tool, usually Armature + Mesh works fine, but in this case, 100+ animated objects are not good.

enzyme69 commented 5 years ago

Kind of related, but I tested a couple of BVH mocap armature into Blender and then trying to export and getting all kind of weird USDZ animation...

The issue seems like the Armature is all just a separate bones, and seems like Apple usdzconvert and GLTF2USD also cannot handle such hierarchy...

BLEND Blender 2.80 BVHRunner_005.blend.zip

Wondering if this is something that can be fixed?

enzyme69 commented 5 years ago

As GLTF this works: ManyAnim.zip

But when converted to USDZ, it failed...

enzyme69 commented 5 years ago

It's just 2 box object animated for 10 frames.

I provide the blend, usda, gltf, fbx --- none of them works... only 1 object animating >< boxanim.zip

enzyme69 commented 5 years ago

This one actually works... parented all objects into an empty called ROOT. It's weird. I think I've done something similar in the past (?) with eyeballs animation.

this_work_parented_ROOT.zip

enzyme69 commented 5 years ago

I tried with my Torus, with root parent... still does not work. It does not make sense...

Archive.zip

enzyme69 commented 5 years ago

My feeling is that somewhat "only 1 animation" possible under 1 action take. Sometimes with the right "hack" multiple objects can work.

I tested with Sketchfab and very often only 1 animated object works... unless ...

enzyme69 commented 5 years ago

My quick solution so far is to bring all those animated objects into SKETCHFAB, and then redownloading the gltf...

https://sketchfab.com/3d-models/hundred-torus-procedural-animation-fd8c3e9676944d9c8faf973d47898f39

It's weird but works. Someone at Apple, working on usdzconvert need to investigate this.

enzyme69 commented 5 years ago

Twitter Thread: https://twitter.com/jimmygunawanapp/status/1156732937565429767?s=20

I am still wondering what Sketchfab did when converting BLEND into GLTF that works with the converter...! BIG MYSTERY.

enzyme69 commented 5 years ago

From Ash, one solution is to export as DAE, import back into Blender, export as GLTF. Then it works. Strange?

enzyme69 commented 5 years ago

The answer might lie in "keyframing" everything, every channel properties and attributes of the objects, so they are all "identical" ...

Screen Shot 2019-08-01 at 1 05 47 pm