Jump to content

Archived

This topic is now archived and is closed to further replies.

mala

Script To Remove Keys? & Auto Place Nulls In Joint Skeleton

Recommended Posts

Guest

What am I missing here?

Well in Malas' case I think he's looking for a way to quickly cleanup and reuse different mocap clips, and then blend them together almost the way a DJ can mix samples and loops together and 'jam' the music live..

In my case I'm trying to do pretty much what you describe, but again I want to make it reusable. I'm working in 10.5 so motion clips etc aren't available. For my purposes I don't think I need them really though.

My workflow is pretty simple now, it just took me a little while of experimentation to find a quick way to do it. Things like the Bake Objects script get around the need for the newer Bake function in R11 and CD Constraints are faster to set up than native ones anyway as you just hold control while adding one to get the set offset options.

Cheers,

Brian

Share this post


Link to post
Share on other sites

  • Topic Author
  • @Nebu...Thats not working for me..not sure why? the names are right and bvh and dummy have the same bones with same names...I think rather than me waste anymore of your time at this stage..I need to look at everything i've gone through so far..Cleaning the objects+keys and converting to MoClip as your previous version did is perfect,i just need to look at how that is applied.

    @Scott..think Brian has said it really...the main thing here was speed,Nebu's plugin/script very quickly cleaned up the bvh,got rid of load objects and keys i don't need and converted it to a motion clip.The problem i'm having is in re-applying this to my dummy skeleton thats driving the IKRig..issues with scale and differences in position of joints/bones.

    I've just tried your suggestions and it took a lot more time,and most importantly i have would have to re-make these parent constraints for every BVH i want to use...and i would have to rescale the bvh every time...I still want to get rid of the BVH file after conversion..Brians comparison to a DJ is spot on...i want to have a load of "tracks" i can call up and play/mix through my system/rig.

    My sticking point is still the differences in scale between skeletons.

    Cheers,

    mala

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Hi scott,what i mean by clean up keys is it removes Tracks i don't need...ie i only need position+rotation tracks of the rootbone and just rotation tracks of all the other bones....if you look at the bvh files...the position keys on all bones except the root is a constant value...removing these and some objects that are not required means you have less keys overall,which in turn makes baking to a motion source quicker....and viewport speed quicker....i'm not that concerned about keyreduction on tracks i am using...although that could be done,i think its probably best done manually.

    cheers

    mala

    Share this post


    Link to post
    Share on other sites
    Guest

    I found a nice quick way to remove redundant tracks from the BVH files using Harvester, here's a screen cap of the process. This should also work the same way for FBX etc.

    ScreenCapture (8mb QT)

    I've been trying the Retarget tag as suggested above but it doesn't work cleanly for me, I get weird stuff like both legs following the left leg and stuff like that. Maybe it doesn't like the extra objects changing the hierarchy I added to the Dummy Mocap Skeleton but you'd think with the hierarchy option off it would.

    Then I tried the same thing I did in my video above, using Harvester to copy the animation, but this time I did it from a different BVH file so I was copying an animation from an 'original' mocap file to the adjusted version I have that's fitted to the IK rig and it works.. perfectly.. :) The overall scale of the dummy mocap skeleton is a lot bigger than the mocap files but it works fine as I have the dummy inside a master null that has the scaling on it so the animation still fits the bigger rig. As I said before, there's no blending but you can do that with the NLA in R11 I guess.

    Cheers,

    Brian

    Share this post


    Link to post
    Share on other sites
    Guest

    Yeah I find Harvester very handy, well worth the price imo, I know Cactus Dan uses it too, in fact I believe he compiled the Mac version for Nathan the developer.

    Ok last clip for today.. just to show the setup I'm using right now. This was a quick test of what I mentioned above, namely copying the animation from a BVH file to the dummy version using Harvester.

    There are a few issues with the way I have the rigs constrained, particularly at the elbows but I can tweak that fairly easily. For illustration I left all of the elements visible - The red bones are the Mocap rig, the blue joints are the IK rig that drives the bone (as in human bone!) skeleton (as in human skeleton!) :)

    Right, that's enough MoCap for me today.. I need to do some mo'modeling on my gargoyle :) ..

    Cheers,

    Brian

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Hi Guys,right gonna spend today going through everything i've done so far and all your suggestions in logical fashion..and try and get this sorted

    @Brian i've been having exactly the same problems with the Retarget tag that you have found,which is what has been puzzling me so much about Kai's setup he mentioned at CGTalk...he says it works as long as you use "naming" and not the Hierarchy,but not for me rolleyes.gif

    Cheers,

    mala

    Share this post


    Link to post
    Share on other sites
    Guest

    he says it works as long as you use "naming" and not the Hierarchy,but not for me rolleyes.gif

    Hey Mala, that's been my experience too.. maybe he got lucky and found mocap files that just work for some reason, but none of the ones I've tried do.

    Cheers,

    Brian

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Well Think i've got it sussed now....famous last words!

    As far as the Retarget Tag goes,i did get it to work in the end....think what i was doing wrong was with how i had scaled the target rig...but i'm pretty sure i don't need the Retarget Tag for what i'm doing.

    This morning I used Nebu's plugin to convert 14 bvhfiles to motion source(Nebu thanks so much for this,its sped things up a lot,one final request though,can you rename the plugin "MoSauce" just for a laugh wink.gif )the files i used are from CGspeed.com and are in folder 117,they are mostly breakdance moves,kinda thing i was looking for and they are quite complicated lots of flips and fancy footwork,so seemed like a good way to test the rig.Nebu to match these BVH approx. in size to the CDIK Rig i sent you,Set BVH import scale to 50 in prefs.you'll still have to do a bit of scaling by hand but its close.

    I then built 6 different setups to test these "Motions" on....3 of the setups used the retarget tag and 3 didn't

    1- IKRig +DummySkeleton made from BVHTpose(parent null scaled with Object tool to approx my IKrig)

    2- IKRig +DummySkeleton made from BVHTpose(Parent null scaled as above and repositioning bones to match IKrig)

    3- IKRig +DummySkeleton made by converting joints(from IKrig) to bones(removing extra tip bones and all IK of course)

    On the above setups All MotionSource was applied directly to DummySkeleton.

    4-Same as setup1 above,but with an extra DummySkeleton made from BVHTpose with No Scaling

    5-Same as setup2 above,but with an extra DummySkeleton made from BVHTpose with No Scaling

    6-Same as setup3 above,but with an extra DummySkeleton made from BVHTpose with No Scaling

    On the above setups All MotionSource was applied to the "extra" DummySkeleton this was then Retarget-ed to the other DummySkelton

    Seems a bit over the top i know,but i was getting lost,so thought it was best to just compare all the possible setups.

    Results:

    Setups 3+6,with a DummySkeleton made from the IKRig Joints converted to bones,failed totally but was quite funny...looked like someone dancing with a dead body.

    Setups 1+4 with a DummySkeleton made simply by re-scaling a copy of BVH SkeletonTpose worked,but not great.

    Setups 2+5 with a Dummy skeleton from BVHtpose,rescaled and repositioning some bones worked the best,it followed the originalBVH the closest.

    Having the DummySkeleton with the Retarget tag(Setup4) made no difference what so ever that i can tell.

    The fact that a setup with dummyskeleton made from the BVH tpose,rescaled using Object tool on its parent null and joints carefully re-positioned worked best wasn't that much of surprise,because it's what I did when i started to try this,my problems arose from some of the BVH files at CGspeed.com....So if you are gonna try the same thing,look carefully at the BVH first,it was mainly problems with misaligned or different size Hip and shoulder bones that caused problems.

    Right hopefully i can just get on and make my animation now... :)

    Thanks to you all for helping...

    Cheers,

    mala

    Share this post


    Link to post
    Share on other sites
    Guest

    Cool, glad you got it sussed anyway. The only issue I'm having now is that I notice if you scale the BVH rig the animation seems to get a bit messed up sometimes, maybe it's down to values being rounded off or something like that. It seems like you don't need the Retarget tag and I've managed to work without it too for my needs but I was looking at this one which could be handy, only 20Euros so I might pick up a copy at some stage if I'm doing a lot of this, but I reckon you could build your own version with xpresso if you put the time in.

    Cheers,

    Brian

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • @Brian...yep had a look at that one,but thought it should be possible without it,as for your problem with scaling the BVH messing up the animation,do you mean scaling the bvh that has animation or scaling the non-animated tpose skeleton derived from the original BVH?

    I'm not scaling the animated BVH,just using Nebu's plugin to strip out all the bits i don't need and convert it to motionsource then apply that motionsource to a rescaled(un-animated)BVH skeleton.

    @Scott laugh.gif don't know about anyone else,but my head hasn't stopped spinning for the last few days...maybe i need to fix that head controller...

    Share this post


    Link to post
    Share on other sites
    Guest

    I found some more free mocap files, of varying quality, including another version of the exercise one that's a little cleaner than the 1st one I used above.

    You have to sign up to download the free ones but a lot of them have preview animations so you can see what youre getting , most of them come in several formats, nearly all are in FBX and BVH. A couple of funny ones further down the list.

    I found one there that works really well with the muscle rig, I'm going to bake it and then hand animate some hand poses and the back muscle morphs and turn this into something for my rigging reel.

    My head got a little wrecked with this too but I'm delighted now I started looking at it (cheers Mala!) as I think this should be a great way to demo the muscle rig.

    The Harvester plugin workflow is working pretty smoothly now, I've transferred several animations to the same rig now with success.

    Cheers,

    Brian

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Looking Good Brian sc018.gif I know you are doing this for showing your muscle rig....but the idea of a muscle man show for skeletons made me--> :)

    Share this post


    Link to post
    Share on other sites
    Guest
    This topic is now closed to further replies.

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×
    ×
    • Create New...