Gimptalk - Premier Gimp Community: Simple Animated Shapes - Using Animated Path Stroke Script - Gimptalk - Premier Gimp Community

Jump to content

  • 5 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Simple Animated Shapes - Using Animated Path Stroke Script

#1 User is offline   fencepost 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,643
  • Joined: 01-March 05

Posted 28 January 2010 - 09:39 PM

In this tutorial, I will show you how create the following simple animations using my animated path stroke script, which can be found here>>>>>>: Fencepost's Path Suite.

The script was updated today (January 28, 2010), so if you had the previous version, please delete it first before installing the updated version. Open the zip file and save the .scm file to your GIMP scripts folder (ie...C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts). Refresh your scripts and you're ready to go.

You've can view some other animation possibilities and a brief discussion of other scripts contained within the path suite in this topic: Animated Path Stroking Topic

Posted ImagePosted Image

While the animations in this tutorial are simple examples of what can be accomplished with the script, the possibilities are great.

Let's Begin!

Step 1

Open a new image (200 X 200) with a white layer.
Add a second layer filled with white.

Posted Image

Step 2

Add some guides to your image to help with placement of the paths. This isn't absolutely necessary, but I did it for teaching purpose.

Go to Image > Guides > New Guides By Percent...

The following dialog will appear:

Posted Image

