Orbit around an object

I’m trying to achieve the effect of an object orbiting around another object e.g. an animation of the planets going around the Sun (or cat in the following example).

The above example was created manually by combining two separate animations. I’m trying to do it all in Synfig. I’ve tried adding animating the Z depth so that it goes in front and then behind but it appears that parameter doesn’t like being animated and only chnages actual Z depth when it’s not animated.

Can anyone tell me how to do it? I’m using Synfig 1.0 RC #1

Well, you were moving in the right direction. Playing with Z depth is what you need.
Just remember that the top layers have the lowest values and bottom layers have the highest values.

So the logic would look like this (planet and satellite example):

  1. On start (0s keyframe), planet’s Z depth value set to 1 and satellite’s Z depth value set to 0. The satellite will move in front of a planet.
  2. When satellite reaches the end of the path and about to move back (3s keyframe), satellite’s Z depth value set to 2 and planet’s value unchanged. The waypoint of Z depth should be set to Constant In/Out interpolation.
  3. On moving back (6s keyframe), the satellite will move behind the planet.
  4. Then you put a Time loop layer on top of it and you’re good to go.


I also attached a simple sifz example, hope it’ll help.
OrbitExample.sifz (1.68 KB)

I have done some search here and there without results … the answer i was looking for was simply here : http://wiki.synfig.org/wiki/Z_Depth

Z-Deth is fast in this case, but it could become really complex in most animation. So, I prefer work with masks instead of depth when you have to work with different objects. With depth you can fall in a depth-storm that make your animation insanity.

The work with mask is simple when you asimilate the concept of how Synfig uses the layers.

For example, I have made this animation:

It is make with a very simple mask of the cat and a composition os transparency. When you need that the cat hide the ball, the mask get 1 in alpha. When you need that ball hide the cat, that mask get 0 in alpha.

I’ll put the Synfig file and the background used if you want to see the method and how it interact with the animation:

gato.sifz (3.94 KB)

Thanks, that works!

This works too, but wouldn’t it then be hard to work with moving images? The mask would have to follow the image, right?

Yes. But with the help of Synfig layers duplicatin, you can transform a part of your animation into a mask. And as it is attached to the original form, the animation moves the mask, too.

In your example, of course the Z-depth is fastest and easiest, but work with mask could make your life better in other circunstance. So, I think is better to know both methods. :slight_smile:

Anyone to create with that stuff a wiki tutorial beginner orbit page ??? :wink: