Richard Culver (blenderartists.org/forum/showthread.php?t=175517) provides an interesting take on walk cycle animating… basically, use the passing phase of the walk cycle as the pivot upon which any type of transition phase might be inbetweened, such as walking on the flat transitioning to walking down stairs. Given this way of looking at the problem an animation can be usefully seen as an array of poses, and Panda can be used to sequence the poses together. When I try this using Sequences or Parallels along with Interval Functions (off t), however, I get all manner of problems getting the feet to stick still while moving the character in the 3d world and changing the pose? Like how do you get the character to place one foot after the other on each step face as it walks down the stairs? It is almost as if I need to run the changing pose functions and the move forward functions on separate threads and hold the move forward function locked until the change pose function has completed otherwise Panda seems to say, “well he wanted the character to end up over there and if the changing pose people can’t keep up that’s not my problem”.
Not sure what you’re saying. It’s true that you can view the animation as a sequence of poses; in fact, the ActorInterval implements animation in precisely this way. So, for that matter, does simply calling actor.play().
It’s also true that you can move an actor around independently of its poses.
So, if you want the actor to cycle through the poses of his walk animation, while at the same time moving forward, you are simultaneously performing two different functions: animate him, move him.
Panda provides any number of mechanisms by which you can do these two things simultaneously. For instance, you could put each of them in an interval, and bind them together with a Parallel. Or, you could each of them in a task, and spawn them separately. Or, you could simply start the animation playing with actor.play() or actor.loop(), and then move the actor with another task or interval.
So, what’s the problem?
David
As far as I can see you can make the walk animation one of two ways. You can either leave the model in position and let the legs and arms align to the key frames (resource photo whatever), in which case if you loop the animation without moving it the feet slide along the ground. The second way is to set the feet into the key frame positions and move the model to get he rest of the limbs to align with the resource photo, in which case if you loop the animation the model’s feet do not slide and the model moves until the animation reaches the end whereupon the model resets(moves) back to where it was at frame one. The second option would seem to be the one to use if you wanted to walk down stairs because you could accurately align the models feet to the stair for each step. The problem I am having is controlling the move at the end of the play cycle so the animating model gives the appearance of continuously walking along. Whenever I try Sequences Panda does not seem to honour the fact that I want the play animation cycle to finish before the move to cover up the reset begins. I wonder, and this is what is freaking me out, if Panda or Python is optimising my code and multi threading the components of the sequence. If this is not the case I will just have to look closer at my code.
You keep using the word “thread”, but I assure you there is no threading going on nor any need to use threading to do this in the first place.
Anyway, intervals are very explicit. Panda will play them back exactly as you have constructed them, it will not do any kind of optimization of runtimes. If you have something like Parallel(walkIval, animIval), and walkIval and animIval are different durations, then the overall Parallel will be the duration of the longer ival.
David
OK. Thank you David. Must be something in my code.