Add the following vertical guides (you'll have to add them one by one): 50%, 60%, 80%, and 90%.
Add the following horizontal guides: 10%, 20%, 40%, and 50%.

Your image should now resemble this:

Posted Image

Make sure that Show Guides and Snap to Guides are turned on:

Posted Image

Step 3

Select your Path Tool Button Posted Image

and click at the following locations. When you get to number 5 hold down the Ctrl key while clicking the mouse button to close the path. The order you place your points is the direction a path moves.

Posted Image

Step 4

Let's start our animation!

Activate your top layer by clicking on it in the layer dialog window:

Posted Image

In the brush dialog, select your brush and adjust the spacing as necessary. I chose the Circle Fuzzy (07) and set the spacing to 1.0

Posted Image

Right-click on the path we just created in the Paths Dialog window and choose Animated Path Stroking...

Posted Image

The following window will appear. I won't cover the all the options in the dialog window (only those we need to use); however, I encourage you to experiment with them later to see what the script can do.

For this animation, we will tell the script that we want to paint on 15 layers (since the second layer of the stack is active, it will start painting on this layer.) The script uses the current active paint tool (in this case the paintbrush) and the chosen brush.

Next, under Paint and Path Options we'll just tell it to paint the individual path segments, but don't add them to the image. If you needed them for later, you could add them, but we don't.

Posted Image

Hit OK.

The following animation should result:

Posted Image

Step 5

Next, let's rotate our path for petal #2. Double-click the rotate tool and click on the path button, as shown:

Posted Image

Now, click on the image with the rotate tool and enter the following information. Choose OK after you're done.

Posted Image

Step 6

With the path rotated, again activate the 2nd layer from the bottom in the layer stack (you should now have 16 layers):

Posted Image

Right-click on the path in the path dialog and run the Animated Path Stroking script again using the same settings as before.

Your outcome should look like this:

Posted Image

Step 7

Repeat steps 5 & 6, two more times and your animation should look like so:

Posted Image

Pretty simple, eh?!



Next, let's reverse a couple of the way the petals are drawn. As you may recall, the way a path is drawn is the direction it will be painted. For this animation, we'll use a couple of other scripts included in my path suite, to simplify things a little.

Step 1

Follow the steps above until you get your first animated petal:

Posted Image

Step 2

Add a reversed copy of the path to the image. We already know what direction the original path goes, but what if we didn't know? Right-click on the path in the path dialog and choose, Path Direction...

Posted Image

A dialog will appear, requesting which stroke are you wanting to find the direction of. A stroke is an individual path. A path may contain several individual strokes. However, since we only created on stroke in our path, so leave it at the default of 1. If you choose a stroke number that doesn't exist, the script will give you an error.

Posted Image

A new layer will be added to your image. It will show the direction of the path (green is the starting point and red the ending point.) The script will also tell you if the path is closed or not. Just because 2 ends of a path are right next to (or on top of) each other, does not mean it's closed. Your image should look like this:

Posted Image

To reverse the direction of a path, you can simply Right-Click on the path and choose Reverse Path Direction...

Posted Image

A dialog will appear requesting which stroke to reverse. Again, there's only one stroke, so click OK.

Posted Image

A new path will be added to the list.

Posted Image

Let's test it's direction (Right-Click on the new path and choose Path Direction...There's only one stroke in this path so leave it at 1 and click OK). A new layer will appear showing that it's been reversed. Remember green is the beginning and red the ending.

Posted Image

Compare it to the other one.

Now delete the two "direction layers" that were added. (Don't delete the reversed path, however.)

Step 3

Activate the 2nd layer from the bottom in the animation.

Step 4

Now, activate the original path in the paths dialog and rotate it 180 degrees using the same method described in Step 5 above.

Posted Image

Step 5

Run the Animated Path Stroking script using the same settings as before. You should now have this:

Posted Image

Step 6

Activate the 2nd layer from the bottom as shown before.

Step 7

Activate the reversed copy of the path and, using the rotate tool, rotate it 90 degrees.

Step 8

Run the Path Stroking script again using the same settings.

Step 9

Repeat Steps 6 - 8 one last time (using the reversed path rotated 180 degrees) and your final animation will look like so:

Posted Image

Well, I hope this tutorial has been informative and you learned about some new tools. Make sure you show me your results. Once you understand the techniques, try experimenting with your own paths.

Cheers!

Art
0

#2 User is offline   2-ton 

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

Posted 29 January 2010 - 02:21 AM

would this script work with text? ie, writing out a name in a fine line script, then make the text a path???
0

#3 User is offline   fencepost 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,643
  • Joined: 01-March 05

Posted 29 January 2010 - 03:09 AM

Absolutely. ccbarr posted a couple of examples here: -script-animated-path-stroking-path-suite-t46679.html
Additionally, you could create paths from fonts and do it that way as well, but there are some nuances using fonts. I'll prepare a tutorial on using fonts when I get the chance.
0

#4 User is offline   2-ton 

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

Posted 30 January 2010 - 02:29 AM

you are the master!
0

#5 User is offline   Silvertayl 

  • Member
  • PipPip
  • Group: Members
  • Posts: 361
  • Joined: 24-October 08
  • LocationSydney, Australia

Posted 18 February 2010 - 01:44 AM

I'm not sure this is right but here's my first try:

Posted Image
Posted Image
0

#6 User is offline   molly 

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

Posted 18 February 2010 - 01:02 PM

It looks awesome to me silvertayl.... :mrgreen:

FP. I tried doing test like what ccbarr did but when I use the bezier tool I can't seem to go from one letter to the next without the bezier going with it... Would I need to do each letter on a separate layer??? :?

Posted Image
This is what happened when I put each letter on a separate layer. I think I have screwed up royally...grrrr
Posted Image
Posted Image
Posted Image Click Me!
0

#7 User is offline   fencepost 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,643
  • Joined: 01-March 05

Posted 18 February 2010 - 01:46 PM

Looks like you all are getting a good handle on this! Nice work, silvertayl!

Molly, there's two approaches to creating a each path component. When working with this script, neither way is right or wrong because the script can utilize both of them, BUT there are some things you need to know. I'll address both.

First, you can create all of the individual path components (1 for each letter) in a single path (when you're finished, you'll only have one main path in the path dialog). Each individual component is referred to as a "stroke" (I personally don't like the term stroke because it's used in a couple of different ways within GIMP, but I'm sure there's a good reason behind this terminology). To create individual strokes (components) within a single main path is really easy. When you get to the end of your first component (like on the "M"), hold down your shift key and click at the beginning of the new component (place your first point where you want the path to start drawing from). Then, release the shift key and continue adding points in direction you want it to draw. When you're done with that component, repeat the process until finished.

Now, here's the key to painting. When you're finished with adding all of the strokes as described above, you will have 5 strokes within 1 main path. To paint, at the very top of the script dialog, it will ask you which stroke you want to paint, you have 5 to choose from. Pick any one of them. You're not limited to numerical order. Then run the script and repeat. If you tell the script to use a stroke that's not there, the script will tell you it doesn't exist.

Second, you can create create a separate path for each letter of your name. To do this, create your first path and, when finished, click on the New Path button at the bottom of the paths dialog and create the next path. And so on. Because there is only one component or stroke per path (using this method), when it comes time to paint them, right-click on the path in the path dialog you wish to paint and when the script dialog asks for which stroke you wish to paint, you leave it set at 1.

Does that make sense?
0

#8 User is offline   molly 

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

Posted 18 February 2010 - 05:54 PM

Yes I think it does. thank you so much FP... I didn't realize about the shift key. stupid huh. I will try it later and post if it turns out....
You are an Angel :wink:
Posted Image
Posted Image Click Me!
0

#9 User is offline   fencepost 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,643
  • Joined: 01-March 05

Posted 18 February 2010 - 09:31 PM

Any ideas how I might have done this one?

Posted Image
0

#10 User is offline   molly 

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

Posted 18 February 2010 - 09:41 PM

Hell no :mrgreen:
Posted Image
Posted Image Click Me!
0

#11 User is offline   Silvertayl 

  • Member
  • PipPip
  • Group: Members
  • Posts: 361
  • Joined: 24-October 08
  • LocationSydney, Australia

Posted 18 February 2010 - 10:50 PM

fencepost said:

Any ideas how I might have done this one?

Posted Image


I'll give it a go :!:

You made your original twirly flower on one layer using steps 1 through 7 as a guide :?: Then you rotated and reversed the path as in the second part steps 1 through 9 :?: maybe :?: Am I anywhere near close :?:
Posted Image
0

#12 User is offline   fencepost 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,643
  • Joined: 01-March 05

Posted 18 February 2010 - 11:15 PM

Nope. :P

I created a path that looks similar to this.

Posted Image

Ran the script. Rotated the path 15 degrees and ran the script again. I kept doing that until the path rotated a full 360 degrees. Although it looks like the path reverses itself, it's just actually completing the stroke! Simple, eh?
0

#13 User is offline   Silvertayl 

  • Member
  • PipPip
  • Group: Members
  • Posts: 361
  • Joined: 24-October 08
  • LocationSydney, Australia

Posted 18 February 2010 - 11:34 PM

fencepost said:

Nope. :P

I created a path that looks similar to this.

Posted Image

Ran the script. Rotated the path 15 degrees and ran the script again. I kept doing that until the path rotated a full 360 degrees. Although it looks like the path reverses itself, it's just actually completing the stroke! Simple, eh?


Oh well it was worth a shot, I'm gonna give it a go and post my result. :oops:
Posted Image
0

#14 User is offline   molly 

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

Posted 19 February 2010 - 12:09 AM

Looks too hard to me.....
Posted Image
Posted Image Click Me!
0

#15 User is offline   fencepost 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,643
  • Joined: 01-March 05

Posted 19 February 2010 - 02:10 AM

molly said:

Looks too hard to me.....


It's not, Molly. Really. You know how to draw with the paths tool. The tutorial described how to rotate a path. And, you already know how to animate with the script, right? One path, multiple runs of the script and the rotation tool. You can do EET!

Posted Image
0

#16 User is offline   molly 

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

Posted 19 February 2010 - 12:18 PM

yeh I can do eeet alright but it doesn't look anything like yours. :x
Posted Image
Posted Image
Posted Image Click Me!
0

#17 User is offline   molly 

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

Posted 19 February 2010 - 01:10 PM

fencepost said:

Looks like you all are getting a good handle on this! Nice work, silvertayl!

Molly, there's two approaches to creating a each path component. When working with this script, neither way is right or wrong because the script can utilize both of them, BUT there are some things you need to know. I'll address both.

First, you can create all of the individual path components (1 for each letter) in a single path (when you're finished, you'll only have one main path in the path dialog). Each individual component is referred to as a "stroke" (I personally don't like the term stroke because it's used in a couple of different ways within GIMP, but I'm sure there's a good reason behind this terminology). To create individual strokes (components) within a single main path is really easy. When you get to the end of your first component (like on the "M"), hold down your shift key and click at the beginning of the new component (place your first point where you want the path to start drawing from). Then, release the shift key and continue adding points in direction you want it to draw. When you're done with that component, repeat the process until finished.

Now, here's the key to painting. When you're finished with adding all of the strokes as described above, you will have 5 strokes within 1 main path. To paint, at the very top of the script dialog, it will ask you which stroke you want to paint, you have 5 to choose from. Pick any one of them. You're not limited to numerical order. Then run the script and repeat. If you tell the script to use a stroke that's not there, the script will tell you it doesn't exist.

Second, you can create create a separate path for each letter of your name. To do this, create your first path and, when finished, click on the New Path button at the bottom of the paths dialog and create the next path. And so on. Because there is only one component or stroke per path (using this method), when it comes time to paint them, right-click on the path in the path dialog you wish to paint and when the script dialog asks for which stroke you wish to paint, you leave it set at 1.

Does that make sense?

Hey, I did it..... Woo Hoo..... thanx FP :mrgreen:
(Not very good at making circles with bezier though)grrrr
Posted Image
Posted Image
Posted Image Click Me!
0

#18 User is offline   fencepost 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,643
  • Joined: 01-March 05

Posted 19 February 2010 - 01:40 PM

Looking great, Molly! Thanks for giving it a whirl. Your first animation is really neat. The reason is doesn't look like mine is each time you run the script, you need to set the first (bottom) layer as the active layer. What happened is you animated your first path, then started on the top layer each time after it was done. So it drew one, then the next, the next, and so on. If you set the bottom layer active each time before you run the script, it will appear like they are all being drawn at the same time.

Check out my tutorial on paths to see how to create smooth lines: viewtopic.php?t=602
0

#19 User is offline   molly 

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

Posted 19 February 2010 - 02:22 PM

Thanks for the tip FP... I will give it a whirl-in-a-while. :mrgreen:
Posted Image
Posted Image Click Me!
0

#20 User is offline   Oregonian 

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

Posted 19 February 2010 - 06:26 PM

Did you use two paths and draw one the opposite direction to do yours, fencepost? Mine doesn't look a bit like yours.

Posted Image
Posted Image
Posted Image
0

Share this topic:


  • 5 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic