Gimptalk - Premier Gimp Community: Animated Painting - Using Animated Path Stroking Script - Gimptalk - Premier Gimp Community

Jump to content

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

Animated Painting - Using Animated Path Stroking Script

#1 User is offline   fencepost 

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

Posted 03 March 2010 - 03:08 PM

In this tutorial, I will show you how to animate painting or coloring using my animated path stroke script, which can be found here>>>>>>: Fencepost's Path Suite.

Here's what I'll show you how to do in this tutorial:

Posted Image

In a later lesson, I'll describe how to select portions of contiguous areas so that they can be colored separately.

This tutorial requires a general understanding of basic GIMP concepts: adding layers, text, selecting brushes, creating paths, etc. I provide lots of details/screenshots, but won't be covering every little specific. GIMP version 2.6.6 is being used for this tutorial.

Let's begin!

Step 1

Create or open a new image with the desired background. Duplicate the background and add some text or an object you'd like to paint. Here's what my image looks like:

Posted Image

and my layers:

Posted Image

Step 2

With one of your selection tools (i.e. magic wand, path tool, select by color, etc.), select the area you wish to paint. Since I will be painting some text, and the area around my text is transparent, I can simply right-click on the text layer and choose Alpha to Selection:

Posted Image

and all of my text is now selected. I've highlighted the selected area in red in the screenshot below. Yours won't be red.

Posted Image

Keep the selection active until told to deactivate.

Step 3

Next, we need to create a path to paint across. Select your Path Tool Button Posted Image and begin adding points until your selected area is covered by a path. You don't have to make the spacing between the lines too close as you can choose a larger brush. Additionally, don't make your path too long as it could cause the script to not work (more about that in a moment). Here's what my path looks like. I started at the green dot and ended at the red dot (you won't have a green or red dot - if you wonder why I explain that....I've been asked on numerous occasions in other tutorials where the dots are!!!)

The order you place your points is the direction a path moves.

Posted Image

Step 4

A moment ago I stated that you don't want your path to be too long or the script won't work. I intentionally designed the script like that because of speed issues. However, for most smaller images, we don't have anything to worry about. But, I've added a script to help you know whether you've passed that point. In the paths dialog right-click on the path you just created and choose Path Details...

Posted Image

A dialog will appear requesting which "stroke" to get information about:

Posted Image

