Change shape order during animation?

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
BA
Posts: 196
Joined: Tue Mar 08, 2005 7:28 pm
Location: Griddleville
Contact:

Change shape order during animation?

Post by BA »

Is there a way to change the stacking order of shapes that are inside one layer during an animation?

normally of course the shapes would be on separate layers and then it would be no problem, a quick depth shift.

but in this case the shapes in question are inside an interpolated switch layer. I need an action to move one shape behind another. It would be easier if you could have interpolated group layers inside a switch, but it seems that when i try that the switch interpolation doesn't work for the group's sublayers. I guess that's a whole other question.
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

No there isn't.
What you could do is use masking or you could make a duplicate of the layer that should go in front of another, put that copy in the right place in your layers panel and use visibility to switch the first one off and the second one on.
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

rylleman is correct in that shape orders are not animatable. But there is a way to simulate it, within one layer in a way that is similar to Layer visibility trick. Create you're initial shape, and place it at the level it should be to pass behind the "main" shape. Copy all the points in the initial shape, and paste them in place, so that the second shape is overlapping and an exact duplicate of the initial shape. Place this second shape so it is above the main shape. Then you need to select all of the points of both the initial and second shape (I just lasso them to get them all), and create a point group so you can get at them easilly when you are animating and want to manipulate both shapes together. If there a few commonly used sets of points, feel free to make a few point groups, it makes life easier. If you want to select individual points, you must use the box or lasso select to choose them. Just clicking on a point to select it will generally (alway?) select the uppermost point. Since the whole point of this is to have the two shapes moving in tandem, that won't do.

So now you have the basic setup. If you want to make you're life a little easier, I made a tweak of the Select Shape tool that shows you the ID number of the selected shape. Makes ordering them properly a snap. Over at this thread:
http://www.lostmarble.com/forum/viewtop ... ight=shape

For the second part, create a step type keyframe at the beginning of the animation for the second, uppermost shape. Keyframe interpolation works on what comes after, so you need that, as we want thing to jump, not fade. Now, you are normally going to be seeing the second shape. But when you get to the point where you want the shape to "go behind", select the upper shape, insert another step keyframe in the Selected Fill Color and Selected Line Color channels of the timeline. While that shape is still selected, make the line and fill colors for that upper shape completely transparent. It disapperars, all you see is the lower shape, and you're done. To reverse it, do the same but kick it back up to opaque.

It may sound a little complicated, but really is pretty quick and simple. As with so many things in Moho, it's all about haveing a proper initial setup. Hope that helps.
Post Reply