It is currently 06 Jul 2020, 11:21

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Paint Paths in Steps Plug-in

Share your Python Fu Scripts/plug-ins for GIMP here
tim
GL Blogger

Paint Paths in Steps Plug-in

Post#1 by tim » 04 Jun 2019, 16:40


Requested by Wallace in "Writing Text?".
paint_paths_in_steps.py
(3.51 KiB) Downloaded 119 times
paint_paths_in_steps.py
version 2. A little slower but follows path to pixel accuracy (even for low number of frames).
(4.07 KiB) Downloaded 95 times
paint_paths_in_steps.py
version 3. Drop Shadow option added.
(4.61 KiB) Downloaded 95 times
paint_paths_in_steps.py
version 4. Allows user to say YES to draw hand, then select other inputs (See instruction for version 4)
(6.09 KiB) Downloaded 69 times
paint_paths_in_steps.py
version 5. Allows user to say YES to painting existing mask and choose a layer that has that mask in order to reveal the art underneath so it looks like it's coloring or doing finished art.
(6.51 KiB) Downloaded 78 times
paint_paths_in_steps.py
version 6. Only create frame without hand at the very end frame (not when there's still paths to draw so hand doesn't disappear in middle of animation)
(6.96 KiB) Downloaded 71 times
paint_paths_in_steps.py
version 7. Options to add animation of transitioning IN (from outside of whiteboard), BETWEEN shapes, and OUT (of whiteboard at the end).
(11.65 KiB) Downloaded 78 times
paint_paths_in_steps.py
version 8. Fixed bug for when user choose drop Shadow.
(12.18 KiB) Downloaded 122 times
Plug-in Menu Location: Python-Fu/Paint Paths in Steps...

Instructions:
  1. Have an image opened as background, and a single active path (can be multi-stroke path) that you'd like to paint steps.
  2. Run plug-in, change number of frames (estimated), then OK to run.
  3. It'll run and use the active brush to paint in steps your path and at each step it'll output the visible to a layer on a new image so that you'll end up with an animation image.
  4. That's it. Have fun.
    Note: If you want to do a dot like the dots for i's and j's you'll have to make 2 points really close together (because 1 single point has no length so can't be painted).
Instructions (version 4):
  1. Have an image with background, and a single ACTIVE layer that you want to paint paths (with current brush).
  2. Open as layer an image of a hand (you can use sample hand .xcf file below).
    hand holding pen to be used as handlayer.
    hand holding pen to be used as handlayer.
    hand-holding-pen.png (32.7 KiB) Viewed 4304 times
  3. Draw a separate vector however you want to define the pen's location as long as the starting point is where the pen tip is and name it something like "penvector" so you can select it in step 5
  4. Select the Path from step 1 to make it ACTIVE.
  5. Run plug-in, answer yes to "Draw hand", choose hand layer, choose "Pen Vector" vector, and other options when ready, click OK to run.
  6. That's it animation will be created on new image.
  7. Enjoy.
  8. Optionally you can load this .xcf to see how things are defined:
    paint-paths-in-steps-sample.xcf
    (50.65 KiB) Downloaded 91 times
  9. That's it.
  10. Enjoy.
Instructions (version 5):
  1. Like version 4, except you can choose to say YES to paint over existing mask which belongs to a layer that is covering
    your art.
  2. And the active path will be a path that you'll like to paint on the Mask (with black) to reveal art underneath
  3. Here's a sample .xcf so you can see how it's made.
    paint-paths-in-steps-sample-3.xcf
    (85.23 KiB) Downloaded 105 times
    Example result:
    100 frame at 50 milliseconds/frame
    100 frame at 50 milliseconds/frame
    paint-paths-in-steps-plug-in-jilly.gif (205.32 KiB) Viewed 4637 times
    200 frame at 20 miliseconds/frame
    200 frame at 20 miliseconds/frame
    paint-paths-in-steps-plug-in-jilly-200-frames.gif (408.3 KiB) Viewed 4632 times
    version 3 with drop shadow
    version 3 with drop shadow
    paint-paths-in-steps-plug-in-jilly-with-shadow.gif (135.92 KiB) Viewed 4500 times
    Example result (version 4):
    paint-paths-in-steps-sample-result-2.gif
    paint-paths-in-steps-sample-result-2.gif (474.17 KiB) Viewed 4304 times
    paint-paths-in-steps-sample-result.gif
    paint-paths-in-steps-sample-result.gif (334.45 KiB) Viewed 4304 times
    Example result (version 5):
    paint-paths-in-steps-sample-result-3.gif
    paint-paths-in-steps-sample-result-3.gif (526.75 KiB) Viewed 4296 times
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
2

