Walking

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Walking // Archive: Tech Forum

1  2  |  

Post by W!ZARD // Apr 25, 2008, 4:10am

W!ZARD
Total Posts: 2603
pic
I've been caught out too many times before - I expect something to be really difficult and tS makes it so easy that I miss the obvious - so here's my question:


I have a character animated with a walk cycle which looks great - problem is she stays in one place.. I've found that keyframing the feet position works but it seems really laborious.


What is needed is some method of locking the world position of the foot when it touches the ground so that as the step occurs, the character actually moves forward.


It's not hard manually inserting keyframes - it's just time-consuming. Please tel me there is a really easy way to do this that I'm missing - or that there's a new tool in tS 7.6 to do this :):D

Post by jamesmc // Apr 25, 2008, 4:27am

jamesmc
Total Posts: 2566
I thought Workspace had IK locks?

Maybe I'm thinking of another application.

Post by frootee // Apr 25, 2008, 4:38am

frootee
Total Posts: 2667
pic
Well W!zard, you may have to just keyframing the move of the root bone (the pelvis).


Hm... What would be cool is, if you could make the Foot bone the root bone, when the foot is on the ground, in front. Not sure if that is possible, nor how that would affect the entire IK chain. If that is even possible, it would require some careful adjustments.

Post by frootee // Apr 25, 2008, 4:39am

frootee
Total Posts: 2667
pic
I thought Workspace had IK locks?


Maybe I'm thinking of another application.


Hi James. Yes, you can pin the foot to the ground, using a Full Lock.


Just remember to remove it after you're done keyframing. Otherwise the character will be stuck in concrete.


So that may be better than fiddling with the pelvis, etc., though you will still have to move it for setting keyframes though.

Post by W!ZARD // Apr 25, 2008, 4:41am

W!ZARD
Total Posts: 2603
pic
I thought Workspace had IK locks?


Maybe I'm thinking of another application.


Hi James - yes it does have IK locks but I've not been able to figure out how to use them with existing anim clips derived from Mocap .BVH files.


IK locks are great for posing with Inverse Kinetics and for stuff using physics but I don't know if they are useful with .BVH derived clips. I'm still experimenting though.:)

Post by W!ZARD // Apr 25, 2008, 4:47am

W!ZARD
Total Posts: 2603
pic
Well W!zard, you may have to just keyframing the move of the root bone (the pelvis).


Hm... What would be cool is, if you could make the Foot bone the root bone, when the foot is on the ground, in front. Not sure if that is possible, nor how that would affect the entire IK chain. If that is even possible, it would require some careful adjustments.


Hi Froo - yeah that's what I'm doing - keyframing the root bone position - but to get a reasonably smooth and convincing action I'm having to put a key in at every frame - slow work!


What is needed is something like the 'Nail' from the old bones that can pin the foot bone and automatically move the root bone according to the anim clip.


I've read that some apps have a "stride Length" setting - I'm not sure how that works but I can imagine the basics.


Meanwhile, back to frame by frame positioning. <Shrugs>

Post by Wigand // Apr 25, 2008, 5:55am

Wigand
Total Posts: 462
pic
Just a thought...

If you have only one object to walk, you could move the rest of your world.

Do you understand what I mean?

Post by frootee // Apr 25, 2008, 6:22am

frootee
Total Posts: 2667
pic
Hi Froo - yeah that's what I'm doing - keyframing the root bone position - but to get a reasonably smooth and convincing action I'm having to put a key in at every frame - slow work!


What is needed is something like the 'Nail' from the old bones that can pin the foot bone and automatically move the root bone according to the anim clip.


I've read that some apps have a "stride Length" setting - I'm not sure how that works but I can imagine the basics.


Meanwhile, back to frame by frame positioning. <Shrugs>


Well, the Full IK Lock Is the nail of 6.6. You click a joint, in this case, one of the foot bones. Then that foot cannot move; at least, it is not supposed to. Have you tried placing a Lock on the foot, setting it to Full, and playing the animation?

