Making the NLA useful

Animation tools, character animation, non linear animation

Moderators: jesterKing, stiv

harkyman
Posts: 278
Joined: Fri Oct 18, 2002 2:47 pm
Location: Pennsylvania, USA
Contact:

Postby harkyman » Thu Apr 15, 2004 3:07 pm

oin and slikdigit, I looked at both of your examples. oin, that's a really powerful system, but I don't really see how Blender could incorporate somthing like that at this point. I've only gone through the armature and NLA code on a skim-it-for-a-basic-understanding basis, but I just don't see how this could be done based on the current framework.

slikdigit, your example is cool, and I know you don't think you have a need for my proposal. But trust me, if you want to use the NLA with any kind of flexibility, i.e. moving strips around, adding and subtracting actions, moving your character's object around via standard keyframing, etc., you need it. You solution works very well, but what happens if you want to have twenty different characters, all based on the same rig, and you want to animate them from a list of thirty different actions?

Coders, I'm looking for some assistance now...

I'm going to try to put my idea into the code. Here's my algorithm:

1. Find difference in local orientation/translation of the pinned bone between the current bone position and the bone position in the NLA strip being evaluated.

2. Apply that difference, on the fly, to the armature at the object level.

To do that, I need to answer the following questions:

1. Is there anywhere currently in the Blender code, either main source or Python, that gives the orientation/position of a bone, local to the armature?

2. Where is the actual NLA/Action information applied in order to generate transformed skeletons and meshes for both display and rendering?

This does not seem like that complex of a problem, and the benefits would be great. Anyone that can point me in the right direction would be my personal hero, for at least a week.

slikdigit
Posts: 213
Joined: Wed Oct 16, 2002 3:52 am
Location: Northampton, MA (US)

Postby slikdigit » Thu Apr 15, 2004 4:22 pm

hmm. quick workflow explanation:
we start with one armature that has two actions available
we mix these actions in the nla using blendin or whatever
we see the feet slide
we create an empty/object/armature to provide a target for the foot (could be a copy of the original armature) or just an empty n each foot location
we click on the original foot bone. this is an ik goal that moves the leg chain typically
we give it a copy loc constraint to the empty or bone we've decided to pin it to.
voila! it doesn't slide. and we can constrain the foot position via moving the target bone.
In the case of a walkcycle, you can, in the constraint window click on 'edit constraint button, and then, in an ipo curve window in the constraint mode you can animate the influence of the constraint to only apply where you want it to.

OR:
(easier way) you can create a new action with the feet pinned where you want them (copy the keys and spread it so the strip will have some length), and have it be the topmost action. You can use blend in/blendout to animate its effect, or if its constant, just stick it in the beginning of the timeline and turn hold on. Either way will work, but the former way seems closer to harkeyman's idea of pinning bones, whereas the latter is more like cretaing special blend actions (not likely for reuse)



I'm not against a way to do it that's more intuitive, however, it doesn't (in my opinion) give new features, only new workflow. If its done right, it could be very nice/intuitive. I'm no expert, b

Monkeyboi
Posts: 561
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Postby Monkeyboi » Sun Apr 18, 2004 5:57 pm

Today I have made two mockups showing some of the proposed new NLA functions in action.

Here in the first picture you can see that a new strip influence system has been incorperated. It works by pressing [Tab] to enter Edit Influence mode. You can then leftclick inside strips to add points, rightclick on points to select them and use [G] to move them around. Press [Tab] again to exit Edit Influence mode.
A second new thing is the ability to add strips through the GUI. Press the 'Add Strip' button to bring up a list of avaiable strips to add. This works just like pressing [Alt]+[A].
For cosmetic reasons I made the channels resemble the panels found elsewhere in Blender. This also has a useful advantage - you could now minimise channels using the little arrow.
A big thing that isn't apparent from the mockup is Slikdigits idea of being able to reorganise strips vertically. This should definately be possible. Another thing is that constraint IPOs should be part of the action so that you can use them properly when mixing strips.

Image

