Motion tracking w bone rig?

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
madrobot
Posts: 667
Joined: Mon Apr 07, 2008 3:07 pm

Motion tracking w bone rig?

Post by madrobot »

Posting this on behalf of Chucky cheese;

Chuck says (imagine this part in the voice of the dorky professor from the Simpsons. Finkenburger or whatever.):-

"HI guys,
So what's the trick with strapping bones to tracking targets? The manual seems to suggest that this can be done but beyond that, I haven't stumbled on the method yet.
Do the bone lengths adapt? I assume they will, and can we make a full skeleton work ?
The tracking works beautifully I am expecting this to be a breakthrough feature.
Madrobot is posting this on my behalf as I have lost my internet for a couple of weeks (service providers... naaaarrgg!)
So he will responding here and there also.
Thanks robot :)"

Image

Madrobot says (in cool deep voice like Dean Martin):-

Edit: Chuck rang mumbling some nonsense about
"I got it to work with 2 bones, but each chain has to be on a different layer, so then my shape edges don't look nice, I want to have all the bones in the whole rig on one layer."
User avatar
Mikdog
Posts: 1901
Joined: Tue Jul 05, 2005 3:51 pm
Location: South Africa
Contact:

Post by Mikdog »

Are you kidding? I can just IMAGINE the possibilities! Sticking ping-pong balls to my joints, videoing myself dancing, then attaching bones to those ping pong balls! HUZZA!!! Dancing character in AS!

I'm pretty excited about this feature.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

You basically want to start with the highest parent bone you plan on tracking. From there, you only track the tip of the bone if the parenting chain is handling its base. And you want to run the tracking for each bone individually, so that you can do this.
User avatar
madrobot
Posts: 667
Joined: Mon Apr 07, 2008 3:07 pm

Post by madrobot »

Thanks for the replies guys.

Yep apparently in Chuck's test the bones in the chain already scaled to follow the targets too. Neato.

Mikdog yep that's exactly what we were talking about! Exciting huh.
Chuck already capers around like a marionette, so once we stick some balls on him :shock: we're away.

Synthsin, that sounds promising. Thanks. So have you been able to hang a full rig off targets? That would be awesome.

I tell you what, half the time I don't know what Chuck's on about. One thing I do know is he left a wierd smell in my car yesterday.

But this feature is pretty exciting. And impressive IMHO.
I like how it's all in the one app.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Yep hi, posting from work here. Thanks Robo for posting that image for me , in your best drunken Dean Martin yodel , oh yeah, sorry about the car thing... :lol:
Ok I know we can get a full rig of bones that are not joined to each other, only the tracking points, so that's not that fantastic but a cool start.
The problem is then binding a nicely designed character in a proper flexible way as we would on any other working rig.....not an experimental rig .... a proper working rig.
I believe the new scripting features allow for access to more than one layer at once I'm sure this could work properly.

So I might say in the husky tones of Ja Ja..."

It seems the best way to get a full skeletal rig that tracks- (with IK when not tracking) that binds correctly to its child layers and shapes is like this.

The bones that form an IK chain in a full skeleton all track the secondary points except for the root of the skeleton.That would mean an adaptation the the way the tracking works.... Then we might have something, otherwise the system is a brilliant and effective precursor but has limited applications.
Although dropping an animated character into live action is great, we want more... greedy aren't we?
So anyone want to play with this? I will personally be very grateful and you will surely be immortalised in ASPRO history.
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Chucky,

Forgive me if I'm not *quite* following all here, but is what you're saying that the only way to bone track is to put each separate chain (um, perhaps a leg) on its own layer? And, of course, that's not a full rig (which would be all on the same layer).

I haven't tried this at all, but how exactly does the bone tracking get done? Doesn't it just put keys on the timeline? So for the bones there are all these keys that control them? If so, couldn't we just copy the keys for those bones to the layer that has the full rig? (If the bones are named this same this can be scripted).

I'll have to play around with this but I'm not sure when/if I can find the time. But if any of what I'm supposing is true, then it should be possible now to do what you want.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Hmmm, that's not a bad idea.
The truth of the bone chain to target issue is that without some scripting, only one bone will track at a time.
Having said that it will track , the position, rotation and even the bone length adjusts accordingly , which is brilliant for foreshortening and therefore convincing results.

Any amount of bones can be in a chain and same for the amount of targets (which can all be named), so there doesn't seem to be any reason for this not to be improved with an elegant scripting solution.....not that I can claim to know anything about that.