Post by SteveBe // Apr 25, 2008, 6:48am

SteveBe
Total Posts: 282
pic
Hi W!ZARD,

Excuse me if I don't understand what you want to do but assuming you
are setting this up on workSpace side:

In Anim view click Story tab, right click on Track00 and select Add New Track,
right click new track and select Additive Blend Mode and click circle beside
Track01 so it turns red (makes it active). Now you can add your movements
in that track and it will blend with the walk cycle.

Hope this is what you're talking about, if not, please ignore.:p

Post by W!ZARD // Apr 25, 2008, 6:51am

W!ZARD
Total Posts: 2603
pic
That's an interesting suggestion Wigand - my wife made a similar comment. Of course the scene is one of my huge and detailed jobs so it's not really practical for that reason - the software would have to process far more transforms moving the whole scene rather than just the character.

Additionally, I'd still have to key basically every frame just the same as I am currently - it's all about relative positions so moving the scenery backwards still requires the same amount of smoothness as moving the character forwards.


And, in keeping with my usual tendency to over-complicate things, I have two characters walking side by side!!


Somehow I don't think I'll have it finished in time for this months gallery!:)

Post by W!ZARD // Apr 25, 2008, 6:59am

W!ZARD
Total Posts: 2603
pic
Well, the Full IK Lock Is the nail of 6.6. You click a joint, in this case, one of the foot bones. Then that foot cannot move; at least, it is not supposed to. Have you tried placing a Lock on the foot, setting it to Full, and playing the animation?


Yeah I did try that but I'm not that confident that I know what I'm doing - I placed a position lock on the foot but the keyframed walk cycle seemed to over-ride it - assuming I attached the lock correctly :rolleyes:


SteveBe - thanks for the input - what you suggest is essentially what I'm doing - the problem is to get the foot to sit still on the ground without sliding about as the walk cycle runs (or should that be 'walks'?). As I said earlier it's doable but laborious as to get a smooth motion I need to key every frame.


Anyway, I'm done for tonite - it's 5 AM Saturday morning and I'm off to bed.


Thanks for the suggestions everyone.

Post by jamesmc // Apr 25, 2008, 7:06am

jamesmc
Total Posts: 2566
Doesn't trueSpace have Non-linear Animation?

That is, once you get your basic walk cycle down, record it, you can save it, then adapt. Usually takes about 32 frames or so at 30fps. (extra 2 frames for beginning and end of cycle)

Then take that NLA and re-use it, cut and paste into the next part of the animation.

You can adjust the tilt/pan, the rotation needed (going around corners) in each NLA recorded segment.

Post by Igor K Handel // Apr 25, 2008, 10:22am

Igor K Handel
Total Posts: 411
pic
Unless I am missing something fundamental in your problem here I suggest the following


Not 100% sure if your query is about the translation of your complete character only, or that of joining a repeated walk cycle, or both?


Heres one way of sorting a quick walk cycle, it's a bit wacky but its fast


NB For speed DON'T move the Character, just sort the legs first.


1. Make two new tracks in the Animation Story window.


2. Move both legs to furthest point back in the cycle.


3. Record key on the tracks (seperate tracks one for each leg)


Now move forward a couple of frames to keep keys easy to see


4. Move both legs to furthest point forward.


5 Record keys as in 3


Now you can drag the keys to the appropriate frames of a cycle and thats the extremes sorted, and symetrical.


Make 2 new tracks for vertical foot movement. Record keys for lowest and highest point on each track. Slap the highest somewhere near the centre of your cycle.


So now we have the forward/back, and lift sorted. Just copy and paste to blast through a cycle or two.


NOW sort out his/her/it's translation for movement through the scene. Just add another track and key the translation of the root.


Don't forget that by simply resizing your cycle with the range bar at the bottom of the dopesheet, you can speed up (move keys closer together) or slow down(keys more spread out) your cycle. Adjust to suit the forward movement of the character, relative to stride length.


The above is a very simplified approach. Rough and ready. Refinements needed to the first cycle before copy pasting once thats down would need to be..


