Import USDZ character with animation

   876   5   3
User Avatar
Member
10 posts
Joined: Oct. 2018
Offline
hello everyone,
I am trying to import a character with its animation saved in usdz format.
I downloaded it from sketchfab.com and it is a simple character with its own animation.
I'm using the "usdcharacterimport" node, but I can't get the animation to load at all.
I saw that the animation is present in the graph path, but I don't know how to activate it.

I think it's a very simple thing, but I can't find anything on the internet about it.

Thank you very much for any suggestions.

Paolo
User Avatar
Member
10 posts
Joined: Oct. 2018
Offline
Hello everyone,

here the usdz file:

https://we.tl/t-Eo3F7spfpc [we.tl]

this is a very sample scene with a swimming shark.

I need this animation in sop level because I have to retarget the animation to a different skeleton.

Can you help me please?

Thank you.

Paolo
User Avatar
Member
1743 posts
Joined: May 2006
Offline
There's been a few issues with sketchfab and their usdz output. Ultimately they're doing some weird stuff that makes most 3d apps unhappy. For the record Houdini won't load them, OSX preview won't load them, Blender won't load them, USDView won't load them.

The only apps that do load them are OSX quicklook (but you can't edit), and omniverse with some tweaking. Some clever folk found ways to help Houdini using code, but the fixes aren't consistent, every sketchfab animation seems broken in different weird ways.

I did have success saving the file from omniverse, and loading that into Houdini. This might be the answer in the short term until Sketchfab make changes their end.

  • Download omniverse, from their launcher, install composer
  • File -> Open, load the usdz
  • Switch to the animation layout
  • Expand the outliner to find the skeleton, its buried a few levels down in the SkinnedMeshes group
  • Find the 'Scene' node underneath that
  • Drag the scene node onto the shark mesh in the viewport
  • This binds the animation to the mesh, scrub the timeline to see it play
  • File -> Save, save it next to your usdz file with a new name

Now to load that into houdini and see it animate:

  • In houdini, create a usd character import node in sops
  • Point it to the new usd file
  • Set the skelroot to the skeleton in the usd file ( /scene/SkinnedMeshes/Sketchfab_model/root/GLTF_SceneRootNode/RootNode_0_0/skeletal_3_3/GLTF_created_0/GLTF_created_0_rootJoint/shark_root_4_4/skin0 )
  • Attach a joint deform node, you should see the shark swimming.
Edited by mestela - Feb. 13, 2024 16:18:06
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
10 posts
Joined: Oct. 2018
Offline
Wow, thank you Mestela!!!

Yesterday i tried to import it into omniverse and i was able to load the animation (as you rightly wrote) but i tried to export an fbx and the omniverse export completely broke the skeleton (i think omniverse fbx export sucks).

Stupidly I hadn't tried to re-export a usd.

Thank you very much for your help!

Paolo
User Avatar
Member
1743 posts
Joined: May 2006
Offline
Very much a team effort, I'm just the person writing things down.

Shortly after I tried that Omniverse method, Cameron White posted a native Houdini solution. Again not guaranteed to work in all cases, but fixes this particular thing.

My understanding is the drag-n-drop in Omniverse is doing 2 things, getting the skeleton configured for animation (which Sketchfab should be doing), and then binding the animation (which Sketchfab should also be doing). Houdini can do this but there's a few more steps involved (ideally you'd just put these nodes on a shelf or make an HDA, so you don't have to do all these steps every time):

First, prep the skeleton for animation:

  • In lops, create a file (or sublayer) node, load in the original sketchfab usdz
  • Append a confgure primitive lop
  • Set the primitive path, you can drag and drop it from the scene graph tree, or ctrl-click on the selector to bring up a floating outliner. Point it to the skeleton, which is at /scene/SkinnedMeshes/Sketchfab_model/root/GLTF_SceneRootNode/RootNode_0_0/skeletal_3_3/GLTF_created_0/GLTF_created_0_rootJoint/shark_root_4_4/skin0/skeleton
  • Enable 'Apply API Schema', set it to SkelBindingAPI

Next, bind the animation to the skeleton:

  • Append a edit properties lop
  • Click edit properties
  • In the filter at the bottom of the first column, search for animationSource
  • The column will find skel:AnimationSource in Schemas/SkelBindingAPI. Select it, click the arrow between the columns to add it, click accept
  • Set the primitives path to the same skeleton you set earlier
  • Set the skel:AnimationSource value to the 'swimming' skelAnimation prim. Easiest to drag and drop it from the scene graph tree, the path should be /scene/SkinnedMeshes/Sketchfab_model/root/GLTF_SceneRootNode/RootNode_0_0/skeletal_3_3/GLTF_created_0/GLTF_created_0_rootJoint/shark_root_4_4/skin0/swimming

The shark should now play its animation. To get this over to sops, you use the same usd character import sop, but this time point to lops instead of a usd on disk:

  • In sops, create a usd character animation sop
  • Set the lop path (in my case /obj/lopnet1/editproperties2 )
  • That will bring in the mesh and animated skeleton
  • Append a joint deform which will move the mesh using the joints.

Attachments:
sketchfab_fix.hip (131.0 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
10 posts
Joined: Oct. 2018
Offline
Thank you very much Matt,
I realised now that you are the founder of 'CgWiki'. Maximum respect, I really appreciate your work! I have learnt a lot from your channels.


Paolo
  • Quick Links