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:

Making the NLA useful

Postby harkyman » Thu Apr 08, 2004 6:24 pm

I don't know how many of the developers have actually tried to use the NLA system to do the things it was intended to do. It doesn't work.

Ideally, you should be able to create a list of actions for your armature, then layer and sequentialize them in the NLA window, and have your character smoothly animate between them. Here's the problem and for simplicity's sake, I'm using only a static pose in my actions, but the effect with full motion is the same:

Pose 1:
Image

Pose 2:
Image

When put into the NLA, you get this (small animation, only 96k, please watch):
http://66.134.133.114/nlabad.avi

The problem is obvious. When animating characters, any difference in foot position leads to ice skating. Bad. The only solutions are to either keyframe the armature object itself to move in correspondence with the slide so that the anchor foot stays in the same place in world coordinates, or to have your anchor foot appear in the exact same location relative to the centerpoint of the armature in actions that will be stripped together.

The first solution is incredibly difficult to pull off and defeats the purpose of having NLA. What good is it to chain actions together in NLA, only to have go in and keyframe things by hand at each and every transition?

Likewise, the second method also defeats the purpose of NLA. You should be able to animate within each action with freedom, not hitting prespecified starting and ending points.

This is why you do not see good, long character animation done with Blender. I've tried, and I'm no hack. The system just isn't useful at this point.

Solution: a new NLA Strip parameter called LockBone. It works like this...

Any NLA strip can have a LockBone set. LockBone refers to any bone in the armature that has been keyed in the Action for this strip. A reverse transform is generated based on the difference between the orientation of the LockBone in the action strip and the current orientation of the bone in world space, and used to transform all the bones (gradually, if blendin is used) of the armature into a position so that the lock bone position in both world space and the keys in the NLA strip are the same.

Here's a sample of what this would look like, if the LockBone parameter of the second pose were set to the bone Foot.Right in the first example(128k):

http://66.134.133.114/nlagood.avi

Beautiful. This is a useful character animation tool.

Blender coders, please do not let all the hard work that Reevan and others put into the NLA system go to waste! It seems to me that someone who understands the constraint system (theeth!) might be able to make short work of it. Without this, Blender's NLA (and character animation capabilities) will be incomplete. With it, it will be a powerful and useful tool. 98% of the system is done and works. Who wants to add that crucial last 2%?

Thank you.

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

Postby theeth » Thu Apr 08, 2004 7:30 pm

About the Lock Bone (Pinned Bone would be a good name too IMHO)

It would be a lot simpler to use Influence IPOs than to interfacing with the blendin/blendout. Especially since the constraint system is made to work independently from the NLA (though you can probably manipulate the influence IPOs in the NLA, I've never tried).

Doing it as a bone constraint and moving all the bones to react to the constraint would probably be result in some instability in the whole system. However, doing it as an object constraint would solve this since they are calculated before the bones and therefore would not affect deformation speed and cause constraint lag. Doing it this way would require a bone field in the constraint, but that is barely a problem.

Two solutions come to mind to calculate the offset. Either do it history based which could create a lag and will only work when moving forward in time. This is a no no solution. The other is to rely on an external object, kinda like the Copy Loc constraint. IMHO this would be this easiest solution and would also add flexibility to the system (Character holding on to a moving platform for exemple).

I'll probably have to bother Hos with some bone related question for that, but it's a really good idea that I intend to work on (not for 2.33 though, finals coming too soon).

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

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

Postby harkyman » Thu Apr 08, 2004 8:51 pm

Maybe I shouldn't have likened this to a constraint. The bone that you pin to needs to be settable at the NLA Strip level. For one strip, I may want to pin to the left foot, then use the right foot for the next. After that, I may want to have the character hang off a ledge, so I would pin to a hand. When looking at it in terms of user experience, specifying the pin bone within the NLA strip parameters seems to be the only way to maximize utility of the NLA system.

Once again, if you're using external objects and constraints, you lose the flexibility of NLA.

My description of the methodology was also a little unclear. At the start of a pinned NLA strip, it would have to access the global position of the pinned bone at that frame and transform from there. If there was blend-in on the strip, then the transform would be blended accordingly. Perhaps an on-the-fly objq=0.transformation would do the trick.

oin
Posts: 161
Joined: Fri Apr 02, 2004 6:34 pm

Postby oin » Thu Apr 08, 2004 9:57 pm

YAY!!!

Great :) More people is realizing this. I do 100% agre. I am moving from other (comercial but cheap) animation software just because it does not have this feature. Is essential for animation. I only realized after that Character Studio job.

But indeed, and related to something that is mentioned about doing with objects, in Max, when not animating with Character Studio but his native bones, people use "Empties" (dummies and helpers, actually) , move em as they allow like an IK reversing or something. Well, you "pin" a joint (please, don't say pin a bone, as it'd be much worse! a bone is two joints (well, in my poor brain ;) ) and that is quite limited: you may need to pin the heel bone, or the foot tip, not full foot bone. You loose 50% of flexibility if pin bones and not just joints. )

Indeed, really this is what is -imho- needing more urgently Blender animation...adn I agree; is and OUTSTANDING animation system, so it is why is more strange to not see it there...

Some other software even do this pressing a key while selecting a joint (that joint gets pinned) While pinning a joint per frame or keyframe would solve lots of problems, indeed it'd be ideal if you could pin several joints in a keyframe. Imagine when one foot and a hand are posing over the floor, supporting the weight while the character gives a kicjk in the air or "break dances"... Or hundreds other situations.

I get lost when reading specific and internal Blender terms; I'm only a 3d geek of other softwares, recently landed in Blender, but I am very sure about this needed feature... I'd vote for joint pinning (multiple if possible) (Truespace 4 (I bought it, but I don't use it) locks a full bone. I have animated game main players for a game, and I can say how much worse is that compared to pining only a joint. And still, at least pinning the bone allows much more than no pinning at all. )

That avis explain the thing really good. I was gonna make one hand drawn/animated. That in CSstudio 4.1 would have involved just....select a joint(foot, heel, elbow, whatever)...hit "planted" key (all this with autokeyframing, if you wish) ...move forward several frames in advance... now for example move the biped body forward.If you do and the leg still has length, the foot stays glued, all rotations do as needed (well biped has its rotations human limits by default) automatically, but that foot stays totally glued to the floor, no single move or tremble.

If you move away the whole biped more that the leg lenght, after straightening fully, the full leg tracks to that point where was the joint selected and clicked "set planted key" .Kind of useful for jumps, as initially the thing is so in first jump movement. Is tweaking a bit. But having this fixed points as in real life is just..."possible" and thousand times easier.

I have animated without it. And I know why is SO important....

Please, give it a thought...Blender is my only chance, and as me I suppose many home users animators...Not even mid cost tools have its power, its constraints and overall capability. So is not only the money, is just they don't do...only one, but is not compatible by its internal way of working..

About that mentioned in the previous post I started about this (yep, is about the same thing, hehe...maybe it was not much noticed, but is perfect so :) ) ...if the real problem is NLA strips ...something explained there...about absolute coords, or global ones...that when reusing the strips, the coords would not be the same...well, that's true..but at least, I want to be able to animate even not using that feature, all by hand (anyway as I do it, I am a bit freak in that) , maybe only pasting full poses, or part-of-a-branch pose, again as I did with Character Studio. Even if not pasting, I can mimic the stuff. But what puts me the barrier is no joint pinning. Reposition tilll it looks "pinned" after you moved all the rest of the body (or fk rotated only, as was forced to do in other software) is not only a real pain... but esentially unaccurate. No way of doing them total precission. Or if you can reach an average solution, it took you sooo much time and effort you end up just not animating.. ;)

Anyway...for most real time game animation, character moves in place. Is later the code what moves in the room the character. So even you could reuse the strips...but imho, there must be a way even not breaking that sharing strips feature...Character Studio, does it, surely Kaydara and Maya too...


I think Blender animators would benefit incredibly from it. :)

Excuse me if I am too verbose, and excited on this possibility...

(and please, excuse my english, is not my language..)

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

Postby theeth » Thu Apr 08, 2004 10:05 pm

Since NLA strips have clearly defined limits, doinging as part of the strips would allow the use of the history based option and therefore skip the external object altogether. The NLA is not my area of expertise however, so the best I can offer are ideas on how this could work.

harkyman wrote:Once again, if you're using external objects and constraints, you lose the flexibility of NLA.

In this particular case, I would tend to agree, but since constraints usually represent constant or long lasting states (particularly tracking constraints), it's usually a nice thing to have them separate from the strips.

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

- John Lennon

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

Postby harkyman » Thu Apr 08, 2004 10:38 pm

Thinking about it a little more, it will have to be history-based, or at least cumulative from the first instance of a pin.

Maybe I'll try my hand at it this weekend. I just finished pushing the Python API to allow creation of NLA strips, and why'll I'm slogging through there anyway...

oin
Posts: 161
Joined: Fri Apr 02, 2004 6:34 pm

Postby oin » Fri Apr 09, 2004 12:29 am

Great! :)

That means you may give it a try... 8) 8)

Please, keep us informed :)

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

Postby slikdigit » Fri Apr 09, 2004 9:11 pm

I have a couple of comments:
First of all: the nla is useful. Right now. I couldn't animate without (well I could, but it would suck)
second (of all :lol: ): It is far from perfect, from both interface and functionality.
You're idea is useful, and I would love to see something like this. however, If you are layering animations that have divergent foot positions, you need to do a blend animation that does a step (or two) between the positions. This is possible right now.
However there are things either missing, or that I can't find. Let me know if they are there:
*The biggie: can't re-order the stacking of strips. I can move them horizontally, but not vertically. Is there a way to do this that is hidden? It sucks having to recreate a complex mix of anims because you need to insert a strip.
*In a cycling animation I don't have a visible cue as to which frame of the cycle I'm at in a given frame of the animation. This'd be useful to have to copy frames from.
* Path constraint stuff doesn't work perfectly- Its a little weird if you try to animate the constraint, to the point to which I don't do it. I'm going to do some experiments with a simple .blend to figure out exactly what is throwing me here.
* Not exactly nla caused, but related: bone / attached mesh recalculation is still suffering from a few updating bugs, esp when using the nla. Its not predictable, but sometimes when scrubbing the bone position is wrong- only if you grab it does it recalculate to its 'true' position/rot.
I hope I didn't write too much

note I'm planning on a couple of bug reports regarding animation in general. the one I mention here I'm not going to file yet as I can't exactly predict it.

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

Postby harkyman » Sat Apr 10, 2004 2:24 am

If you have, say, twenty different actions, you don't want to have to create blend animations between every combination of foot positions. This idea would elminate that, essentially creating the blend motion on the fly.

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

Postby slikdigit » Sat Apr 10, 2004 4:47 am

Oh, I totally agree :). i think I mis-expressed myself. I meant more that even without doing that, there are still a lot of improvements needed in the nla, some of them are very basic, whereas what you are suggesting I would call 'advanced'.
No reason not to do it :)

oin
Posts: 161
Joined: Fri Apr 02, 2004 6:34 pm

Postby oin » Sat Apr 10, 2004 9:44 am

slikdigit, however, imho, this problem of the pinned joints imho is really more previous/basic when animating realisticly a human... I mean, I'd love to have all kind of power in animation but I can deal without a motions mixer (if it does not have it) , but can't work without planting a joint in space...

Zarf
Posts: 88
Joined: Mon Oct 14, 2002 3:54 am

Postby Zarf » Sat Apr 10, 2004 10:54 am

<Snip>
theeth wrote:In this particular case, I would tend to agree, but since constraints usually represent constant or long lasting states (particularly tracking constraints), it's usually a nice thing to have them separate from the strips.

Martin


I have to disagree with the part about constraints representing 'constant or long lasting states'. Constraints should not be restricted to global scope, but also be encapsulated within actions and therefore controllable via the NLA strips. The Armature system is loosely based around Animation Master which IIRC allows both global constraints and constraints that exist soley within action blocks. However AM animators almost exclusivley use constraints in Action Blocks. There are good reasons for this since it not only allows you to easily turn on and off a set of constraints at once, but also allows you to do things that otherwise would cause circular dependincies.

This seems to be pretty standard fare in a NLA system. I own a copy of MotionBuilder and it has similar capabilities.

I don't think this should be too hard to add to the source, the biggest problem is coming up with a sane interface for it.

Just my 2 cent's

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

Postby slikdigit » Sat Apr 10, 2004 6:19 pm

to oin: what Harkyman is talking about is specifically relevant to the motion mixer- normal IK will alow you to plant a bone in space quite easily, so long as you are not mixing two actions in the NLA. Harky's suggestion is cool, becuase it allows you to work without having to 'tailor' your actions to mix with each other by hand, or have to add specific blend actions (unless you want to) This makes the motion mixer much more useful.
Zarf: I agree (having used A:M) it would be nice. You could still have global constraints in the current system, since the top level action (non-strip) overrides the NLA, you could still just put your constraints in there even if constraints within an action were also valid.
Right now, I just have to remember to separate my constraint keys when I'm animating. (which can be counter intuitive)
We should compile a list of essential things needed in the NLA, and another of nice things highly desirable- or perhaps just a loosely prioritized list of possible NLA enhancements.

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

Postby slikdigit » Sat Apr 10, 2004 11:18 pm

hey, I thought of a third technique to pull off mixing the armatures in the nla- use a second armature, and constrain the feet with copyloc and copyrot on the actual armature to the 'feet ancors' in the first. Use constraint influence ipos to control when this happens. If the character is stepping prior to and after in the switch in actions, you don't even need to animate on the second armature, nor do you need precision in the feet ancor locations. If you're not stepping in one or both actions, you might have to animate the second armature.
What do you think? I'm going to be using this technique in the animation I'm working on right now. If anyone is interested, I'll make an example blend, some pictures and a movie.

oin
Posts: 161
Joined: Fri Apr 02, 2004 6:34 pm

Postby oin » Sun Apr 11, 2004 9:40 am

maybe I am to newbie in Blender, but doesn't copy loc and copyrot forces the bone to break apart from the armature? Instead of getting glued while allowing yet to ik move or fk rotate any of its joints according to that foot that like becomes the "root" while it is "glued" ...

You say using a second armature...well, as I say, I know mor eor less how to animate in other softwares; just starting in Blender, so if you provid that .blend and avi so to see what you mean, it'd be great :)


Return to “Animation”

Who is online

Users browsing this forum: No registered users and 2 guests