Gimptalk - Premier Gimp Community: GAP - Spinning Striped Pole - Gimptalk - Premier Gimp Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

GAP - Spinning Striped Pole

#1 User is offline   ccbarr 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,701
  • Joined: 23-February 06

Posted 06 December 2009 - 05:57 AM

This may be one of the easier of my GAP tutorials to follow. Here is what we are making:

Posted Image

Frames Modify

One of the features of this tutorial is you will be using the Frames Modify plug-in for GAP. I don't explain it during the tutorial, but the Frames Modify plug-in has a lot of features including allowing the user to modify a set of layers within either a set of frames or over the entire group of frames using various Gimp plug-ins. It has more features than just that, and is quite a useful part of GAP along with the Move Path plug-in.

Preliminaries

Create a nice working folder to save all of your image files that will be created during this tutorial. It's a good habit to always make a working folder for animation files created with GAP, since it can make a lot of them.

Grab the following script by saulgoode:

http://www.flashingt.../combine-bg.scm

Right-click the above and select Save Link As or Save As (depending on the choices your browser offers) and save the script into your Gimp Scripts folder.

Finding Your Gimp Scripts Folder

From a Gimp image window select:

Edit | Preferences

This opens the Preferences Dialog window.

On the left side of the window will be a list of various items that you can select.

At the bottom of that list is a heading named Folders.

Click on the little + or triangle icon beside the Folders name to expand that section.

Look below Folders and click on the Scripts listing.

Now on the right side of the window, you will see a section showing the Path or Paths to your Scripts folder(s).

Normally you want to place your scripts into the Scripts folder located inside your personal .gimp-2.6 folder if you have a choice of more than one Scripts folder.

Refresh Scripts

From a Gimp image window, select:

Filters | Script-Fu | Refresh Scripts

A Pattern Image File

Grab this image and open it in Gimp:

Posted Image

Here is the link in case you prefer to download it in Gimp:

http://imgur.com/etUqg.png

Once you have the image opened, select:

Edit | Copy

That will place a copy of the image on your clipboard

Open your Patterns Dialog window by selecting from a Gimp image window:

Windows | Dockable Dialogs | Patterns

If you look in the upper left corner of your Patterns Dialog window, you will see an icon showing the copy of the image above that you copy/pasted in Gimp:

Posted Image

Let's Begin

1.) Open a new 400x400 image window.

2.) Drag the red-and-white pattern from the upper left corner of your Patterns Dialog window on to your 400x400 image.

You should now have this:

Posted Image


3.) Add an Alpha Channel to your Background Layer in that image by selecting:

Layers | Transparency | Add Alpha Channel

or simply right-click on the Background Layer in the Layers Dialog window and select:

Add Alpha Channel

This adds transparency to the layer.

4.) Save your 400x400 image as background_000001.xcf into your working folder.

5.) From the background_000001.xcf image window, select:

Video | Duplicate Frames

Posted Image

5a.) As the above image shows, set N times to 30. From Frame and To Frame remain at 1.

5b.) Click OK.

Gimp has now created 30 additional copies of background_000001.xcf and placed them in your working folder. You will only see the background_000001.xcf frame though.

6.) Again from the background_000001.xcf window select:

Video | Frames Modify

Posted Image

6a.) Notice the Function button in the upper left corner. Click on it and select:

Apply filter on layers

Posted Image

6b.) Click OK.

7.) The Filter Selection Dialog will open:

Posted Image

7a.) As shown above select:

plug-in-map-object

7b.) Then click the Apply Varying button.

8.) This opens the first instance of Map Object. Here we will provide GAP with the settings for our first frame:

Posted Image

8a.) In the Options Tab:

Make sure you have selected Cylinder as the Map To type and Transparent Background selected as shown above.

Posted Image

8b.) In the Cylinder Tab:

Set Radius to 0.10
Set Length to 0.65


Do not worry about setting Top and Bottom. You can leave those alone.

Posted Image

8c.) In the Orientation Tab:

Position Values are:

X: 0.50000
Y: 0.60000
Z: 0.00000

Rotation Values are:

X: 0.0
Y: -180.00 (that's minus 180.0)
Z: 0.0

No need to worry about any other Tabs.

8d.) Click OK.

9.) A little window will open:

Posted Image

Click Continue

10.) This will open the second instance of Map Object. Here we supply GAP with the settings of our final animation frame:

Posted Image

10a.) In the Orientation Tab:

The only change you need to apply is to make Y 180.0.

10b.) Click OK.

11.) You will get a second little Continuation Dialog window open:

Posted Image

Click Continue.

Now GAP goes to work calculating the rotation value for each of the in between animation frames. Depending on your processor speed, this could take a minute or so, or several minutes.

When it finishes processing, select:

12.) Video | Frames to Image

Posted Image

12a.) As shown in the image above, in the Layer Basename section,
change (41ms) to (100ms)

12b.) Then click OK.

This will create a nice multilayered image.

13.) In the new image that is created, try playing back the animation by selecting:

Filters | Animation | Playback

13a.) You will notice a slight pause in the animation. That is because for the first (bottom) and last (top) layers the cylinder is at the same rotation position. In the Map Object window, the first layer Y value was at -180.0 and the last frame Y value was set at 180.0. Geometrically those two values are the same. (Also the range from -180.0 degrees to 180.0 degrees is 360 degrees or one full rotation)

14.) In the Layers Dialog window, delete either the bottom or the top layer of the multi-layered image to fix the slight pause in the animation.

15.) Run Filters | Animation | Playback and the object should have a nice smooth rotation now.

16.) From the Layers Dialog window, select the bottom Layer of the multi-layered image.

16a.) Either click on the New Layer icon at the bottom left of the Layers Dialog window or from the image window select:

Layer | New Layer

16b.) Accept the default settings to create a transparent layer in the New Layer dialog window and click OK.

17.) Move the New transparent layer to the bottom of the stack of layers in the Layers Dialog window.

18.) Bucket Fill that layer with color white.

19.) If you properly installed saulgoode's script mentioned at the beginning of this tutorial, select:

Filters | Animation | Combine Background

This will add a background (only white in this case) behind each of the animation layers.

20.) After running the script delete the bottom white layer.

21.) Save the multi-layered image as an animated GIF by selecting:

File | Save As

21a.) Then select a name for your file: some_name.gif and Click on the SAVE button.

21b.) Make sure when the Export Dialog window opens that you select:

Save As Animation

Otherwise Gimp will combine all of the layers into one and save it as a standard GIF image rather than an animation.

21c.) Click Export.

21d.) Another window opens, and you can accept the defaults there and just click OK (or SAVE perhaps).

Your animated GIF is now saved.

Here is a sample of applying a center picture (similar to the approach in PhotoMaster's Christmas Ornament tutorial) to a simple background, and then converting to a spinning cylinder via GAP:

Posted Image


Thanks for checking out this tutorial.

:)
0

#2 User is offline   PhotoMaster 

  • Member
  • PipPip
  • Group: Members
  • Posts: 856
  • Joined: 15-May 06

Posted 10 December 2009 - 05:16 AM

Excellent tutorial using GAP. Very straight forward and duplicatable!

Posted Image
Posted Image

My Sigs = My Photos
Check out my work at http://www.flickr.co...photomastergreg.
0

#3 User is offline   mikethedj4 

  • mikethedj4
  • PipPipPip
  • Group: Members
  • Posts: 1,083
  • Joined: 20-June 08
  • LocationRockford, IL

Posted 15 January 2010 - 06:51 PM

Posted Image

I personally think it's a lot easier doing this particular animation frame by frame, manually, but this ways much faster.
Posted Image
0

#4 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 18 January 2010 - 09:18 PM

I finally compiled GAP for my updated flavor of Linux yesterday and was able to try this tutorial. In the meantime I did mikethedj4's spinning pole tutorial which is a very nice tutorial for those who don't have GAP. Mike's tutorial is here.

This is a great tutorial and surprisingly easy. I took a little license with the settings and made the pole turn the other way; the light setting in map object turned the lime green yellow where the light spot was so I turned off the light.

This was fun to make. This is my first time using a plug-in in GAP and seeing them listed makes me want to try others with GAP.

