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

Latest version works perfect spoton.gif

sent you PM btw

Cheers,

mala

Share this post


Link to post
Guest

Well, I though I was wasting my night last night as for ages the results looked pretty bad, but then it started coming together a little. This is using one of those other BVH files I have, they are 30fps to begin with so much easier to manage for me.

They don't have a T Pose at all though, so I ended up creating a new T Pose for both the mocap skeleton and the IK rig (Using the CD Bind Skin tag to store these right inside the rigs themselves - this new feature is handy for so many things I just love it). Once I had the skeletons lined up pretty closely I created the root nulls for the IK controllers, constrained the controllers to them and then made them children of the mocap skeleton.

These Mocap files only have one joint for the foot though, no toe joint, so there's some manual work to add on top of what's there.

It seems to me that this is likely to be a usual stage of production with this kind of work as I guess the mocap rig will rarely just map totally cleanly to the IK one.

I was thinking about different methods to clean up the data and I had a bit of a brainwave - instead of fussing with the mocap too much and trying to get constraint offsets perfect I'm going to try baking the IK controllers and then deleting their constraints. (In R10 when you bake in the timeline it creates new copies of the objects which is no good for this but I have a script someone posted on CDTalk that will run through the timeline and key the controllers themselves). My reasoning behind this is that for things like the feet and getting them to stay contacting the ground cleanly it's a nightmare working with the mocap skeleton animation as you're essentially doing it in FK, which means loads of counter animation to keep the floor contact clean. If you bake the controllers you are then back to IK so you can adjust things like the Y-height right in the timeline.

The last issue then is dealing with so many keyframes on each controller - and the answer to that it seems is working in Reduced Modification mode with the FCurves, I haven't used it much before but I started learning more how to use it last night and wow, it's really powerful for this type of thing. You can move, scale and rotate whole chunks of animation with very precise control. It may even work for 'smoothing' out the curves as you asked about before. Have a look at 3D Kiwis' tutorial for the R10 timeline (be warned it's a long one!) if you havent used RM curves before, it seems like they were made for dealing with stuff like this.

Here's the current state of the clip, I havent' baked anything yet and you can see some parts look pretty wonky, but I think with some work and by applying some animation skillz on top of this I might get something decent :) (you should see it with the muscles showing too.. it's mad.. I'll only show that when it's working a little better though :) )

Here's the Clip (5mb QT)

Cheers,

Brian

Share this post


Link to post

Hey Brian,looking cool mate spoton.gif would love to see it with all the muscles as well.

Good to see i've got you into this,Are you using the CDBindSkin on the MoCap Skeleton to store the tpose you've made or am i misreading that?

I was at one point thinking about baking the target nulls after they had been placed in the BVHSkeleton,that way you are dealing with less objects,should still hopefully get all the curves,providing the skeleton was scaled well,and you can still animate on top with IKcontrols if you use the parent&child setup you suggested over at CGtalk.

i really need to play about some more with the bascis of the method,the scaling of those bvh has been causing me some problems...Nebu has done amazing work with that plugin,getting the BVH to a nice 'light" motion source is ideal,because these can be blended really easy with the motion system..its just getting this Dummy rig right thats spinning me out

I'm guessing that the scaling was why Kai was using that 'in between"Rig with the retarget tag....but my attempts with the Retarget have not gone well.....are you still using Harvester somewhere in your pipeline?

@Nebu....Did those rigs i sent you make any sense,have you had any luck with them?

Cheers,

mala

Share this post


Link to post
Guest

Thanks guys, I'm glad I got into it now as it seems it could be quite useful, I want to make a little demo clip of the muscle rig to have on my web rigging reel so this might be a good way to do it.

,Are you using the CDBindSkin on the MoCap Skeleton to store the tpose you've made or am i misreading that?

Yeah, I just added a BindSkin Tag to the root null of the mocap skeleton, selected all of the bones (CD Transfer tools Select all Same command is very handy for this kind of thing) and dragged them into the object list and set the pose. It means if I want to reuse the rig I can then delete the animation from the mocap, restore the bind pose and key that pose if needed and then copy in another animation from a different BVH file to the mocap skeleton using Harvester. There's no blending with this setup but I could adapt it so that I have 2 mocap skeletons and transfer different animation to both and then blend the IK rig between them using constraints. That's overkill for my purposes right now though, I really just want to get the exercise animation baked into the IK rig and then try cleaning it up. I'll pose some more tests if I get some progress on it.

Cheers,

Brian

Share this post


Link to post
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

@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

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
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
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

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
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...