Rotation about X or Y-axis

Questions and answers about animation with Synfig. We encourage you to document your findings on the tips page of the website
User avatar
QuinB
Posts: 6
Joined: Tue Feb 20, 2018 7:11 pm

Rotation about X or Y-axis

Postby QuinB » Wed Jun 06, 2018 6:05 pm

I hope I have the correct page for this question; if I don't, please bear with me and I'll try to hit the mark next time around.

I'm attempting to rotate a bitmap [or a vector, for that matter. I stalled on that problem several months ago] around its centre line vertically, as per the image below: basically, think of a coin spinning on its edge - you see the image 'backwards' when the coin faces 'away'.
Image
Rotating around the Z axis is easily allowed for in Synfig, but I'm having a head-scratcher of a time working out either of the other two dimensions.
Could anybody point me in the right direction, please?

QuinB
"Writing is not a serious business.

It’s a joy and a celebration.
You should be having fun with it...
It’s not work.

If it’s work, stop
and
do something else." - Eric Arthur Blair, better known as George Orwell.

Advertisement

User avatar
Majkel
Posts: 56
Joined: Sun Jun 12, 2016 8:57 am
Location: Poland

Re: Rotation about X or Y-axis

Postby Majkel » Sat Jun 09, 2018 4:37 pm

Hi
how did you do that? You used group transformation?

User avatar
QuinB
Posts: 6
Joined: Tue Feb 20, 2018 7:11 pm

Re: Rotation about X or Y-axis

Postby QuinB » Sat Jun 09, 2018 5:42 pm

I'm trying to find out HOW to do this in Synfig.

This is a LightWorks 3D effect applied to a GIMP-created 2D image and I'd like to be able to get Synfig to do the same. Easily.

My nearest effort under Synfig (which I'm relatively new at) was to reduce the X dimension, narrowing the work to a line, and then duplicate and mirror the image and effect, taking it from a line to full width again - a method which seemed imprecise and time consuming. I was hoping one of the Synfig sky gods could advise on a better method.

Q
"Writing is not a serious business.

It’s a joy and a celebration.
You should be having fun with it...
It’s not work.

If it’s work, stop
and
do something else." - Eric Arthur Blair, better known as George Orwell.

Fadhilkwan
Posts: 120
Joined: Wed Feb 11, 2015 6:23 am

Re: Rotation about X or Y-axis

Postby Fadhilkwan » Sun Jun 10, 2018 3:00 am

i used group transformations for this one...
it's a bit difficult to put the axis point precisely, though (there are some leftover guides in there...)

spin.sifz
(9.06 KiB) Downloaded 8 times
My YouTube Channel, Where i upload... things...
https://www.youtube.com/channel/UCX4mvW ... nNCjody7rQ

My Twitter, where i tweets, likes and retweets stuff.
Also sometimes shows my progress on making workflows for Synfig
https://twitter.com/Fadhilkwan

User avatar
QuinB
Posts: 6
Joined: Tue Feb 20, 2018 7:11 pm

Re: Rotation about X or Y-axis

Postby QuinB » Sun Jun 10, 2018 6:16 am

Thanks - I'll check it out.
I was surprised there wasn't a specific function for it. (Proves how good I think Synfig is).
Q

User avatar
QuinB
Posts: 6
Joined: Tue Feb 20, 2018 7:11 pm

Re: Rotation about X or Y-axis

Postby QuinB » Mon Jun 11, 2018 7:50 am

Fadhilkwan,
Thanks - getting the idea - I need to tinker a bit more to get things right, but I think I'm getting there.

Q

User avatar
BobSynfig
Posts: 319
Joined: Sat Aug 15, 2015 6:08 am

Re: Rotation about X or Y-axis

Postby BobSynfig » Mon Jun 11, 2018 9:01 pm

Hi,

I think the most "Synfig way" to achieve your goal is to use the Converters.
First you need to create a group containing all your elements.
Fadhilkwan, I stole your sample without any shame :mrgreen: and I went deeper.

We will play with the horizontal scale as well but directly with a periodic (alternating) movement.

Select the "Coin" group layer.

Expand "Transformation" and select "Scale"
We will split its X and Y axis
Right-Click / Convert / Composite

Expand "Scale" and select "X-Axis"
We will transform it as a periodic movement (Cosine)
Right-Click / Convert / Cos

Expand "X-Axis" and select "Angle"
Its spinning speed is constant, so it will be a linear
Right-Click / Convert / Linear

Expand "Angle" and select "Rate"
Rate is the degrees of rotation per second
I set it as 180 so a full spin takes 2 seconds

Let's try it, it works all by itself :)
Converters are one of the most powerful functionnalities of Synfig.
At first it looks tricky but it is only a matter of logic ;)