Thanks for the cool tutorial ccbarr!

Posted Image

I think I'm dizzy ... the world is spinning ...
Posted Image
Posted Image
0

#5 User is offline   molly 

  • Member
  • PipPip
  • Group: Members
  • Posts: 647
  • Joined: 03-September 09

Posted 19 January 2010 - 01:48 PM

Very good as usual O...... cute idea matching the hair with the barbers pole.... :mrgreen:
Posted Image
Posted Image Click Me!
0

#6 User is offline   molly 

  • Member
  • PipPip
  • Group: Members
  • Posts: 647
  • Joined: 03-September 09

Posted 19 January 2010 - 07:27 PM

Here is mine.. I couldn't put it into a pic cuz of the white backgound...
Geeze ccbarr, you sure write a great tute. Every detail is there.

Posted Image
Posted Image
Posted Image Click Me!
0

#7 User is offline   ccbarr 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,701
  • Joined: 23-February 06

Posted 20 January 2010 - 05:28 AM

@PhotoMaster,

Thanks for trying the tutorial and glad you were able to follow it successfully to completion.

:)

@mikethedj4,

You are entitled to your opinion. It is good to have multiple methods for users to achieve the same results. That way, they can use the method that they prefer. Your method provides one such alternative.

Oregonian said:

I finally compiled GAP for my updated flavor of Linux yesterday and was able to try this tutorial. In the meantime I did mikethedj4's spinning pole tutorial which is a very nice tutorial for those who don't have GAP. Mike's tutorial is here.

This is a great tutorial and surprisingly easy. I took a little license with the settings and made the pole turn the other way; the light setting in map object turned the lime green yellow where the light spot was so I turned off the light.

This was fun to make. This is my first time using a plug-in in GAP and seeing them listed makes me want to try others with GAP.

Thanks for the cool tutorial ccbarr!

I think I'm dizzy ... the world is spinning ...


O,

Looks great.

Glad you are combining your "psychedelic phase" with my animation tutorial. I kind of think the two concepts go hand in hand. Just teasing you.

Seriously though, thank you for trying out the tutorial and glad you found it easy to follow. After I wrote it up, I realized that it was probably one of the easiest GAP-based tutorials to follow that I have written. Partly that is because it does not involve Move Path, which is the heart of GAP in my opinion.

molly said:

Here is mine.. I couldn't put it into a pic cuz of the white backgound...
Geeze ccbarr, you sure write a great tute. Every detail is there.


Hey molly, thank you as well for trying out the tutorial. I'm glad you were able to successfully follow the tutorial. Your result looks very good. Thanks again for trying it out.

Even with the white background, you could add caps to the top and bottom of the animation using saulgoode'scombine background script, which you already have from following the tutorial above.

If you are interested, here are some instructions to help you do that:

One thing that I would change in the above tutorial is to use a Y Position value of 0.50000 instead of the 0.60000 that was used in the tutorial. This will move your pole more towards the center of the screen, giving you more space on the top and bottom of the pole for adding caps.

After you have made your animation according to the tutorial, add a new transparent frame (layer) to the top of the layers.

Draw some caps on the top and bottom of the pole in that transparent layer.

Then move that layer all the way to the bottom of the layer stack. That makes it now the Background Layer (not necessarily in name, but in function)

Then from the image window select:

Filters | Animation | Overlay Background

This will overlay a copy of that bottom layer over each of the animation layers.

Then delete the bottom "background" layer.

You should now have an animated spinning pole with caps on each end.

Thanks again for trying out the tutorial.

:)
0

#8 User is offline   molly 

  • Member
  • PipPip
  • Group: Members
  • Posts: 647
  • Joined: 03-September 09

Posted 20 January 2010 - 12:12 PM

Thank you so much ccbarr, I will add that to my hard copy.

BTW, if I skipped the saulgoode part by adding the white background behind all the layers, would it still work and stay as a transparent pole so I could add it to something without the white square behind?? Hope I am not confusing you

Edit: this isn't a very clean cut out but I think I got it ccbarr.....

Posted Image
Posted Image
Posted Image Click Me!
0

