Shifting Keyframes through all layers...

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

Moderators: Víctor Paredes, Belgarath, slowtiger

donnie
Posts: 111
Joined: Mon Oct 16, 2006 11:53 pm

Shifting Keyframes through all layers...

Post by donnie »

Does anyone have a good method of moving a set of keys around through all layers, from one frame to another?

I have tried the rescale keyframes trick, for example:

To move all keyframes on frame 20 ten frames back to frame 10 i would rescale keyframes as follows:

start frame 20 end frame 21, to new start frame 10 and new end frame 11, but this results in any keyframes after frame 21 getting all mashed up.

I have also tried copying the frame to another frame and then deleting all the original keyframes using the 'delete all keyframes script', but this has some unexpected results with some of my layers appearing or dissapearing which I have to then sift through to work out what happened.

Im asking because I like to pose my character out in stepped mode (which often have loads of controls through many layers - resulting in lots of keys through many channels), then shift the keyframes to adjust the timing before smoothing everything out.

Any insight into peoples work process greatly appreciated.

cheers

D.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

This is one of the main complaints about AS, a lack of key frame editing features.

At the moment there aren't many options. I believe there may be a script that adds and deletes all keys on all channels but I think it only works for one layer at a time... not sure about this. I haven't used the script.

This is one of the reasons why I have been working on complex bone rigs with constraints and scripting so I can animate my characters by using bone translation only. For instance dragging a single bone turns the head, dragging a single bone moves and rotates an arm etc. I keep most my keys in just one layer, in one channel even.

This solves a lot of the key frame management issues for me.

Considering that the multi layer key frame issue is a very big drawback to AS I have high hopes that this is a feature request being looked at by efrontier for a future version... in the meantime I keep looking for workarounds.

---------

As a suggestion to help you out right now... consider simplifying your character setups. Do as much as possible within one layer or bone layer. Instead of having multiple bone layers try using bone offset and keep bones on one layer. This eliminates the need to switch to a different layer. Many people have separate bone layers for arms and legs. If you don't do this animating the characters can be easier.

Instead of animating a layer itself directly using layer tools, try binding layers to bones and using the bones to move the layers. You mostly end up with the same results... except for z translation of a layer of course.

I get so annoyed when animating layers because the darn key on the time line is further down the palette and I have to scroll to that point to change or move keys for layer animation. When I go back to another layer like a bone layer I have to scroll the palette back up to see those keys which are at the top.

Another tip is not to use bone motion AND point motion. I know I know this is crazy... but... I don't use ANY point motion. All my characters are animated using bones only and constraints... lots of constraints.

-vern
donnie
Posts: 111
Joined: Mon Oct 16, 2006 11:53 pm

Post by donnie »

Thanks for the rapid reply Vern.

Ive tried using the key all and delete all scripts but unfortunately they don't work very well for me. 'Key all' does'nt seem to key every channel on every layer, and 'Delete all' gives me unexpected results.

I get your technique of using just bones to animate but unforunately the rig im working on is pretty complex and requires bones on seperate layers.
Im not really using point motion at all, but am doing a lot of moving layers in Z depth/ x-y rotation etc..(and yes, scrolling up and down the timeline is damn annoying! :x )

I really hope that e-frontier are listening to our complaints and do implement some sort of nice solution to shifting multiple keyframes in future updates (Even a 'nudge all keyframes in all layers from where the cursor is' type of thing, ala Flash, would be brilliant).

cheers,

-D.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

unforunately the rig im working on is pretty complex and requires bones on seperate layers.
I don't know what kind of rig you have that requires so many different bone layers... but...

Something else you may want to do when animating is to break the animation down into smaller elements.

Hard to describe... for example when animating I have the head as a separate bone layer. If there is a lot of physical body acting to animate then I don't even bother animating the head or face right away.

After the physical body acting is animated I go back and do the lip sync and other face/head key framing. Or maybe I would do the face/head acting first and do the body acting second.