Since you've probably only created one individual path segment, you'll only have 1 stroke. (If you run into problems here, post a comment and I'll provide assistance.) A message window will pop up and provide you some basic information about the path. If highlighted statement below matches yours, no worries. Proceed. If the message says your path is too long, you'll either need to shorten your path or split it into segments. I won't be covering the details of splitting up paths nor will I be explaining how to paint more than one path. I have other path stroking tutorials that cover those details.

Posted Image

Step 5

With our selection still active and the path drawn & path length verified, it's time to begin painting. There's really no need for our text/object layer at this point. You can delete it or drag it to the bottom of the layer stack where's it out of the way and make the duplicate of the background layer active. Here's what my layer dialog now looks like:

Posted Image

Step 6

Let's pick a brush to paint with. Pick one that's wide enough to fill in the spaces, but don't pick a great big brush (that will really slow the script down). I'm using Galaxy (AP). Experiment.

Posted Image

Also, I'm setting my brush spacing (the slider at the bottom of the brush dialog to 1). Set yours to whatever you want. You can always undo/redo if you don't like it. Try experimenting with setting the brush mode/opacity as well.

Posted Image

Step 7

Now, with your selection still active (your selection is still active, right?!), go back to the paths dialog and right-click on your path. This time, choose Animated Path Stroking...

Posted Image

In the dialog that appears, the following highlighted parameters are the ones we're most interested in:

Posted Image

* As we previously discussed, you probably only have 1 stroke, so leave the top parameter at 1. (If you get an error and can't figure it out, post a comment and I'll walk you through it).
* Choose the number of frames you want to paint in. For this exercise, I picked 15. It's your animation, you choose!
* Unless you're planning on doing some additional work with the individual path segments that are created by the script, choose Paint Paths - Don't add path segments to image.
* Under Color Method choose Solid Color or Gradient (If you want to use a gradient, make sure you set a gradient length below. For this exercise, I'm painting with a solid color.)
* Set the foreground color
* If painting with a gradient, pick the desired gradient. If your gradient choice is one of the FG-BG options, make sure you pick the background color in the color swatch above this option.
* Set the gradient length (only necessary if painting with a gradient).

Click OK and the script will do the rest. After the script is finished running, go to Filters > Animation > Playback to see your animation in action. If you don't like what you see, go to Edit > Undo (Ctrl+Z) and fix what you don't like and try again. If you like what you see, deactivate your selection (Select > None) and save as an animated gif (File > Save or File > Save As...)

Here's my result again, with the animation timing of the first and last frames adjusted to a 1 second (1000 ms) delay.

Posted Image

and here's one I painted with a gradient:

Posted Image

Well, I hope this tutorial has been informative and you learned about some new tools. In a later lesson, I'll describe how to select portions of contiguous areas so that they can be colored separately. Make sure you show me your results.

Cheers!

Art

This post has been edited by fencepost: 29 January 2014 - 02:40 AM

0

#2 User is offline   2-ton 

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

Posted 03 March 2010 - 04:07 PM

Great instructions, I actually managed this on the first try!
I do need to work on how to get the speed right, brush size right, path sized right, etc. Also, what would be the way to do the painting, followed by erasing, painting, erasing, etc.?
This is a bit rough, but hopefully practice will bring improvement. Urm, and I forgot how to make the first and last frames a different speed :oops:
Posted Image

*figured out how to do two colors one after the other, but can't do an erase because I was using a transparent background...I assume you can do an erase if you use an opaque background.
Posted Image
0

#3 User is offline   Oregonian 

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

Posted 03 March 2010 - 04:24 PM

That's fun!

Posted Image
Posted Image
Posted Image
0

#4 User is offline   fencepost 

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

Posted 03 March 2010 - 04:28 PM

2-ton said:

Great instructions, I actually managed this on the first try!

Thanks. Glad they were easy to understand.

Quote

I do need to work on how to get the speed right, brush size right, path sized right, etc.

Yeah, that all takes practice.

Quote

Also, what would be the way to do the painting, followed by erasing, painting, erasing, etc.?

Depends on what effect you're after, but you can use the paint tool and the eraser with the script. Do you have something specific in mind? Here's something that I did to using alternating eraser/painting....gives it a chase effet:

Posted Image

Quote

This is a bit rough, but hopefully practice will bring improvement. Urm, and I forgot how to make the first and last frames a different speed :oops:
Posted Image


Looks good! To set the frame speed, double-click the layer name, change the ms to whatever you want, then make sure you click the Enter key to make the change "stick".

Anyone have thoughts on how I accomplished this (Click the thumbnail image below to see animation)? Could be done more than one way?

Posted Image
0

#5 User is offline   fencepost 

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

Posted 03 March 2010 - 04:30 PM

Oregonian said:

That's fun!

Posted Image


Nice work, O!
0

#6 User is offline   2-ton 

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

Posted 03 March 2010 - 05:08 PM

Quote

Depends on what effect you're after, but you can use the paint tool and the eraser with the script. Do you have something specific in mind?

I was thinking of the same effect as the painting of the letters via the script, then erasing the letters in the same way, just like my second example but instead of the bright blue being painted, the color (gradient in this case) would be erased.
I have no idea how you can paint with desaturation effect, that is really cool.
0

#7 User is offline   fencepost 

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

Posted 03 March 2010 - 05:16 PM

2-ton said:

Quote

Depends on what effect you're after, but you can use the paint tool and the eraser with the script. Do you have something specific in mind?

I was thinking of the same effect as the painting of the letters via the script, then erasing the letters in the same way, just like my second example but instead of the bright blue being painted, the color (gradient in this case) would be erased.


The erase should have worked, but I'll experiment with that a bit and let you know.

Quote

I have no idea how you can paint with desaturation effect, that is really cool.


When you go into your brush dialog, change the brush mode to Saturation (or whatever mode you want). You can also modify the opacity settings.
0

#8 User is offline   Oregonian 

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

Posted 03 March 2010 - 09:58 PM

fencepost said:

Nice work, O!
Thanks! Pondering how to do a kind of, "Beam me up, Scotty," thing with a flying saucer and astronaut. Still pondering. Posted Image
Posted Image
Posted Image
0

#9 User is offline   2-ton 

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

Posted 04 March 2010 - 08:17 PM

Double clicked on layer name to change speed on a layer...no mms in the name. Now what? I know I've seen the speeds on my layers in the past, but don't remember under what circumstances. Do you have to save as animation first?

*nvr mnd...that would be a yes.
0

#10 User is offline   Oregonian 

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

Posted 04 March 2010 - 08:38 PM

Do you have Filters > Animation > Settings? If you don't I recommend you get it. You can specify the speed and type (Replace for yours) on the visible layers. For yours you would want to change the speed of the top layer to something like 1500 for the ms. You can change the settings while Playback is running to get an instant update on the speed.

Right-click the link and save to your gimp/scripts folder. http://flashingtwelv...im-settings.scm
Posted Image
Posted Image
0

#11 User is offline   2-ton 

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

Posted 04 March 2010 - 08:50 PM

I do have the settings...but it only shows the one choice for all frames. So I saved as animated gif, closed and reopened, and the layer names showed the speed settings.
******O, yeah, I see if you use the settings, then click ok, you get the speeds listed on the layers names. yay.
0

#12 User is offline   Oregonian 

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

Posted 04 March 2010 - 08:54 PM

2-ton said:

I do have the settings...but it only shows the one choice for all frames. So I saved as animated gif, closed and reopened, and the layer names showed the speed settings. yay.
You need to manually change the setting. Double-click the layer so that the name is highlighted, click in the name so it's not highlighted, change the setting speed manually, press Enter to have it "take."
Posted Image
Posted Image
0

#13 User is offline   2-ton 

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

Posted 04 March 2010 - 09:34 PM

Posted Image
so...I have set the times in a couple places. But I would like to use something besides the galaxy brush. I tried both a hard and a soft brush, sized about the same as the galaxy one, but they don't work right...they leave grey areas. Do I just need to make them even larger? How large in proportion to the path?
ps...not erased, just repainted with background color.
0

#14 User is offline   fencepost 

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

Posted 05 March 2010 - 03:46 AM

2-ton said:

But I would like to use something besides the galaxy brush. I tried both a hard and a soft brush, sized about the same as the galaxy one, but they don't work right...they leave grey areas. Do I just need to make them even larger? How large in proportion to the path?


What I suggest is that when you pick a brush, hover over the path in the image window with your mouse and you should be able to see the outline of the brush. If it looks like it will cover the path and the spaces in-between try it out. It's really about experimentation; no hard and fast rules. I suggest you create an editable brush that you can adjust the shape, hardness, size, spacing, etc. It won't be fancy, but you may not need anything fancy. That way, if it's not big enough, you can double-click on the brush and edit its parameters. Don't know if this helps.
0

#15 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 05 March 2010 - 06:40 PM

I may get a similar effect but symmetric ?

as symmetrically fill (or erase) the FP you used in your example ,starting simultaneously from the upper left corner of "F" and from the bottom right of P ?

EDIT
(actually a letter as P has not a proper "right bottom corner" , with "R" would be more clear but i am sure you get it ! :) )
0

#16 User is offline   fencepost 

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

Posted 05 March 2010 - 07:21 PM

It is possible, but there's a "competing interest" taking place. Here's an example:

Posted Image

I added a simple pattern to the very bottom layer. Then I had my white layer above it with the "FP" selected. I drew one path and then used my "Reverse Path" script to make an exact duplicate, but it reverses the drawing order of the points. On the reversed path, I used the eraser (bottom corner by the "P") and erased the black showing the green behind it. Then, on the original path, beginning again on the white layer, I used the paintbrush with a gradient. What happens is that the paintbrush covers over what's been erased, because it was last operation I performed. I could have reversed what I did, starting with the paintbrush and following up a second time with the eraser and the eraser would have "won". I could have adjusted the opacity/blend mode of my brushes so that both showed through. That would work. Does that make sense?
0

#17 User is offline   PhotoComix 

  • GT Senior Moderator
  • Group: Senior Moderators
  • Posts: 11,288
  • Joined: 13-June 05

Posted 05 March 2010 - 07:24 PM

yes perfectly , thank you
0

#18 User is offline   Trambo18 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 05-March 10

Posted 05 March 2010 - 08:42 PM

Posted Image Thx for the Tutorial!
0

#19 User is offline   fencepost 

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

Posted 05 March 2010 - 09:07 PM

Nice work! Thanks for trying it out.

Art
0

#20 User is offline   2-ton 

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

Posted 06 March 2010 - 03:04 PM

I"m still having a time with brush size. I made a background 700 wide by 100 high. The path's anchor points were fairly close. I chose a hard round brush that was so big, the edges were off the background. I still ended up with unpainted streaks. The galaxy brush, even when smaller, works. :?:
0

Share this topic:


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