Set Origin Keyframe

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
unkledunkle
Posts: 26
Joined: Thu Oct 30, 2008 1:03 am
Contact:

Set Origin Keyframe

Post by unkledunkle »

Is the "set origin" a channel that can be animated? If not, how can you get a layer to rotate around a different center at different frames?
User avatar
synthsin75
Posts: 10253
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Mmm, that's kind of odd. Resetting the layers origin creates keyframes on the layer translation channel if there are already layer rotation or scale keyframes. That could get confusing.

You can't really animate the layer's origin. Any attempt to do so tries to just translate the layer. I'm assuming you're wanting to move the layer's rotation center without moving the entire layer.

The only way to do this would be to translate the layer to where you want its rotation point to be and then use point (or point-bound bone) translation to 'undo' the effect on the points. (No way to do this with images.)
User avatar
Víctor Paredes
Site Admin
Posts: 5814
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Is somewhere in the forum a topic where mike clifton itself explains why you can't animate the origin, but i don't remember where.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

When I first read this I had high hopes of creating a solution using bones and bone constraints. No luck yet.

The only solution is to use two bone; A parent bone and one child bone. The layer is bound to the child bone. By translating the child bone (and thus the layer) and rotating the parent bone you create a rotation offset. However you still have to translate the parent bone BACK to maintain the position.

This could easily be solved using a script. The main problem is how bone constraints work. They are... uh... incorrect in my opinion. By applying a -1 translation constraint on the child bone targeting the parent bone you cancel out the translation of the parent bone... uh...

Doesn't work though if you rotate the bones. The translation constraint "rotates" as well so now the -1 translation constraint is pointing the wrong way. this only works if there is NO rotation and both bones have the same base rotation.

Like I said a layer script could compensate for this (similar to other scripts that offset rotation of parent/child bones).

It could be there is still an unscripted solution using bones I haven't found yet. The main thing is this can't be done using layer rotation and layer origin points... until AS has an animation channel for layer origin.

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

Post by slowtiger »

Hm - I think of a simpler solution.

Imagine you want to have 2 different pivot points of a layer. Create one bone at the first point, with its end at the second point. Create the second bone at the second point. Bind the layer to the second bone. Move first bone = first pivot point, second bone = second pivot point.

This works fine for rotation and scaling, although not for any 3D movement. If you want to change the origin point there, do it the other way round: select all points of that layer and translate them.

You could also put any layer into a group/bone layer and use this root layer for 3D operations. Shiftig the origin point would be done cia translating the layers inside the root layer.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

AHA!!! Yeehaa!

Fazek's brilliant translate points tool!!!!

Woohooo!!

You need to use Fazek's translate point tool to translate the parent bone to offset the rotation origin!! His translate point tool ALSO translate bones BUT it "disconnects" and offsets rotation without any changes to other bones lower in the chain. If you drag the PARENT bone of a child bone ONLY THE PARENT BONE MOVES!

No need for any bone constraints. Just 2 bones as described above. A parent bone and a child bone. Layer bound to the child bone. When you want to offset the rotation translate the PARENT BONE ONLY WITH FAZEK'S TRANSLATE POINT TOOL. Then rotate the PARENT BONE.

The child bone stays exactly where it is but the rotation origin is based on the PARENT bone.

It works PERFECTLY for offsetting rotation of anything including layers.

Keep in mind this tool adds rotation as well as translation to bones lower in the chain of the one being translated. Even though it appears to only be translating a single bone it is applying rotation and translation offset to all bones lower in the chain.

-vern
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Below is a sample. The box is rotating initially around one point then the parent bone moves over time creating a "spiral" rotation. Took seconds to animate.

Example animation and file:

http://www.lowrestv.com/anime_studio/bo ... offset.mov
http://www.lowrestv.com/anime_studio/bo ... ffset.anme


This is actually doing the same thing you would do "by hand" if you were to offset the bones, except it is "automated" by the use of Fazek's translate points/bone tool.

The "bonus" feature is that the child bone can still be rotated. So you could create orbiting planets around a central sun.


-vern
User avatar
Víctor Paredes
Site Admin
Posts: 5814
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

it's a great discover, vern!. I ask myself if fazek thought about this when wrote this tools...


pd: sadly, my big problem with origin is the scale. when you have a character, you only can scale it in relation to its origin, even when your character is moved (with bones) and the origin is far away.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Yes, scale origin is a big issue. I don't see an easy fix for that. I try to keep the origin point of a layer centered on the character as much as possible. I usually find myself offsetting layer position when I animate layer scale. I don't do that very often though.

There was a discussion in another thread about a script for this. Scaling both x and y with one bone. Never did come up with a solution. However the problems I had would not exist for layer scaling... a script to link one bone to the x y scaling of a layer should be possible.

-vern
User avatar
synthsin75
Posts: 10253
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Finally, someone figured out a use for Fazek's point translation tool used on bones. Great tip Vern!
Post Reply