It is currently 21 Jan 2018, 06:28

GIMP Python Fu ScriptsFan Illusion 3 Script (Showcase | Slideshow)

Share your Python Fu scripts for GIMP here
User avatar
animicule

Script Coder
View: Showcase | Slideshow
Topic Posts: 7/16
Posts: 601
Joined: 10 Jan 2017, 07:25
Cash on hand: 738.85 GLP
Bank: 45,987.00 GLP
Gender: Guy
Location: South Dakota
Operating System: Windows
GIMP Version: 2.9.5
x 168
United States of America

Fan Illusion 3 Script

Post#1 by animicule » 09 Sep 2017, 10:13


=== === === === === === === === === === === === === ===
This version will save layers for GIF creation !!!
=== === === === === === === === === === === === === ===
Here is an explanation of the options and a few general tips
for Fan Illusion v3f4
=== === === === === === === === === === === === === ===
=== === === === === === === === === === === === === ===
This version allows saving layers to help with creation of
circular motions in animated gifs.
=== === === === === === === === === === === === === ===
This guide / explanation will start at the top of the script's
dialog box and move line by line to the bottom.
=== === === === === === === === === === === === === ===
=== === === === === === === === === === === === === ===
Cleanup Subject Transparency:
=== === === === === === === === === === === === === ===
Most isolated images, or images which have had any
transformation operations performed on them have some
slight feathering in the outer edge pixels.
This option will perform alpha to selection, select-invert
and cut from 0 to 500 times (yes 500 is excessive).
If you are creating an excessive amount of layers on a subject,
try it once without excessive cleanup, then try it again with
excessive cleanup. On some, but not all images, I have noticed
a very nice effect after using the cleanup with improved color
and sharper definition.
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
If you use the excessive cleanup and you still see some slight
discoloration in the area at the point where the subject stops rotating,
double check your subject image at maximum zoom and you will
probably find some faint pixels which need to be removed manually.
Some pixels are too strong to remove with the cuts, but not strong
enough to be easily seen. To bring these areas out you can
add a white layer below the subject layer to make any dark areas
stand out, then make the white layer black and check for any
light areas where you should have transparency.
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
On the other hand, if you want a less sharp and clear outcome,
you could 'seed' your subject image with very nearly transparent
areas, an easy way would be fill a layer with a color and set the
opacity very low.
=== === === === === === === === === === === === === ===
Number of rotations:
=== === === === === === === === === === === === === ===
You may choose 0.01 to 5.10 rotations.
0.01 will give you a one layer output.
Your selection is rounded up to the next whole slice.
Multiple rotations are not too interesting unless you are adding
some of the other options, like moving pivot point, scaling,
or cropping pixels from the subject.
=== === === === === === === === === === === === === ===
Number of Slices:
=== === === === === === === === === === === === === ===
from 2 slices to 5760 slices (per rotation).
Select from a list, which is in #layers @ degrees per slice format.
The smaller the slice angle, the more layers.
To keep the script running as quickly as possible, there is
a maximum number of layers that you may save in the stack.
More on that later in the Keep Layers option explanation.
When you use very small slice angles you will receive a
very smooth looking outcome, but it does take more time to
process. While these outcomes are good for backgrounds in
an animated gif, they do not make a very interesting animation,
and the file size of a gif with 1,000 layers or more is quite large.
Layer counts over 399 will be merged to keep the script generating
layers at a rapid pace, and will not be saved as a layer stack, but
as a single outcome layer. -- It is better this way.
As far as I can tell, most people like the outcomes from lower
slice counts any way, as they have more details as compared
to the smooth look of the extreme layer outcomes.
=== === === === === === === === === === === === === ===
Reverse Slice Direction:
=== === === === === === === === === === === === === ===
The default, No, gives you a clockwise slice rotation.
Yes will give you a counter clockwise slice rotation.
You will often find a striking difference between the
two outcomes depending on your subject. I recommend
trying both directions for every subject.
=== === === === === === === === === === === === === ===
Coordinate or Bounds Option:
=== === === === === === === === === === === === === ===
If you choose, the script will crop the subject and get
the resulting bounds of the cropped subject selection.
You may choose from the center of the bounding box
where the subject will rotate around itself, or one of
the corners of the bounding box (usually more interesting).
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
If you would like to select your own pivot point,
move your mouse to the point you would like to
have the subject rotated around (the pivot point)
and look in the bottom left corner of the active image
(just below and to the right of the Quick Mask icon)
and Gimp shows you the X,Y coordinates of the point your
mouse is pointing to. the enter your selection in the script's
dialog box with the title 'Enter Pivot Coordinates X,Y'
Be sure that the x and y numbers are delimited with a ',' comma.
Then make certain your option is set to Use Pivot Coordinates,
The x coordinate is on the horizontal (left, right).
The y coordinate is on the vertical (up/down).
The coordinate notation used is formatted as x,y
(horizontal point, then the vertical point).
Again, the X coordinate is to the left, and the Y is to the right
and make certain there is a comma between them.
The pivot coordinates will be the center of the
subject rotation which doesn't mean that it needs to be
the center of the subject or even on the subject, unless
that is what you want. If it helps, think of yourself
as the pivot point and you hold a rope attached to the
subject and are going to swing the subject around yourself
in a circle. Experiment and observe and you will be able
to get a feel of the general rotation motion around different
pivots!
=== === === === === === === === === === === === === ===
Motion per Slice
This is a bit harder to see until you have experimented for a while.
The pivot point will move a bit in either or both directions for
each slice. It will work with a single rotation or multiple rotations.
=== === === === === === === === === === === === === ===
X center: Motion Per Slice:
=== === === === === === === === === === === === === ===
You may enter decimals or whole numbers.
This option will allow the pivot point on the X axis
to move a selected amount each slice. A positive number
will move the pivot to the right Horizontally (on the x axis).
A negative number will move the pivot to the Left.
Currently the range of horizontal motion per slice is -50.00 to 50.00
=== === === === === === === === === === === === === ===
Y center: Motion Per Slice:
=== === === === === === === === === === === === === ===
You may enter decimals or whole numbers.
This option will allow the pivot point on the Y axis
to move a selected amount each slice. A positive number
will move the pivot down vertically (on the Y axis).
A negative number will move the pivot upwards.
Currently the range of vertical motion per slice is -50.00 to 50.00
=== === === === === === === === === === === === === ===
Scale Direction or None:
=== === === === === === === === === === === === === ===
You may scale the subject on each slice or not.
If you choose not to scale, choose No Scale.
If No Scale is chosen, it matters not what
is entered in the Scale Maximum or Scale Minimum limits.
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
If you chose to scale the subject while slicing it,
Select Scale Up or Scale Down.
Now enter the scale maximum and minimum amounts.
100% scale = Original size of the subject
300% scale = 3x the original size
.03% scale = 3% of the original size.
The script will calculate the total number
of pixels in the range from maximum scale to the
minimum scale and divide that range equally in pixels
throughout the number of slices multiplied by the number
of rotations.
You can use the scaling to make an animated gif look as
if it is moving closer or further away from you.
It roughly simulates motion on the Z-axis.
=== === === === === === === === === === === === === ===
Progressive Narrow and Progressive Shorten options:
=== === === === === === === === === === === === === ===
Scale over rides Progressive Narrow and Progressive Shorten.
If both are chosen, only the scale will function.
If No Scale is chosen, Progressive Narrow and/or
Progressive Shorten will function.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
To use Progressive Narrow and/or Progressive Shorten
Enter the amount in pixels you would like
to crop from the subject at each slice.
You may select bother or either one by itself.
You will receive a warning from the script
if the amount you choose is greater then the width or
height of the subject.
It is a one way option (trim only) it will not
add pixels to the subject.
If you reverse the layer stack after it's creation,
it will appear to widen and heighten.
=== === === === === === === === === === === === === ===
Keep Layers for Gif if < 400
=== === === === === === === === === === === === === ===
To keep the speed of the script high,
it will merge the layers when 400 count
is reached, and each 200 count thereafter
until the script has completed.
Again, it is unrealistic to have thousands of
frames in an animated gif outcome.
=== === === === === === === === === === === === === ===
Layer Name Prefix:
=== === === === === === === === === === === === === ===
If you are building a gif, you may want
to use frames from several different
layer stacks. Using different prefixes is
a good way to help keep track of what
goes where.
Remember to remove your subject layer(s) from
the stack before saving your .gif and also you can
open a gif in Gimp for editing and re saving.
=== === === === === === === === === === === === === ===
=== === === === === === === === === === === === === ===
And when your outcome appears, if you do not like it, remember
that a <CONTROL>Z will UNDO the script's effect and leave you
back with the subject you ran the script upon.
Another useful key combo is <CNTRL>D
When your subject is prepared and ready, <CNTRL>D duplicates
the image in Gimp. I use it to quickly make 6 or 7 copies and then
start playing with the script using different options, or different
treatments such as Brightness/Contrast on the subject.
It is nice to be able to compare the outcomes side by side and also
easy to move layers between images if you see combinations
that you are interested in looking.
=== === === === === === === === === === === === === ===
I hope that you have as much fun
with this script as I do!
=== === === === === === === === === === === === === ===
=== === === === === === === === === === === === === ===
=== === === === === === === === === === === === === ===
Attachments
01 BA_FanIllusion3f4.py #
(27.14 KiB) Downloaded 34 times
Fanillusion V3.txt #
(11.12 KiB) Downloaded 27 times
Last edited by animicule on 11 Sep 2017, 10:17, edited 2 times in total.
0 x




Registered members enjoy ads-free content
User avatar
animicule

Script Coder
View: Showcase | Slideshow
Topic Posts: 7/16
Posts: 601
Joined: 10 Jan 2017, 07:25
Cash on hand: 738.85 GLP
Bank: 45,987.00 GLP
Gender: Guy
Location: South Dakota
Operating System: Windows
GIMP Version: 2.9.5
x 168
United States of America

Post#2 by animicule » 09 Sep 2017, 10:17


This is an example of moving pivot point and 5 rotations.
The gif version is too large, so it is a 7zip attachment
if you want to download view it.
Attachments
a bug a gain3.png
a bug a gain3.png # (903.71 KiB) Viewed 333 times (Watermarked | Thumbnail)
a bug a gain3 500x500.7z #
(4.65 MiB) Downloaded 5 times
0 x




User avatar
animicule

Script Coder
View: Showcase | Slideshow
Topic Posts: 7/16
Posts: 601
Joined: 10 Jan 2017, 07:25
Cash on hand: 738.85 GLP
Bank: 45,987.00 GLP
Gender: Guy
Location: South Dakota
Operating System: Windows
GIMP Version: 2.9.5
x 168
United States of America

Post#3 by animicule » 09 Sep 2017, 10:21


Here is another example with the dialog box.
Attachments
Untitled.png
Untitled.png # (441.61 KiB) Viewed 332 times (Watermarked | Thumbnail)
0 x




User avatar
animicule

Script Coder
View: Showcase | Slideshow
Topic Posts: 7/16
Posts: 601
Joined: 10 Jan 2017, 07:25
Cash on hand: 738.85 GLP
Bank: 45,987.00 GLP
Gender: Guy
Location: South Dakota
Operating System: Windows
GIMP Version: 2.9.5
x 168
United States of America

Post#4 by animicule » 09 Sep 2017, 10:25


This one with 3 rotations, 36 slices, and a slightly moving pivot with layers merged visible. (same subject as the above)
Attachments
butterfly test 36 slices x 3 rotations x motion merged.png
butterfly test 36 slices x 3 rotations x motion merged.png # (1.32 MiB) Viewed 332 times (Watermarked | Thumbnail)
0 x




User avatar
animicule

Script Coder
View: Showcase | Slideshow
Topic Posts: 7/16
Posts: 601
Joined: 10 Jan 2017, 07:25
Cash on hand: 738.85 GLP
Bank: 45,987.00 GLP
Gender: Guy
Location: South Dakota
Operating System: Windows
GIMP Version: 2.9.5
x 168
United States of America

Post#5 by animicule » 09 Sep 2017, 10:32


Here are a couple more examples for fun!
The top one with 8 slices, on a background made from 2880 slices and treated with spiderpaint.
The Snow Owl generated in Fan Illusion and spun.
The bottom one 2880 slices and left the subject in.
Attachments
sp fan butterfly.png
sp fan butterfly.png # (755.33 KiB) Viewed 327 times (Watermarked | Thumbnail)
snow_owl_suprise.gif
snow_owl_suprise.gif # (858.35 KiB) Viewed 327 times (Watermarked | Thumbnail)
woman juggling.png
woman juggling.png # (396.78 KiB) Viewed 327 times (Watermarked | Thumbnail)
Last edited by animicule on 09 Sep 2017, 12:22, edited 2 times in total.
1 x




User avatar
Pat625
Script Tester
View: Showcase | Slideshow
Topic Posts: 5/16
Posts: 2049
Joined: 27 Sep 2016, 20:35
Cash on hand: 11,979.76 GLP
Gender: Gal
Location: USA
Operating System: Windows
GIMP Version: 2.8.22
x 7
x 430
United States of America

Post#6 by Pat625 » 09 Sep 2017, 10:51


WoW! Brian. That looks like a complex script with many things to do in it! I am using my iPad right now so can't download, but will as soon as I have my computer. Looks like a great script and a lot of fun! Thanks for another toy to play with!
0 x




User avatar
Pat625
Script Tester
View: Showcase | Slideshow
Topic Posts: 5/16
Posts: 2049
Joined: 27 Sep 2016, 20:35
Cash on hand: 11,979.76 GLP
Gender: Gal
Location: USA
Operating System: Windows
GIMP Version: 2.8.22
x 7
x 430
United States of America

Post#7 by Pat625 » 11 Sep 2017, 16:44


BA.Fan Illusion3f4.BarrenTree.jpg
BA.Fan Illusion3f4.BarrenTree.jpg # (713.71 KiB) Viewed 287 times (Watermarked | Thumbnail)
This is such a nice script! I'm not sure what I am doing yet, though! More practice!
0 x




Post Reply

Last 20 Members Who Visited This Topic

User avatar gnerd (33), User avatar animicule (30), User avatar Pat625 (19), User avatar leopardo-40 (3), User avatar PhotoMaster (2), User avatar tim (10), User avatar Issabella (3), User avatar RJKD (3)

  • Similar Topics
    Replies
    Views
    Last post
• Featuring Members' Works (Image Attachments Only) •
1: Pat625
2: RJKD
3: Issabella
4: RJKD
5: Conbagui
6: tim
7: RJKD

Who is online

Users browsing this forum: No registered users and 1 guest