#9 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 21 January 2010 - 01:40 AM

Molly, that's very nice. Nice holder for the pole.

When you are making the pole in Map Object, are you checking Transparent background?

Posted Image

molly said:

BTW, if I skipped the saulgoode part by adding the white background behind all the layers, would it still work and stay as a transparent pole so I could add it to something without the white square behind?
I didn't put a white background at all in mine.
Posted Image
Posted Image
0

#10 User is offline   ccbarr 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,701
  • Joined: 23-February 06

Posted 21 January 2010 - 06:50 AM

molly said:

Thank you so much ccbarr, I will add that to my hard copy.

BTW, if I skipped the saulgoode part by adding the white background behind all the layers, would it still work and stay as a transparent pole so I could add it to something without the white square behind?? Hope I am not confusing you

Edit: this isn't a very clean cut out but I think I got it ccbarr.....

Posted Image


molly,

Your result looks good and again, glad you were able to follow my instructions on that. Thanks for giving it a go.

Regarding your question about it being OK to skip the section of the tutorial about adding the white background beginning at step 16, yes that is OK. I used a white background to keep the tutorial simple to follow. It's good to see you asking questions wanting to take what you learned from the tutorial to use it more creatively.

:)

There are a couple approaches that you could take if you ended the tutorial right after doing step 15.. Here is one:

At that point, you might want to overlay anything you want to add over the spinning pole, like caps or whatever else you may have in mind, using the steps I mentioned to you previously for using Overlay background from saulgoode's script. Or you can save that to do at the very end once you add your background behind the spinning pole animation, as I will describe below.

You could then save it at this point as a native Gimp XCF file, something.xcf. I recommend this over saving it as a GIF animation at this point since the XCF file will retain more information, especially about the semi-transparent sections, than a GIF file will (GIF images lose all information about semi-transparency).

You could then open or paint an image that you want your spinning pole to be in. Then after you are finished with designing your background or opening your intended background image, you would select:

File | Open As Layers

and select the something.xcf that you saved your spinning pole as. That would open your spinning pole animation layers above your painted or image background layer.

You could then move the spinning pole layers to a certain spot in the background by clicking on the link icon in the Layer Dialog window for each of the spinning pole layers. To do that just click to the right of the eyeball icon for just one of the pole layers to activate the link icons while holding down the Shift key, so it's Shift+Click to link all layers at once.

Just make sure that you click on the link icon beside your background layer to unlink it from the spinning pole layers. You want the link turned off and not visible for your background image/design/scene.

Then select the top pole layer and using the Move Tool, move all the linked pole layers at once to the position that you want the spinning pole to be in the background image.

Then unlink all of the pole layers by again Shift+clicking on one of the layer link icons.

Finally, you can run:

Filters | Animation | Combine background

Just as in the tutorial, remember to remove your background image from the multilayered image once you do that.

And if you didn't overlay any designs over the spinning pole, like caps or other objects, previously like mentioned above, then you can do that at this point and run Overlay background using the steps I mentioned previously. Again, remove the bottom layer after running the script.

Then you can save it as an animated GIF as shown in Steps 21, 21a, 21b, 21c, and 21d.

And again, thanks for trying it out.

:)
0

#11 User is offline   molly 

  • Member
  • PipPip
  • Group: Members
  • Posts: 647
  • Joined: 03-September 09

Posted 03 February 2010 - 05:39 PM

Here is another one. This is so much fun... I was going to fix the paint chip on the stand but then it would look too new.....
Posted Image
Posted Image
Posted Image Click Me!
0

#12 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 03 February 2010 - 06:00 PM

*CLAPPING*

Molly that is way beyond cool. Very nice! :mrgreen:
Posted Image
Posted Image
0

#13 User is offline   molly 

  • Member
  • PipPip
  • Group: Members
  • Posts: 647
  • Joined: 03-September 09

Posted 03 February 2010 - 06:17 PM

:P thank you "O".... : :wink:
Posted Image
Posted Image Click Me!
0

#14 User is offline   2-ton 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,522
  • Joined: 30-September 08

Posted 05 February 2010 - 02:26 AM

Bravo, very creative!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic