Insert action is "shifting" my character

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
grimble67
Posts: 49
Joined: Wed Nov 24, 2004 11:05 pm
Location: Florida

Insert action is "shifting" my character

Post by grimble67 »

I have a small bird character, and created a "hop" action. The bird enters the stage, moves around, and ends up in a particular spot on the stage. When I insert the hop action (either "insert copy" or "insert reference") the character shifts to the exact same spot as the action was initially created (in the middle of the stage).

I'm sure I have other characters that do not exhibit this behavior.

The bird also has a "flap" action, and it does the same thing. It appears to me that the "translation" of his back-bone during the hop is tied to ACTUAL screen coordinates, instead of RELATIVE coordinates. Does this make sense? Is this a problem in how I've created the actions?

If anyone can help me fix this, without me having to redo my actions, I'd greatly appreciate it.
Last edited by grimble67 on Mon Apr 04, 2005 6:11 pm, edited 1 time in total.
User avatar
stephen
Posts: 114
Joined: Tue Feb 22, 2005 4:40 pm
Location: Rochester,NY USA

Post by stephen »

I wonder if you accidentally inserted a keyframe in the layer translate channel for the main bird layer.

Stephen
User avatar
grimble67
Posts: 49
Joined: Wed Nov 24, 2004 11:05 pm
Location: Florida

I got it, and this is how

Post by grimble67 »

Stephen, you were right. I noticed that I had mixed layer and bone translations together, not a good combination.

I also noticed a rather interesting "feature". Right before my action, the bird would mysteriously flip through 360 degrees. On further examination, I discovered that the bone orientation in my mainline was -90 degrees, and in my action, was 270 degrees. To the eye, it's the same, but to Moho, it's different. A full 360 different. The mainline angle came about because I put the bird through some acrobatics.

I fixed it by selecting the bone angle tool and handtyping -90 in the input field on the hop action.

Not sure if this is a bug, or just something to watch out for when you're authoring.
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

I may be corrected, but this is my understanding. Actions include all the animations that occur during the action, but if the action is rerun, it will go back to square one. So if you want to repeat the "hop" action, you need to place a "step" type keyframe at the point where the last action began (because keyframe interpolation affects what is going on after them), and then at the end of the action translate the characters layer directly to the spot it needs to be at for the beginning of the new beginning of the action.

So, at the very beginning of the action, set a step keyframe for the layer translation. At the end of the action, set a new step keyframe for where the action should cycle again. and so on, and so on.

I made a new version of my universal layer tool that lets you repeat the last layer translation you did. I made it for walk cycles, and this seems to fall under the process. Move the layer this distance. It works for the cycle? do it again. I'll put that up shortly, hope it'll help.

The gist - anything you've included in an action will expire at the end of the action, if it refers to either the layer translation space, or point translation you've done on the whole character (not so common), it will go back to the starting point when the action is active again. With actions specifically using bones, they don't reference the "space" as a whole. But moving the entire character you need to think about the position the layer should be in when the next action starts.
User avatar
grimble67
Posts: 49
Joined: Wed Nov 24, 2004 11:05 pm
Location: Florida

Post by grimble67 »

7Feet, as usual, you've been very helpful. I'd like to get my hands on your tool when I can (that doesn't read very well, does it?).

Something additional was at play in my case, because the jump would occur on step 1 of the action, not as a result of looping the action. I knew something was wrong, because that behavior wasn't exhibited by my other character.

I've tweaked my bone and layer translations and rotations, and it seems to be fixed now. It took a good couple of hours, though.

Thanks again, and let me know when your tool is up (there we go again, don't quote me out of context).
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Hey, hands off there, boyo. Just because that made me laugh, here ya go.

Universal Layer Tool v1.2

Hit <F11> to repeat the last translation, <F12> for the last rotation.
User avatar
grimble67
Posts: 49
Joined: Wed Nov 24, 2004 11:05 pm
Location: Florida

Post by grimble67 »

Thanks for the "utility", 7Feet (is that a more appropriate term?)

Let me understand this properly: if I press F11, your tool will scan the timeline backwards for the last translation keyframe and copy it to the current frame?
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Not quite, but that would not be a bad idea. I'll consider throwing that in. What it does right now: if you are using the ULT, and you do a translation or rotation, it will remember the relative amount of the respective rotation or translation in respect to the previous position.

Myself, I don't use the rotation so much. But the translation helps a lot with walk cycles as actions. I'll set up a walk (standing in place style, all of the forward motion is provided by the layer translation) as as action, and duplicate it in the timeline as many times as necessary. At the beginning of the 1st instance of the action, set a keyframe (all the layer keyframes for this should be Smooth interpolation). Then I go to the keyframe that starts the next instance. Translate the layer and hit play. If it doesn't cycle smoothly between the first and second instance of the action, undo the action and try it again. It's a little hit and miss to get the initial translation right. But when you do, go to the initial frame of each instance of the action (in sequence, y'know) and hit <F11>. The same exact relative translation is applied. Endless walk cycles made easy.

As I think of it, one of the other things I need to implement is to be able to save the relative movements so you can use them when actions re-occur in an animation. I'll do that over the weekend.
User avatar
grimble67
Posts: 49
Joined: Wed Nov 24, 2004 11:05 pm
Location: Florida

Post by grimble67 »

Gotcha. So essentially, it takes the difference between the last two keyframes, and applies it to the current keyframe?

I can see how the ULT would make walking animation much simpler. Currently, I have to measure the layer translation distance of the first walk cycle, in pixels, and then manually add that amount incremently to the beginning of each subsequent walk action. If I'm understanding you correctly, the ULT does this exact calculation for you.
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

Yup, just that. I did the same thing, and then got awful tired of it. Automation rocks.
Post Reply