Sort out the foot roll and slipping on leaving or touching floor

HOW.. Use of Linear and Bezier (rightmouse on a key to change type).

PLUS.. Possibly add a keyframe close before and immediately after ground contact, adjust as required.


A somewhat elaborate but SO useful method of rigging feet to avoid slipping is commomly known as as the "reverse foot setup". I strongly advise anyone interested in character animation to "google" this.


My Quick Question.... As a noob to TS can the pivot point for a joint be moved (In Workspace)?

I'm so busy trying to learn TS I haven't had to time to check this out yet!


If it can, then absolutely the way to go with IK is the reverse foot setup. Incidently its worth adding an extra joint in arms to give more realistic forearm rotation. Again google if your interested. (Character rigging I guess)


Hope this of help to someone.

IK

Post by W!ZARD // Apr 26, 2008, 1:44am

W!ZARD
Total Posts: 2603
pic
Thanks James and Igor - I appreciate the input.


I have no problem with creating the walk cycle as I'm using Mr Bones's mocap anim clips -

I can adjust these and add to them using more tracks and NLA and so forth - the difficulty (actually it's not difficult, just laborious and time consuming) lies in syncing the forward motion of the character (as it goes through the walk cycles) in such a way that the feet stay still in relation to the ground.


I don't really mind the laboriousness either - it's quite meditative - I was just wanting to speed up the process so I could get my animation done before the end of the month - which is not going to happen unfortunately!:)

Post by Jack Edwards // Apr 26, 2008, 2:24am

Jack Edwards
Total Posts: 4062
pic
Wizard, could the slipping be because those keyframes need a linear instead of spline interpolation in the FCurve editor?

Post by W!ZARD // Apr 26, 2008, 4:18am

W!ZARD
Total Posts: 2603
pic
Wizard, could the slipping be because those keyframes need a linear instead of spline interpolation in the FCurve editor?


I'm not sure Jack but I dont think so. I'm actually key framing the position of the root bone - the pelvis - while the legs wave around underneath according to the animated walk cycle so, while I've not tried it I suspect a linear interpolation will result in a jerkier motion overall.

Post by Jack Edwards // Apr 26, 2008, 11:03am

Jack Edwards
Total Posts: 4062
pic
The use of linear and sharp breaks in the keying curve depends on if you need a sharp change in the rate of change. For example contact with a hard surface such as a ground.

Also since the BVH is keyed for every frame, I'd think you'd get less wobbling and oddness setting those keyframes to linear.

Edit:

Here's and example I did with a bouncing ball:
http://forums1.caligari.com/truespace/showthread.php?t=3193

Notice that where the ball impacts the ground I've "broken the handles" on the curve and set it to a sharp point. This is because there is an abrupt change in direction.

Post by W!ZARD // Apr 26, 2008, 7:15pm

W!ZARD
Total Posts: 2603
pic
The use of linear and sharp breaks in the keying curve depends on if you need a sharp change in the rate of change. For example contact with a hard surface such as a ground.


Also since the BVH is keyed for every frame, I'd think you'd get less wobbling and oddness setting those keyframes to linear.


Edit:


Here's and example I did with a bouncing ball:

http://forums1.caligari.com/truespace/showthread.php?t=3193


Notice that where the ball impacts the ground I've "broken the handles" on the curve and set it to a sharp point. This is because there is an abrupt change in direction.


I see your point Jack. I've been working on the assumption that when a real person is walking their pelvis would appear to float along in relation to the ground as any jerkiness in the feet is absorbed by the knees and ankles.

I have two characters walking side by side so I might try your suggestion and see which works best.

Post by Jack Edwards // Apr 26, 2008, 7:29pm

Jack Edwards
Total Posts: 4062
pic
Also anytime you need an object to remain stationary you have to use a linear interpolation between keyframes. A bezier keyframe will shoot past and wobble/slip. Hopefully that will solve it for you. :)

Post by trueBlue // Apr 26, 2008, 7:39pm