At least doing this in a sequence eliminates constant back and forth during the animation process. I focus on one thing at a time.

-vern
donnie
Posts: 111
Joined: Mon Oct 16, 2006 11:53 pm

Post by donnie »

Yeah, ive got things like different hands made out of photos in switch layers- each with their own skeletal system (impossible to use bones on switch layer to cover all hand shapes). Ive also got elements layered in different depths which means they have to be in seperate bone layers.

What you say is good advice, and for general action this is how I would do it. For more subtle action however, I like to key everything on the one frame as if it were a 'drawing' (in traditional animation terms), then I would want to shift these 'drawings' in time to get a good feel for how the animation will play out (before getting into the time-consuming process of smoothing out the anim).

AS makes this fundamental animation technique unfairly awkward, and makes changes called for by either the directer or myself both difficult to implement and therefore more time-consuming.

D.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Re: Shifting Keyframes through all layers...

Post by Genete »

donnie wrote:Does anyone have a good method of moving a set of keys around through all layers, from one frame to another?

I have tried the rescale keyframes trick, for example:

To move all keyframes on frame 20 ten frames back to frame 10 i would rescale keyframes as follows:

start frame 20 end frame 21, to new start frame 10 and new end frame 11, but this results in any keyframes after frame 21 getting all mashed up.

I have also tried copying the frame to another frame and then deleting all the original keyframes using the 'delete all keyframes script', but this has some unexpected results with some of my layers appearing or dissapearing which I have to then sift through to work out what happened.

Im asking because I like to pose my character out in stepped mode (which often have loads of controls through many layers - resulting in lots of keys through many channels), then shift the keyframes to adjust the timing before smoothing everything out.

Any insight into peoples work process greatly appreciated.

cheers

D.
The main problem that you show in this question is the ability to shift the keyframes. If you only want to copy the keyframes from one place to another then you can do it easily using actions.
Imagine that you have a "pose" at frame 45 and then you want to copy to frame 21 or maybe to other any frame. You could copy it to an action just creating the new action an selecting the mainline (in the action window) and pressing the copy reference button. Then, inside the action, delete all the keyframes but not the number 45. Translate the keyframe at frame 45 to frame 1. You have to repeat this for all the layers. Also you'll need to create a keyframe for every channel you want to copy. For instance, imagine that at frame 45, a bone is in the right position but its position comes from other two keyframes interpolation. Then you have to create a keyframe at frame 45 just making right click at that frame and channel (this must be done at mainline). No need to say that the action should be created at the most root layer you need.
Once you have the pose (for all the layers) recordered into frame 1 of your action then you can insert it as many times you want and at the frame you want.

Other question is delete the keyframe for all the channels and layers if you are not happy with the position of the just inserted "one pose action". Why the need to shift the bunch of keyframes (layers) an amount of only one frame? You can shift the keyframes from the conflictive frame to the end of animation and later restore the rest of animation just inserting blanks frame in the middle. Let's show you how to:

Imagine you have the "pose" at frame N. Your animation finish at frame M and you want to shift the "pose" keyframes at frame N a value of +S or -S frames.

You have to make following:

CASE A) shift back in time: Shift -S frames

STEP 1:
Start frame =N; End frame =M
New Start frame = N-S; New End frame = M-S
(this would "eat" S-1 frames before frame N)

STEP 2:
Start frame = N-S+1; End frame = M-S
New Start frame = N+1; New End frame = M
(this would "insert" S-1 blank frames between N-S and N frames)

CASE B) shift forward in time: Shift +S frames

STEP 1:
Start frame =N; End frame =M
New Start frame = N+S; New End frame = M+S
(this would "insert" S-1 new blank frames before frame N)

STEP 2:
Start frame = N+2*S+1; End frame = M+S
New Start frame = N+S+1; New End frame = M
(this would "eat" S-1 frames between N+S and N+2*S frames)