You will find more information about converters in this tutorial:
Image

So it is the proof that Synfig is as good as you thought ^^
Attachments
SpinCoinConvertersBase.sifz
(3.55 KiB) Downloaded 6 times
SpinCoinConverters.sifz
(3.64 KiB) Downloaded 5 times
Always check Wiki/FAQ first! - Use last builds only: Stable 1.2.1 / Dev 1.3.8 (highly recommended)
Official Synfig Training Course - Buttons too big in Linux? - No icons with appimage ? - Google Translate may help

User avatar
QuinB
Posts: 6
Joined: Tue Feb 20, 2018 7:11 pm

Re: Rotation about X or Y-axis

Postby QuinB » Tue Jun 12, 2018 1:03 pm

That reads interestingly.
I've just pulled the files in and I'll check them out - thanks a lot for taking the time to educate

Q

User avatar
QuinB
Posts: 6
Joined: Tue Feb 20, 2018 7:11 pm

Re: Rotation about X or Y-axis

Postby QuinB » Wed Jun 13, 2018 6:46 pm

BobSynfig wrote:Hi,

I think the most "Synfig way" to achieve your goal is to use the Converters.
First you need to create a group containing all your elements.
Fadhilkwan, I stole your sample without any shame :mrgreen: and I went deeper.
...
^^

I was blown away by that tutorial the first time I saw it - I couldn't manage to make anything I tried based on it work, but it was inspirational and appealed to my ideas of how animation Should Be.

Here's the technique applied to the same bitmap as above:
Image

I exported to png before creating the gif and manually removed the empty frames where the bitmap is 'edge on'; laborious, but provides a smoother effect.

I'm not having any luck reversing the direction of spin - yet. Tomorrow's a new day, after all.
Thanks for the input!
Q
Last edited by QuinB on Thu Jun 14, 2018 4:24 am, edited 1 time in total.

Fadhilkwan
Posts: 120
Joined: Wed Feb 11, 2015 6:23 am

Re: Rotation about X or Y-axis

Postby Fadhilkwan » Wed Jun 13, 2018 8:59 pm

BobSynfig wrote:I think the most "Synfig way" to achieve your goal is to use the Converters.
First you need to create a group containing all your elements.
Fadhilkwan, I stole your sample without any shame and I went deeper.
...


sure, you're welcome!! :mrgreen:
nice tricks by the way, i kinda get the mechanism for it :idea:
My YouTube Channel, Where i upload... things...
https://www.youtube.com/channel/UCX4mvW ... nNCjody7rQ

My Twitter, where i tweets, likes and retweets stuff.
Also sometimes shows my progress on making workflows for Synfig
https://twitter.com/Fadhilkwan

User avatar
BobSynfig
Posts: 319
Joined: Sat Aug 15, 2015 6:08 am

Re: Rotation about X or Y-axis

Postby BobSynfig » Thu Jun 14, 2018 7:12 am

By the way, we can add some horizontal and vertical jig to the coin to look more natural.
As well as before, we use converters on a "Jig" layer, whose Offset will be split in composite.
This jig will be connected to the Cosine of the rotation (which will be an exported value, varies from -1 to 1).
Then it is multiplied by a scalar factor (which depend also on the Scale property, I set 0.4 for X-Axis and 0.05 for Y-Axis).
;)
Attachments
SpinCoinConvertersJig.sifz
(4.06 KiB) Downloaded 4 times
Always check Wiki/FAQ first! - Use last builds only: Stable 1.2.1 / Dev 1.3.8 (highly recommended)
Official Synfig Training Course - Buttons too big in Linux? - No icons with appimage ? - Google Translate may help


Return to “Animation related help”

Who is online

Users browsing this forum: No registered users and 5 guests