animating shapes hight in layers

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

Moderators: Víctor Paredes, Belgarath, slowtiger

jurjen
Posts: 20
Joined: Fri Jan 27, 2006 1:21 pm

animating shapes hight in layers

Post by jurjen »

hello,
I would like to know if its possible, in one way or the other, to animate the shapes in hight. so when there are two shapes in one layer (for example) to switch.
it would be very helpfull when animating a character turning around.
I know I can work around it by jusing different layers but thats not handy.

so any tips or tricks or a script. thank you very much.
User avatar
artfx
Posts: 213
Joined: Sat Nov 11, 2006 10:52 pm
Location: Hollywood
Contact:

Post by artfx »

Do you mean animate them in depth (distance to camera)? This is possible if they are constructed for that, but thios would be much more easily achieved using switch layers. One version has shape Ain front of shape B, and the other layer has shape B in front of shape A. Switching is easy.
----
Terrence Walker
Studio ArtFX
LEARN HOW TO Make YOur Own Animated Film!
Get Video Training to Show You How!
jurjen
Posts: 20
Joined: Fri Jan 27, 2006 1:21 pm

Post by jurjen »

thanks for your reply.
I dont mean it 3d.
its more like if you make a 2d character in 3/4 postion and you want to make him turn. at a moment the arm on the back becomes the arm in front. so it would be very handy if i could animate the shape from back to front. its not really animating its more like saying on frame 5 the shape is in the back and on frame 6 the frame is in the front.
switch layer is still a bit to complicated. for simply only the arm in simple animation it will do the job but when you want to animate the hair the eys the nose the legs they all have a different moment in time that they go behind a soemthing or come in front.
an extra option in the timeline fot it that would be very helpfull

jurjen
User avatar
bupaje
Posts: 1175
Joined: Fri Nov 12, 2004 5:44 pm
Location: California
Contact:

Post by bupaje »

You want to be able to animate the two images -front and back view- at once, one on top of the other and flip the stacking order of the objects on the layer is what it sounds like.

I am not at home, so can't try, but I'll suggest two things -assuming I understood right. Check to see the Scripting forum, http://www.lostmarble.com/forum/viewtopic.php?t=2448 as I think I saw there, or somewhere, a script for saving animation on a layer? If there is maybe you can set up two layers, animate one, copy the animation and apply to the other layer.

I don't remember if you can animte styles -think so- so is it possible that you can create an empty (transparent) style and at the point you want the bottom layer to show maybe apply this transparent style to the top?

Sorry if these may be weird suggestions, my memory is chronically bad and I'd have to have the program open to be sure.
[url=http://burtabreu.animationblogspot.com:2gityfdw]My AnimationBlogSpot[/url:2gityfdw]
User avatar
artfx
Posts: 213
Joined: Sat Nov 11, 2006 10:52 pm
Location: Hollywood
Contact:

Post by artfx »

There's two easy ways to do tis. One brute force... well.. both kinda...

1. Duplicate the arms with one copy in front of the body and one copy in back of the body. Use the visibility to key to turn them on and off as needed. When the body turns, on, say, frame 6 you turn the back copy off and the front copy on.

2. If you're doing this a lot, you can make switch that contains the same things in tis sub layers, just ordered differently and then switch as needed. If your model is complex, though, that could mean making copies of quite a few layers.
----
Terrence Walker
Studio ArtFX
LEARN HOW TO Make YOur Own Animated Film!
Get Video Training to Show You How!
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

bupaje wrote: a script for saving animation on a layer? If there is maybe you can set up two layers, animate one, copy the animation and apply to the other layer.
I'm busy developing such a script, only for bone animation, but the two layer scripts will behave just as well if you copy from one vector layer to another. See Possible to copy vector point motion from bone influence?#Working solution using two layer scripts for my first attempt at a solution. Embed the "org layer script.lua" in the original layer (embed layer script in the General tab of the layer) and the "copy layer script.lua" in an exact copy of the original layer (even with the same layer name), and run your animation. A detailed recipe how to use the scripts can be found in the above mentioned posting. Unfortunately, it only works for vector layers. I haven't got a clue how to get it working for image layers, because that would be a God-send for the Flash animators out here.
jurjen
Posts: 20
Joined: Fri Jan 27, 2006 1:21 pm

Post by jurjen »

thanks for the replies.
working with different layers or switch layers or make it transparant wil indeed all do the trick but its to limmeted and takes time.

btw I dont work with bones)

thanks again everyone
Last edited by jurjen on Tue Dec 06, 2011 7:00 pm, edited 1 time in total.
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

I think shape order can be made animateable, but it is not yet a feature in AS. At the moment, you could try to hack this with a layer script (if in frame x, do shape ordering x; if in frame y, do shape ordering y), but I don't know if it would be practical for a large amount of shapes because of rendering constraints. The same, but with even more constraint, applies to layer ordering. It is feasible to change the layer order dynamically, but it will probably be very processor intensive, maybe so much so, that it isn't practicle in most cases.

I don't think that the developer has plans in this direction, because there are enough alternatives with layer visibility and layer switching, which, I assume, are much more processor-friendly.
User avatar
Rai López
Posts: 2289
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

Rasheed wrote:At the moment, you could try to hack this with a layer script.
EY! What a coincidence! Cause that is exactly that I tried to get with all that questions and experiments with Shape IDs/names lua functions, remember? Although I had abandon that idea cause it was slipping away from me... Still thinking on that, but (of course) I'd prefer LM consider it like a future feature, yes... I don't know you guys, but for some reason I hate play with duplicated shapes and his visibility all the time, the other would seems to me like a more clean & quick solution, isn't?
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

Well, perhaps I could one day write a toolbox to help you deal with switch layers and hiding parts of your animation. I don't particularly like the solution with switch layers, because it is so processor intensive, and essentially a hack (= smart workaround).

Here's some anim I made just yet, using switch layers:

Image
(source: ahhh.moho.zip)

The stick is divided into an upper part and a lower part, each in a layer, and put inside a switch layer. A copy of this layer is put underneath the rotating shape's layer (rotates along the y axis in 3D), while the original is above the rotating shape's layer. Now it's just a matter of switchting at the right time.

If you don't have switch layers (non-pro version), you can do the same trick with layer visibility.
poetbeware
Posts: 11
Joined: Sun Dec 03, 2006 2:15 am

Post by poetbeware »

At the moment, you could try to hack this with a layer script.
EY! What a coincidence! Cause that is exactly that I tried to get with all that questions and experiments with Shape IDs/names lua functions, remember? Although I had abandon that idea cause it was slipping away from me... Still thinking on that, but (of course) I'd prefer LM consider it like a future feature, yes... I don't know you guys, but for some reason I hate play with duplicated shapes and his visibility all the time, the other would seems to me like a more clean & quick solution, isn't?
I agree that animating shape ordering would be a fantastic feature for the next version of AS. However, I'm curious about why the layer script idea didn't work. It seems like a very clever hack. Could you point me to your script code? I'd like to take a crack at it.

I'm asking because I deem it impossible to do a front walk cycle without animating shape ordering. Eg, I want left arm in front, right arm in back, and then left arm in back, right arm in front. I tried breaking the limbs out in separate layers, but then I get gaps between the limbs and the body.

I was going to just duplicate my entire character three times, but then I have to change the mouth shape or something I have to do it in three places...
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

poetbeware wrote:Could you point me to your script code?
That is only in my head, unfortunately.
jurjen
Posts: 20
Joined: Fri Jan 27, 2006 1:21 pm

Post by jurjen »

hello,
did anyone already wrote a script for it?

and I have another question. if i have a shape and a part of this shape is going over itself that part is disapearing. why? it would be helpfull if this would not happen or if I could turn that of.


thanks.
jurjen
User avatar
slowtiger
Posts: 6237
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

if i have a shape and a part of this shape is going over itself that part is disapearing. why? it would be helpfull if this would not happen or if I could turn that of.
Impossible. This is a quality of all vector-based graphic software. You have to live with it and put things which need to overlap without disappearing in different shapes.
jurjen
Posts: 20
Joined: Fri Jan 27, 2006 1:21 pm

Post by jurjen »

impossible? I never noticed that problem with illustrator...
I dont believe it is impossible. it would help me a lot if didnt happen.
anyway thanks for your reply
Post Reply