I hope this makes sense. :?
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Okay, I get it.

What we really need here is just a way to turn IK on and off. You're saying we can set up all the bones to track, but if they are part of a chain it won't work because by having IK on that chain you can only have one bone tracking, right? But you could have ALL the bones track as long as they weren't linked to each other (parent/child).

In my 3D software we'd do just this -- turn IK off and then load in motion tracking files and when we wanted to animate by ourselves again we'd turn IK back on. It could even be controlled by bone (so, for example, you could have the legs tracked but then manually manipulate the torso/arms). You can also "blend" IK with motion tracking, etc. etc.

Can that be scripted? I'd have to think about that (it's really early in the morning for me right now :>) but offhand I don't see why not. If you could save the parent/child chain info, turn it off for motion tracking, and then put it back in I think you'd have what you want. It might not even be very difficult (once again, too early).

Vern's the bone master around here (somehow that doesn't sound right) so perhaps if he sees this thread again he'll comment, but I *think* you can have all you want right now within the present incarnation of AS.
User avatar
slowtiger
Posts: 6067
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

I don't have v6 yet, so could you test this: create a bone chain where all but the root bone are controlled.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I haven't completely investigated entire bone rigs with tracking yet. My initial experiments only involved rotation which caused me to miss the problem regarding perspective and foreshortening and the child bone
chains.

-------

The following is a "thinking out loud" process that often gives me insight...

From a scripting perspective this issue has to do with "doubled" motion of the bone to it's parent tracking the same point/s.

Turning IK off isn't "fancy" actually. It is the same thing we did ages ago to include the angle offset in the child bone's position. It is exactly the same as Fazek's translate bone tool that allows movement of parent bones without moving the child bones. That is what really causes the issue with motion tracking. The child bone's position is always "0" in relation to the parent.

What is needed to solve this and create an "IK switch" would be to include the parent offset for all the bones in a chain. I already do this with my copy/flip/paste bone scripts. When creating those bones I have to include the offset to the parent. As I said, Fazek's bone translation tool also does this, so the "code" is "out there".

So... the idea would be to have a script that would be controlled somehow (with a button or attribute of another bone) so it includes the offset when doing video tracking. I think the bone control would work best. Move or rotate a special bone and it keys IK off/on.

With IK off, the layer script would key every bone's translation minus the parent's translation/rotation offset. It would actually make the entire rig behave as if all the bones were "root" bones. This would be a simulation of course. From that key foward the script would control the bones rotation and angle if it has a parent. This would be done WITHOUT keys since keys are being placed by the tracking feature.

Probably... this could be done AFTER tracking the bone. So it could be a "button" that you click after you have tracked the bone and created the keys for IK.

Turning IK back on again would key all the bones in their current positions and return the bone behavior "back to normal".

<sigh> more complicated than it sounds. ;)

-vern
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Yay , I got my internet connection back... or I should say a brand new one. :?

IT FREAKN WORKS!!!!
OF COURSE!!!!
No chains, just separate bones!
I think the manual or help PDF should demonstrate this, but wait..... ssshhhhh don't tell anybody! this is TOOO goood!

Time for a 'Mwaa Mwaa Mwahhaaahhaaa!' :twisted:

Will post demo toon when time permits.
jackismyazz
Posts: 53
Joined: Sat May 02, 2009 11:18 am

Post by jackismyazz »

make a small tut. please :(
User avatar
madrobot
Posts: 667
Joined: Mon Apr 07, 2008 3:07 pm

Post by madrobot »

That's amazingly good news dude.

Well done.
User avatar
Mikdog
Posts: 1901
Joined: Tue Jul 05, 2005 3:51 pm
Location: South Africa
Contact:

Post by Mikdog »

Hey. Please make a simple tutorial or post your work on Youtube, evil genius. Please. I wanna see your test examples. Guy. Please.
User avatar
mkelley
Posts: 1647
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley »

Right, it should work that way.

But, as I said, I think you can eat your cake and have it as well. It should be possible (and fairly easy) to script a solution where your rig is both motion controlled AND IK controlled. All that has to be done is turn off the parent/child info (and then turn it back on).

Vern -- you may be right about saving/applying parent offsets, but I wasn't thinking of anything that complicated. I was just saying that you can assign a null to the child of any bone -- temporarily turning off the chain -- and then reassign it back to the parent. Now, we'll have to preserve the parent bone ID but doesn't the new scripting allow for that kind of data storage?
Post Reply