Layer Switch WITH tween

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Blade_Rain
Posts: 16777215
Joined: Thu Mar 27, 2008 10:20 pm
Location: Delaware

Layer Switch WITH tween

Post by Blade_Rain »

I watched the sample file squeaky_10sec (which is bundled w/ AS), and was going through the layers. I noticed that the animator made switch layers, and when they switched the layers, the shape tweened instead of instantly switching. For example, the eye layer; I could go to a frame, and make the onion's eye wide, and instead of an instant transition, the eye would tween to the said shape.

So, I've been trying to replicate this, but don't know how. Any assistance/reply would be appreciated. Thanks!
User avatar
Nolan Scott
Posts: 396
Joined: Fri Oct 22, 2004 2:14 am
Location: Auckland, New Zealand
Contact:

Post by Nolan Scott »

Give all your vector-layers (eyes or else) the same points (e.g. create the first eye-layer, then duplicate this layer as much as you need, and modify just the points in each layer.

Open the Switch Layers Settings “Switch-Tab” and check “Interpolate Sub Layers”.
(if all your layers have exactly the same points, interpolation (tween) will be smooth)

Cheers
Nolan
User avatar
Blade_Rain
Posts: 16777215
Joined: Thu Mar 27, 2008 10:20 pm
Location: Delaware

Post by Blade_Rain »

Thanks for the reply!

What if they don't all have the same points, like if I decide to add an extra point to a specific layer? Will it still be able to interpolate?
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Blade_Rain wrote:Thanks for the reply!

What if they don't all have the same points, like if I decide to add an extra point to a specific layer? Will it still be able to interpolate?
No
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

It is not only the number of points, but also the exact orientation of the points. Points are numbered while you create them.

For instance, if you create a rectangle clockwise and another counterclockwise, each in its own layer, and inside a switch layer, switch layer interpolation will move the points across a diagonal direction, even if you don't move the points in each rectangle.

This means, that the best workflow is to create one vector drawing in a layer, create copies from that layer, and start moving the points in the copied layers. Only then you put them in a switch layer. If it turns out you need more vector points in one of the layers, you need to start all over again.

Why? If you have four points in a rectangle, they are internally numbered 0, 1, 2, and 3. If you add a point between point 0 and 1, it is internally numbered 4, and the next point 5, independent where you put it on the closed outline.

Unfortunately, the internal numbering is not visible to the animator, and there is no script in the standard scripts to renumber the points, for instance, to run clockwise, from the zero-th to the last point.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I have successfully added and deleted points in switch layers. It is a freaking pain in the arse and I don't recommend it. ;)

The trick is to put a key for one of the switch layers. Go to the time line between that layer and the next one. Select the layer and you will see how the point is moving... figure out which point to delete from each layer or figure between which two points you want to add a point. the key is to add the points in exactly the same spot on each layer. It is harder than it sounds... and you can end up with a "broken" switch layer.

I use a different technique to create switches that avoids this problem. Create one vector layer as the "base". Create the switches using point motion on key frames for that layer.

Duplicate that layer for each key frame. Copy each key frame to frame 0 for each duplicate layer and delete all the other keys. Drag those layers into a switch.

From that point forward only use the original "base" layer to create or modify the switch layers. Yes this is a bit of extra work but if you absolutely MUST add points to layers in a switch it is much easier and less stressful to "recreate" the switches this way then to try and figure out where to add points to however many layers you have.

-vern
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

I was wondering, Vern, if it isn't somehow possible to "recalculate the points", so you can add points in one layer of a switch, and have the other layers in that switch be recomputed to have the same number of points in geometrically the same locations. That would make animating with switch layers a lot more flexible. The animator then only had to make sure all the added points in the other layers are in the right positions.

If that isn't possible, or too difficult to write, perhaps modifying the Translate Points tool, to show the number of the selected point (if only one point is selected). I could imagine an interactive text field, where you could read the internal number of a single selected point, and that you could select a point by entering its internal number into the text field. Making the invisible visible would help a lot in making adding points to existing inbetweens in a switch less painful.
Post Reply