trueBlue
Total Posts: 1761
pic
I do not know if this would be helpful with BVH or not. If you look at CrazyBob I believe the Handles on the feet are set up with (Assigned) to Rotational locks on the opposite leg up to the Hip Lock. So if you if you move the Handle on one foot the other Leg, Foot, and Hip will not move. Also note the Lock in the Toes. I believe there is a video in the Manual how to assign Locks too Handles.

Post by W!ZARD // Apr 26, 2008, 7:49pm

W!ZARD
Total Posts: 2603
pic
Also anytime you need an object to remain stationary you have to use a linear interpolation between keyframes. A bezier keyframe will shoot past and wobble/slip. Hopefully that will solve it for you. :)


OK I just tried it and because I'm Keying every frame changing the interpolation type makes no appreciable difference.

I'll try using linear interpolation with fewer keyframes and see if that speeds things up.

Thanks for the input Jack

Post by W!ZARD // Apr 26, 2008, 8:32pm

W!ZARD
Total Posts: 2603
pic
OK I just tried it and because I'm Keying every frame changing the interpolation type makes no appreciable difference.

I'll try using linear interpolation with fewer keyframes and see if that speeds things up.

Thanks for the input Jack


I was hoping to speed the process up by only needing to key every 4th or 5th frame but the linear interpolation does not help. If I set a keyframe with the foot in the right position, advance 5 frames and set the foot in the desired position and make another keyframe the pelvis moves in a linear fashion as expected but because the angles at hip, knee and ankle all change at every frame the foot still wanders about on the unkeyed frames.


trueBlue - I missed your post at first. I could be wrong (after all it's been known to happen;)) but I understood that handles and locks are intended for use with IK. In that case the specific angles at ankle, knee and hip have not yet been keyframed where-as with .bvh derived anim clips those joint angles are already keyed.


For this reason I've not yet looked at using handles and locks with these clips.

Can't hurt to try I suppose - I'll RTF and try some more experiments.


Am I the only person to use tS like this? I was hoping someone else had already encountered this situation and had found an easy solution.:D

Post by Jack Edwards // Apr 26, 2008, 10:13pm

Jack Edwards
Total Posts: 4062
pic
3DFrog has solved the feet slipping thing, so he'd definitely be the guy to ask.

I did find some posts from Tomas that indicate that you need to use handles and:
1.) uncheck "posing only"
2.) Set the handle's interpolation to IK
3.) Use linear interpolation on the keyframes

Hope that helps! :)

Post by W!ZARD // Apr 26, 2008, 10:45pm

W!ZARD
Total Posts: 2603
pic
3DFrog has solved the feet slipping thing, so he'd definitely be the guy to ask.


I did find some posts from Tomas that indicate that you need to use handles and:

1.) uncheck "posing only"

2.) Set the handle's interpolation to IK

3.) Use linear interpolation on the keyframes


Hope that helps! :)


Thanks Jack - I'm reasonably sure 3DFrog didn't use .BVH clips and used either FK, IK or both to set up his animation.

What I've discovered so far is that you can either use Dynapose with Locks and Handles OR you can use .BVH motions but not both - which sort of makes sense. Dynapose appears to over ride the BVH key frames and the bvh key frames over ride the locks.

So I'm back to either not using .BVH clips and manually setting the motions or using .BVH clips and manually setting each pelvis Matrix keyframe.


Unfortunatyely, the manual mentions .bvh files in passing - tells you you can use them but doesn't say much else. <SHRUGS> Oh well, back to Keyframing every frame where I want the feet seen to be touching the ground - unless there's a secret 'foot lock for .BVH Clips' button that I've missed!

Post by Jack Edwards // Apr 27, 2008, 2:04am

Jack Edwards
Total Posts: 4062
pic
Hmm... have you tried using separate clips and enabling additive blending to mix the BVH and IK clips?

Post by W!ZARD // Apr 27, 2008, 11:02pm

W!ZARD
Total Posts: 2603
pic
Hmm... have you tried using separate clips and enabling additive blending to mix the BVH and IK clips?