Wallace
Global Moderator

Post#2 by Wallace » 04 Jun 2019, 17:21


Thanks Tim. :2_Thumbs:
I'll give it a go.
Image
1

Wallace
Global Moderator

Post#3 by Wallace » 04 Jun 2019, 18:56


It works good, for a single word, with a single continuous path.
How would I create a phrase, with 7 or more separate words in it?
Image
0

tim
GL Blogger

Post#4 by tim » 04 Jun 2019, 19:47


Hold shift click (while on the path tool) to start a new stroke but on the same vector.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
1

Wallace
Global Moderator

Post#5 by Wallace » 04 Jun 2019, 19:50


This is the text that was put out from the path I made.
GL.gif
GL.gif (223.16 KiB) Viewed 4595 times
The strokes are not following the paths.
Here's what the paths look like.
Screenshot (969).png
Screenshot (969).png (109.55 KiB) Viewed 4595 times
I don't understand, why the strokes are so far from what the path is.
The strokes look nothing like what the paths are.
Image
0

PhotoMaster
Global Moderator

Post#6 by PhotoMaster » 04 Jun 2019, 21:26


I'm looking at Wallace's screen shot and wondering if increasing the number of points in the path helps? Can't test it myself but I will try again to get Gimp working.
Artists Aren't Crazy...
We're Eccentric!
2

tim
GL Blogger

Post#7 by tim » 04 Jun 2019, 21:57


Wallace, I took your screen-shot and traced over your "GIMP LEARN" writing
with how i want it to write.
But when i start a new stroke (shift click), if there's already a stroke point there, I would shift click somewhere blank to start it then click and drag the point into position where i want it then continue to draw each stroke.
And it seemed to have done it exactly as I traced it (no problem of out of order as you have observed), so I am not sure why it didn't follow the order that you've drawn (You didn't draw a continuous path and then use delete/edit after the fact did you, that might confuse it with the order I would guess).
paint-paths-in-steps-plug-in-gimp-learn-wallace.gif
paint-paths-in-steps-plug-in-gimp-learn-wallace.gif (720.53 KiB) Viewed 4578 times
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0

tim
GL Blogger

Post#8 by tim » 04 Jun 2019, 22:05


oh never mind, I misunderstood you.
Yeah it's not following the path because it takes the total path length divided by number frames and get points from those division.
So if you want it to follow the path closer, you'll have to increase the number of frames and then animate it faster speed (or delete un-needed frames).
So you don't need to increase number of path points but you do need to increase number of frames (input) when you run script.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
1

tim
GL Blogger

Post#9 by tim » 04 Jun 2019, 22:39


Or you can use the version 2 of plug-in which follows the path to pixel accuracy even when you choose a low number of frames (a little slower, though).
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
1

Wallace
Global Moderator

Post#10 by Wallace » 04 Jun 2019, 22:41


tim wrote:
04 Jun 2019, 22:05
oh never mind, I misunderstood you.
Yeah it's not following the path because it takes the total path length divided by number frames and get points from those division.
So if you want it to follow the path closer, you'll have to increase the number of frames and then animate it faster speed (or delete un-needed frames).
So you don't need to increase number of path points but you do need to increase number of frames (input) when you run script.
I get it.
The concept is simple, but the execution is complicated.
tim wrote:
04 Jun 2019, 22:39
Or you can use the version 2 of plug-in which follows the path to pixel accuracy even when you choose a low number of frames (a little slower, though).
Alright, I'll try it.
Image
1


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 10 guests