The Properties panel [N] has also been included in the Strip menu. This brings up a recised version of the old Action panel which I renamed to Strip Properties. I have changed it from a static confirm-panel to a floating panel like the Transform Properties panel in the 3D window. The 'Action' dropdown lets you replace the selected action quickly. Useful. You will notice the absence on 'Blendin' and 'Blendout', this is because of the new and superior Edit Influence mode which gives you much more control.

Image

What do you think of how this looks? Comments appriciated.

slikdigit
Posts: 213
Joined: Wed Oct 16, 2002 3:52 am
Location: Northampton, MA (US)

Postby slikdigit » Sun Apr 18, 2004 7:44 pm

Monkeyboi: I think it looks very nice/useable- the add strip button adds some horizontal space, but I can see how it is more approachable for new users.
Harkeyman: for some reason I didn't see your post till now: Rest assured, I will use your feature! as I said, I can do this under the current system, but, a fast workflow is always a desireable thing. I'm a little mystified that I didn't see your last post till now- perhaps I needed to press the 'refresh' button on my browser, or perhaps it is just blindness :? .
In any case, good luck with coding this. I hear from some developers that the armature/nla code is one of the hardest to deal with areas in blender. I know there is a struct "Bone" defined in DNA_armatures_types.h that has the head,tail location and various transformation matrixes associated with a bone in it; I used it while playing with constraint code to get head and tail postions of the bone. Good place to start anyway. I don't know anything about the NLA code, unfortunatly.

ilac
Posts: 180
Joined: Mon Oct 14, 2002 8:24 am

Postby ilac » Sun Apr 18, 2004 7:59 pm

Monkeyboi wrote:Today I have made two mockups showing some of the proposed new NLA functions in action....

...What do you think of how this looks? Comments appriciated.


Looks great! I had once suggested the Influence IPO. can't remember if it was on the board or one of the mail-lists. I think I remember Aphex saying it shouldn't be too difficult to implement and would give it a go. It either slipped his mind or wasn't as straightforward as I'd had hoped cause i don't recall it ever being brought up again till now. Hopefully he's following this thread and it might re-inspire him! :wink:

Meta-strips might be a nice feature, and also the ability to copy strips from one armature to another too!

Like slikdigit, I too find the NLA feature already very useful as-is but welcome all possible improvements!

Monkeyboi
Posts: 561
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Postby Monkeyboi » Sun Apr 18, 2004 8:09 pm

slikdigit wrote:Monkeyboi: I think it looks very nice/useable- the add strip button adds some horizontal space, but I can see how it is more approachable for new users.


In actual fact it is no wider than before. Check it! :wink:

ilac wrote:Meta-strips might be a nice feature, and also the ability to copy strips from one armature to another too!


Hmm.. You mean the ability to coby NLA data from one object to another? Like a way to copy the strip matrix? Good idea. I suppose it would work hand in hand with the NLA datablock system. The NLA would have to be changed so that it only shows one object though.

ilac
Posts: 180
Joined: Mon Oct 14, 2002 8:24 am

Postby ilac » Sun Apr 18, 2004 10:08 pm

Monkeyboi wrote:
ilac wrote:Meta-strips might be a nice feature, and also the ability to copy strips from one armature to another too!


Hmm.. You mean the ability to coby NLA data from one object to another? Like a way to copy the strip matrix? Good idea. I suppose it would work hand in hand with the NLA datablock system. The NLA would have to be changed so that it only shows one object though.


I don't see why!

It could be implemented in several ways. Eg. Once a strip/strips have been added copied to the 'clipboard', a 'Clipboard' item could apear under the 'Add Strip' menu list. ie. Add Strip> Clipboard

One thing you should/could add next time you do a mock up is that the influence ipo gives you the ability to repeat an action, with an intermediary space, without having to add duplicate strips. Eg, you can have Randall_wave from frame 6-20, and 52-62 with no waving in the time period 21-51. With the current system you need a separate strip for every non-sequential waving occurance. With an influence IPO, one strip should be enough most of the time!

:D

Monkeyboi
Posts: 561
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Postby Monkeyboi » Sun Apr 18, 2004 10:18 pm

ilac wrote:It could be implemented in several ways. Eg. Once a strip/strips have been added copied to the 'clipboard', a 'Clipboard' item could apear under the 'Add Strip' menu list. ie. Add Strip> Clipboard


Oh, true. Or you could just duplicate the strips (Ctrl-D) and move them to a different object in the NLA window. Or put it under Object>Copy Properties. You are right..


ilac wrote:thing you should/could add next time you do a mock up is that the influence ipo gives you the ability to repeat an action, with an intermediary space, without having to add duplicate strips. Eg, you can have Randall_wave from frame 6-20, and 52-62 with no waving in the time period 21-51. With the current system you need a separate strip for every non-sequential waving occurance. With an influence IPO, one strip should be enough most of the time!


Yes, that is a good example of how cool this Influence IPO thing really is. Maybe I'll add that to a mockup..

theeth
Posts: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Postby theeth » Sun Apr 18, 2004 10:26 pm

The only thing I don't really like about your mockup is the influence IPOs. IMHO, editing them in the strips doesn't give enough space to fully control the curves (with the handle and all) and wouldn't really allow precise positioning. Showing the IPO on top of the strip is a good idea, but editing it there I think is wrong.

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

Monkeyboi
Posts: 561
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Postby Monkeyboi » Sun Apr 18, 2004 10:31 pm

Yes I was actually thinking the same thing while I was uploading the images. It is crucial to see the influence in the NLA window, but maybe the actual editing should be done in an IPO window. See what I mean?

ilac
Posts: 180
Joined: Mon Oct 14, 2002 8:24 am

Postby ilac » Sun Apr 18, 2004 10:38 pm

Good point theeth! You might also want to push up higher than 100% too (as is possible with RVK's) which wouldn't be a problem in the ipo window.

theeth
Posts: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Postby theeth » Sun Apr 18, 2004 10:49 pm

Monkeyboi wrote:Yes I was actually thinking the same thing while I was uploading the images. It is crucial to see the influence in the NLA window, but maybe the actual editing should be done in an IPO window. See what I mean?

Yup. It could probably be made to switch one of the window (or the NLA window itself) to an IPO editor when the Edit Influence option is choosen.

ilac wrote:Good point theeth! You might also want to push up higher than 100% too (as is possible with RVK's) which wouldn't be a problem in the ipo window.

I'm not too sure how a value higher than 100% could be applied, but it<s worth experiementing.

Martin
Life is what happens to you when you're busy making other plans.

- John Lennon

ilac
Posts: 180
Joined: Mon Oct 14, 2002 8:24 am

Postby ilac » Sun Apr 18, 2004 10:56 pm

theeth wrote:
ilac wrote:Good point theeth! You might also want to push up higher than 100% too (as is possible with RVK's) which wouldn't be a problem in the ipo window.

I'm not too sure how a value higher than 100% could be applied, but it<s worth experiementing.

Martin


Take the hand waving example: Your action consists of one simple wave. By means of the influence over-doing and under-doing the wave, you can create variation.

Obviously in some cases over-doing wouldn't work (like closing a fist = fingers through palm!) but in something like a hand waving, a kick etc over-doing the action could be useful for variation or simply as a tweaking tool.

theeth
Posts: 1184
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Postby theeth » Sun Apr 18, 2004 11:05 pm

I wasn't talking about the visual side which, like you described, is logical, but the technical side. With quats and all that. RVKs is described as linear motion, it's easier to calculate the difference and overshoot. Not that much so with a complex transformation.

Martin
Life is what happens to you when you're busy making other plans.

- John Lennon

ilac
Posts: 180
Joined: Mon Oct 14, 2002 8:24 am

Postby ilac » Sun Apr 18, 2004 11:10 pm

theeth wrote:I wasn't talking about the visual side which, like you described, is logical, but the technical side. With quats and all that. RVKs is described as linear motion, it's easier to calculate the difference and overshoot. Not that much so with a complex transformation.

Martin


oops :P


Return to “Animation”

Who is online

Users browsing this forum: No registered users and 1 guest