No I didn't try that - I'm not sure it would work as activating IK mode using Dynapose overrides and cancels the BVH info and activating the BVH info over rides the IK. I've got the hang of blending clips and modifying the BVH movements with Additive tracks (damn that's a sweet feature!!) but I've not figured out how to use both IK and BVH to overcome the floating foot thing.


However.... I've found this most excellent solution to the floating foot issue - and it's so obvious I'm embarrassed that I never figured it out earlier!


It works like this: Make a positional Key frame to place the first position then advance down the time lime - I went 150 frames. I then took a rough eyeball estimate of how far my character should have walked in 150 frames.


Then in the .BVH anim track I used copied and pasted a bunch of Walk cycle clips and merged them into one (not including my original Positional keyframes in the other track).


Then it was a simple matter of resising the extended walk cycle clip using the control handle on the end, running the anim for 150 frames and watching to see if the feet slid forward or backward, then stretching or shrinking the walk cycle clip until it fit the distance traveled between the 2 positional keyframes and Voila! A walkcycle 150 frames long with the appropriate forward motion and virtually no foot slippage. It worked so well I'm going to go back and redo a few earlier walking along type animations.


If I can refine my workflow well enough I may even knock up a tutorial video demonstrating how it works.


Thanks for the input though Jack and others - your interest has kept me motivated to keep trying different approaches. Hopefully I've discovered an elegant solution to this issue which others can benefit from too.

Post by Jack Edwards // Apr 28, 2008, 12:13am

Jack Edwards
Total Posts: 4062
pic
Doh! LOL, well I guess it does help to have the guy move at a pace that matches the walk cycle, erhm I mean, adjust the walk cycle to match his pace...;) :D
Glad you stuck with it and can't wait to see the results! :jumpy:

Post by Igor K Handel // Apr 28, 2008, 9:15am

Igor K Handel
Total Posts: 411
pic
Wish I had thought of that lol


Cough..... Points to own previous post :D


Don't forget that by simply resizing your cycle with the range bar at the bottom of the dopesheet, you can speed up (move keys closer together) or slow down(keys more spread out) your cycle. Adjust to suit the forward movement of the character, relative to stride length.


LOL


Guess you missed reading that bit. Info overload alert


best wishes

IK

Post by W!ZARD // Apr 28, 2008, 8:27pm

W!ZARD
Total Posts: 2603
pic
Wish I had thought of that lol


Cough..... Points to own previous post :D




LOL


Guess you missed reading that bit. Info overload alert


best wishes

IK


LOL - Damn, I've been busted! In future I'll read everything you write at least twice!!:p


Actually, in my defence what threw me off this approach earlier, and which I've only just figured out, is that the walk cycle I'm using is not symmetrical. The left leg has a longer stride than the right leg, which means I can sync up the motion for one foot but not the other!! (Or else walk in circles!!).


I only discovered this when I experimented with another walk cycle that was more symmetrical.


I clearly need to find out more about making and editing good walk cycles:o.

Post by mrbones // Apr 28, 2008, 9:36pm

mrbones
Total Posts: 1280
pic
The perfect way of adjusting foot slip or grip in TS 6.5 or before was to simply scale the path of the the characters spline path, not character scale.

I did that by selecting character with loop walk cycle and setting it on a path. then hit the down arrow to select the newly created path. Then use scale.

The character would then either under or over slip or grip as it walked on this path. Problem was solved,

My first thought on TS 7 is to animate the point a to point b keys, the add a track with additive blend with pass trough off. then adjust the size of the anim clip in the AE. (this will make the walk cycle be slower or faster in relation to the traversing a to b points you have specified ),This should adjust in theory adjust the amount of foot slip and grip, I think this should be the fastest route to correcting this problem. I think I understand what your experiencing, Its like having a dwarf walking underneath or next to a giant. They are both walking at a natural stride except the dwarf has 10 loop cycles to the giants 2 loop cycles. In short (no pun intended) its the size thats relative.

Cheers
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn