Jump to content

Motion capture retargetting - how to figure out bclip length?


Recommended Posts

Hi there,

I'm trying to repurpose the Stadium mocap data that's included with the built in mocapbiped3 HDA, they're stored as bclips inside the HDA which you can save out to disk. Everything is working nicely using a combination of the AgentFromSop example and the CMU retargerting tutorial on the sideFX site. Using a TOPS network I can cycle through all the mocap clips in a folder, retarget them to a new rig and bake them down to MotionClips and apply them to my new Agent.

The only issue I have is each bclip file is a different length and currently the setup bakes out each clip cycling to what ever length my timeline is. The MotionClip node has a frame range option but I don't know to figure out the bclip lengths. I can clearly see in the CHOP network where the cycle point is on each clip but don't want to manually go through 37 clips.

Any ideas would be greatly appreciated!

Cheers

Martin

EDIT: So it seems the clip length is right there on the CHOP file node, but I don't know how to access it in SOP's.

CHOP.JPG

Edited by Martin B
Link to comment
Share on other sites

As often happens I figured it out just after posting. Its actually already calcluated in the shift_nFrames node in the biped3 chop network but isn't saved to a channel. chopl (channel length) / chopr (channel rate) *fps gives you the length of the current clip.

floor(chopl("/obj/mocapbiped3/CHOP/null1")/chopr("/obj/mocapbiped3/CHOP/null1")*$FPS)

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...