The "eat" and "insert" effects are the drawbacks of this method.

Also with some anticipation, the "1 frame pose" can be recorded directly in the action instead of getting them from the mainline.

Please tell me if this works for you.

Best
-G
User avatar
slowtiger
Posts: 6081
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Do as much as possible within one layer or bone layer. Instead of having multiple bone layers try using bone offset and keep bones on one layer. This eliminates the need to switch to a different layer. Many people have separate bone layers for arms and legs. If you don't do this animating the characters can be easier.
I really like to see you dealing with the job I have to do right now, vern! *g*

Characters which aim to look like hand-drawn, animation which aims to look as much as full animation as possible, a storyboard which asks for characters to be seen from all angels (and turn in mid-scene) ...

Some characters have legs and body in the same bone layer. Some have an extra layer for each leg. Of course it is easier to set up a walk within just one layer. But different bone layers give me the ability to change body expression during a walk, without fucking up the walk keys.

And lest not forget: sometimes one just has to work with what others have rigged, with no chance to get it changed.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Have you seen this new script and rig I created?

viewtopic.php?t=9453

viewtopic.php?t=7842

It might help with body turns and more "free form" animation. I haven't added the code yet to do "layer flipping" of legs and arms but that could be done by hand (using z depth).

It is almost like posing a "3D" character in 2D. I do have trouble with the feet since the foot bone flips upside down on turns... that could be handled with a switch with out much trouble.

I'm still making improvements to the script.

-vern
User avatar
slowtiger
Posts: 6081
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

All nice but - I can't change several characters' rigging during production, especially not if scenes get exchanged between animators ...
donnie
Posts: 111
Joined: Mon Oct 16, 2006 11:53 pm

Post by donnie »

Hi Guys,

Genete, thanks for your detailed reply - I get your technique using actions but I usually just use the copy frame function if I want to copy a pose rather than going through all the layers of an action (which could be loads!) and shifting and deleting keyframes.
It would be amazing if you could use the 'copy current frame' command to copy all the keys in all channels selected into frame one of an action - then it would be simple to copy paste poses. Also if you could copy a range of keyframes anywhere in the timeline into frame one of an action (without all the fiddly delete/move keframes).


The rescale keyframes function works fine for shifting a bunch of keyframes back in time, but if I want to shift them forward it does not work!!
At least I cannot get it to work as it just seems to 'mash' the keyframes together.

Say, for instance, I have a bunch of keyframes from frame 10 to 20 that I want to move 10 frames forward in time. I would set the rescale keyframes dialogue box to:

Start frame 10 - end frame 20 (if thats the last frame of your project)
New start frame 20 - new end frame 30

This simple shifting forward of keyframes seems to mash the keyframes together where the end key frame is in the right place but all the other keyframes are squashed up to it, rather than starting at the new start frame.

Does anyone else have this problem? Is it a bug, or am I doing something really stupid?

Cheers,

-D.
User avatar
slowtiger
Posts: 6081
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Could you test the forward shifting again, but this time before you start, place some keys very far after your target position?
donnie
Posts: 111
Joined: Mon Oct 16, 2006 11:53 pm

Post by donnie »

Hi Slowtiger,

I tried what you suggested but im still encountering the same problems (keys getting all mashed together). Could you elaborate on what you thought might fix the problem?

Thanks for your time.
User avatar
slowtiger
Posts: 6081
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Nope, I was running into exactly the same problems as you and wrote about it some time ago here: viewtopic.php?t=9129
donnie
Posts: 111
Joined: Mon Oct 16, 2006 11:53 pm

Post by donnie »

Oh yeah, I posted there too! :roll:

DO you think this is a bug in AS or something?
If so it really needs to be sorted out. :(
User avatar
slowtiger
Posts: 6081
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

I'd call it a bug because a simple shift should be possible for a function which otherwise is able to calculate timing of keys. But I'd prefer a much easier way to do time shifts anyway.
Post Reply