Share this topic on AskShare this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on TwitterShare this topic on YahooShare this topic on Google buzz

Author Topic: Animation Within an Animation  (Read 5468 times)

0 Members and 1 Guest are viewing this topic.

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Animation Within an Animation
« on: December 26, 2006, 05:58:35 PM »
This tutorial is dedicated to darth_gimp!

Hello, fellow GIMPers!  In this lesson, I'm going to show you how to create a rotating animation with an animation inside of it, like
so:




The steps to create this are very easy and go by pretty quickly.  In fact, you'll be able to create this animation in just a couple of minutes!  Although simple, I hope you'll be able to add a few tools to your GIMP arsenal.

Before you start this tutorial, you'll need to have GAP (the GIMP Animation Package) installed on your machine.  We're not going to use GAP in the fashion many of you may be accustomed to; however, GAP does add a very important filter which will be of big use in this tutorial, as well as your other graphics creations.  This filter is called the Filter All Layers filter.  You'll see how important it is in just a minute.  If you need to download GAP, Windows users can get it here: http://gimp-win.sourceforge.net/stable.html and Linux users can get it here: http://gimp.org/downloads/.  Sorry Mac users, there is no GAP for you.    Windows users can just unzip the file and double-click the executable file to install.  Linux users.....well, you'll know what to do.  I haven't a clue.

Also, please download the two scripts I have attached below (See very bottom of tutorial for 'scripts.zip'.)  If you've followed some of my other tutorials you may not need them; however, I suggest you make sure as they will make your life much easier.  One is a script by saulgoode which allows you to set the timing and handling mode for all your layers at once.  The other is by noclayto that sets all of the layers to fit the canvas size. 

The scripts are nothing more than text files and they are ready to go.  Just drag and drop them into to your GIMP/Scripts folder.  Install only those that you need.

Next, start GIMP or, if GIMP was already open, go to the main GIMP window Xtns Menu > Script-FU> Refresh Scripts and, if you followed the instructions above, the scripts will be found here:

Layer Menu > Layer(s) to Image Size and Filters Menu > Animation > Settings...

If they are not there try again.

Some of the images in the tutorial have been resized by the board.  Please right click on them and choose View Image to see the full-sized image.

Step 1:

Open up your animation. For this tutorial, I'm using this animated kaleidoscope I made:



Step 2:

Convert your animation to RGB mode.  Image Menu > Mode > RGB  If you skip this step, you won't get very far as the Map Object filter (as well as many of GIMP's other filters) only work on images in RGB mode.  Animations are made up of indexed colors, which are not the same as RGB (see this link for a good definition Indexed Colors on Wikipedia!



Step 3:

Adjust your canvas size to allow for some space as the image rotates.  Go to Image Menu > Canvas Size...



I'm using 125 X 125, but you use whatever you think you need.



Step 4:

Now, go to Layer Menu > Layer(s) to Image Size to set all your layers to the new canvas size.



Step 5:

Now, go to Filters Menu > Filter All Layers...



Type in Map in the blank and click on the Search by Name button:



Then, choose the one I've highlighted on the left and click the Apply Varying button:



Step 6:

We need to do a quick calculation to determine how many pixels the image needs to turn between layers so that GIMP can make it move smoothly.  To do this, look at the number of layers in the animation: mine has 49.  A circular rotation is 360 degrees.  The number of pixels each layer needs to move is 360 / # of layers (or 49 in my case).  This equals roughly 7.35 pixels.  Keep this number in mind as we'll use it in just a minute.

For now, enter the parameters as I've listed below.  The reason I use -180 is that the Map Object tool goes from -180 to 180 as its rotation parameters, not 0 to 360.





Hit the OK button to run the filter on the bottom layer.

When this dialog pops up, hit continue:



Step 7:

The Map Object window will automatically open again.  This time it wants the settings for the final layer in the image.  Then, GIMP will automatically calculate the parameters for all the in-between layers.  Since the only thing that is changing for the remaining layers is the rotation, we only need to change one tab as shown below:



Remember above when we figured the number of pixels we needed to move in each layer was roughly 7.35?  Well, here's where that number comes in to play.  To determine the ending layer Y value, take 180 - (minus) the number of pixels needed to move per layer (in my case 7.35).  This comes out to be 172.6

Click OK.

When this dialog appears, click Continue:



GIMP will begin modifying each layer with the appropriate number of turns along the Y axis.

Step 8:

Once, it's finished, test out your animation:  Filters Menu > Animation > Playback...

Step 9:

You may want to adjust your speed and your layer handling mode for all layers.  I suggest that you at least set the layer handling mode to replace as shown below.

Filters Menu > Animation > Settings...

I used 75 ms and replace for my image.  Playback and readjust the setting to taste. 



Step 10:

Now, save your animation.  File Save or Save as....  and add a gif extension to the end.  Select the following parameters in the windows that appear.





Here's the final result!



Well, I hope you learned some new tricks with animations and had a good time.  Make sure you show me your results.  Experiment with the settings a bit.  Try reversing the rotation or rotating it along a different axis.

BTW, these steps have to be modified slightly in order to get it to work with a cube.  If you would like, I can post that information later.  Or, maybe you'll be able to figure out the adjustments on your own.

Happy GIMPing!

Art
« Last Edit: October 06, 2010, 11:11:18 PM by Hi-T3k~HillBilly »
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Offline paladin169

  • Member
  • **
  • Posts: 1,601
  • Karma: 0
  • Cookies!
Re: Animation Within an Animation
« Reply #1 on: December 27, 2006, 07:58:15 AM »
Does this work with non-animated objects? I'm asuming so but can never be too sure.
Formerly sponge!


Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: Animation Within an Animation
« Reply #2 on: December 27, 2006, 08:32:17 AM »
Yes, it would essentially be the same thing as my sig rotator tutorial.
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Offline swmiller6

  • New Member
  • *
  • Posts: 0
  • Karma: 0
Re: Animation Within an Animation
« Reply #3 on: December 27, 2006, 09:16:59 AM »
Man how do you come up with this stuff?? excellent as usual!!

swmiller6
"I feel sorry for those who don't drink, cause they will never know how good it feels to wake up with out a hangover..." -- Frank Sinatra

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: Animation Within an Animation
« Reply #4 on: December 27, 2006, 10:58:33 AM »
@ Swmiller and others...thanks for the comments!
« Last Edit: October 06, 2010, 11:09:54 PM by Hi-T3k~HillBilly »
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.


Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: Animation Within an Animation
« Reply #5 on: December 29, 2006, 09:07:34 AM »
If I were you I would explain why it wouldn't work without RGB.  ;)

Done.  Included a link to Wikipedia describint the difference between indexed and RGB colors as well.

« Last Edit: December 29, 2006, 09:08:22 AM by fencepost »
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Offline z3matt

  • Member
  • **
  • Posts: 213
  • Karma: 0
Re: Animation Within an Animation
« Reply #6 on: June 08, 2008, 05:39:57 PM »
I know i might sound stupid, but how do you get the scripts from the internet to work, i can make them a document then i can put them places, i don't know if i should use the gimp preferences or should i put it in a file? If a file which one? can you give me a link?
Favorite:
Newest:

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: Animation Within an Animation
« Reply #7 on: June 09, 2008, 08:34:38 AM »
A script is nothing more than a text file.  In order for the file to be recognized by GIMP, it needs to have an "scm" extension on it.  If you look on my scripts page, you'll see what I mean: http://fencepost.gimpdome.com/Scripts/  So, just save the script to your GIMP scripts folder:  C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts and add an "scm" extension to the end.

If you're using and the script is in Notepad/Wordpad, you need to do the following: Windows has a nasty habit of adding a "txt" extension to the end of script files when using Notepad/WordPad. In Notepad, make sure you choose "All Files" under the Save As Type dropdown (don't use Text files) and in WordPad, make sure you use "Text Document" under the Save As Type Dropdown. I know it's a pain/confusing, but that's the way it is.

Then, go to Xtns Menu > Script-Fu > Refresh Scripts.

The script should then be available for use.
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Offline z3matt

  • Member
  • **
  • Posts: 213
  • Karma: 0
Re: Animation Within an Animation
« Reply #8 on: June 10, 2008, 10:49:01 AM »
Thanks

Posted on: June 09, 2008, 12:49:23 PM
Mine didn't really work well haha xD
Favorite:
Newest:

 

anything