Gimp-Forum.net
Falling snow animated Scheme Script for Gimp - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+--- Thread: Falling snow animated Scheme Script for Gimp (/Thread-Falling-snow-animated-Scheme-Script-for-Gimp)

Pages: 1 2


Falling snow animated Scheme Script for Gimp - JimmyMarco - 04-03-2020

Hello,  Smile

I'm a french guy, newly registered on the website.
I have finished today a Scheme script to make a 25 frames animation with falling snow effect :

The Falling snow script in a Zip file

[Image: FallingSnowWindow.jpg]

Exemple with the default parameters below:

[Image: snowDefaultParameters.gif]

With flakes Opacity on 70/100 :

[Image: snowOpacity70.gif]

Another exemple with first flakes size 1 and 7 layers of flakes :

[Image: snow7layers.gif]

With difference size between two layers set on level 2 instead of 1 in previous exemples :

[Image: snowDifferenceLevel2.gif]

With Wind force = 1 :

[Image: snowWindSmall.gif]

With Wind force = 2 :

[Image: snowWindMedium.gif]

With Wind force = 3 :

[Image: snowWindStrong.gif]

Wind force can be set in the other direction using -1 -2 and -3 values.

Falling snow effect can also be applied on selected parts, and you can use special lightning effects using layers mode and opacity.
Animation display automatically open in the end of script to show what it looks.

Tell me what you think about this script, and if i can better it.

Good test.  Wink
@+++


RE: Falling snow animated Scheme Script for Gimp - dinasset - 04-03-2020

Very nice, especially when the snow falls down slow.


RE: Falling snow animated Scheme Script for Gimp - JimmyMarco - 04-03-2020

(04-03-2020, 02:12 PM)dinasset Wrote: Very nice, especially when the snow falls down slow.

Thanks.

Delay for all frames can be set from 40 to 100 ms.

Best regards. Smile
@+++


RE: Falling snow animated Scheme Script for Gimp - JimmyMarco - 04-04-2020

Hello, Smile

Now a new version of the Falling snow script, with a lot of new features :

Download the file : falling-snow-animV2.zip

Parameters allow to choose :
- frames number in the animation : 5 to 50
- delay between two frames : 40 to 100 ms
- number of flakes layers : 1 to 10
- first size of snow flakes : 1 to 10
- size difference between two layers : 1 or 2
- brush rotation : left or no or right
- direction and force of wind : -3 to 3
- blur level applied on snow layer : 0 to 5
- rainy blur effect level : 0 to 20
- opacity of snow flakes : 1 to 100
- snow flakes layer display mode : 28 modes

To create a windy rain using 5 frames, or peacefull falling snow on 50 frames, have fun with all the combinations proposed.

Enjoy. Wink
@+++


RE: Falling snow animated Scheme Script for Gimp - JimmyMarco - 04-05-2020

Hello, Smile

After cleaning-up the code, here is the last version of Falling snow script

Download the file : falling-snow-animV3.zip

Good game. Wink
@+++


RE: Falling snow animated Scheme Script for Gimp - JimmyMarco - 04-07-2020

Hello, Smile

Download the File : falling-snow-animV4.zip

A lot of work last days on the script to propose you more features :

- frames number in the animation : 5 to 50
- delay between two frames : 40 to 100 ms
- number of flakes layers : 1 to 15
- first size of snow flakes : 1 to 15
- size difference between two layers : 1 or 2
- brush name : Enter name text
- brush color : Color box
- brush rotation : left...no...right
- direction and force of wind : -3 to 3
- blur level applied on snow layer : 0 to 5
- rainy blur effect level : 0 to 30
- rainy blur effect angle : -90...vertical...90
- opacity of snow flakes : 1 to 100
- snow flakes layer display mode : 28 modes
- harden the layers of flakes : TRUE or FALSE
- check animation window open at end : TRUE or FALSE

Yes... now you can choose if the animation window open at end :

[Image: FallingSnowWindow.jpg]

And the color of what is falling :

[Image: fallingLeaves.gif]

As the script use the brush tool to draw, you can also play with the dynamics setting in tool...
"Perpective" is used in the previous animation.

The rainy blur is longer than previous and you can adapt the angle of blur.
For example :
- wind force 1 set 45°... or -45° for wind -1
- wind force 2 set 63°... or -63° for wind -2
- wind force 3 set 71° ... or -71° for wind -3

The little bug called "I don't want to be saved like that" is now fixed strongly... Wink

Good game. Wink
@+++


RE: Falling snow animated Scheme Script for Gimp - Pocholo - 04-09-2020

(04-07-2020, 11:20 AM)JimmyMarco Wrote: Hello, Smile

Download the File : falling-snow-animV4.zip

A lot of work last days on the script to propose you more features :

- frames number in the animation : 5 to 50
- delay between two frames : 40 to 100 ms
- number of flakes layers : 1 to 15
- first size of snow flakes : 1 to 15
- size difference between two layers : 1 or 2
- brush name : Enter name text
- brush color : Color box
- brush rotation : left...no...right
- direction and force of wind : -3 to 3
- blur level applied on snow layer : 0 to 5
- rainy blur effect level : 0 to 30
- rainy blur effect angle : -90...vertical...90
- opacity of snow flakes : 1 to 100
- snow flakes layer display mode : 28 modes
- harden the layers of flakes : TRUE or FALSE
- check animation window open at end : TRUE or FALSE

Yes... now you can choose if the animation window open at end :

[Image: FallingSnowWindow.jpg]

And the color of what is falling :

[Image: fallingLeaves.gif]

As the script use the brush tool to draw, you can also play with the dynamics setting in tool...
"Perpective" is used in the previous animation.

The rainy blur is longer than previous and you can adapt the angle of blur.
For example :
- wind force 1 set 45°... or -45° for wind -1
- wind force 2 set 63°... or -63° for wind -2
- wind force 3 set 71° ... or -71° for wind -3

The little bug called "I don't want to be saved like that" is now fixed strongly... Wink

Good game. Wink
@+++




Very nice script. I was using FencePost animated scrip, but this one look a little more realistic. Thank you for sharing, JimmyMarco!



RE: Falling snow animated Scheme Script for Gimp - JimmyMarco - 04-09-2020

Hello, Smile

I worked hard last days to provide the final version of the script.

Objectives :
- add the selection of brush angle, from -180 to 180
- speed up the drawing
- fixe all bugs... yes there were many bugs

Very difficult and ... mission complete now...

Download the file : falling-snow-animV5.zip

[Image: FallingSnowWindow.jpg]

Left angle 27° combine with left wind -2 and No rotation brush :

[Image: Wilber01.gif]

Left angle 60° combine with left wind -2 and left rotation :

[Image: Wilber02.gif]

What do you think about my next idea... translate this script is a Python Plugin ?
Is it difficult to program in Python after Scheme ?
Should it be faster in Python ?
How can i do that ?

I'm waiting your good advices. Smile
@+++


RE: Falling snow animated Scheme Script for Gimp - Ofnuts - 04-09-2020

Is it difficult to program in Python after Scheme ?

No. In general Python is considered easier to use than Script-fu. It is taught as a first programing languages in many places(*). You also get the whole power of Python (Script-fu is not really a full Scheme environment...)

Should it be faster in Python ?

If you are talking about the execution speed, likely not. Script-fu or Python are just glue been Gimp function calls that do all the grunt work. But writing the code in Python is likely going to be faster.

How can i do that ?

With a decent programmer's editor. If you need examples, see here. I you have questions ask here.


(*) In France, in Math Sup/Math Spé. Conversely, at the Paris University, they teach Scheme during the first year, and it is considered a form of hazing.


RE: Falling snow animated Scheme Script for Gimp - JimmyMarco - 04-10-2020

Hello, Smile

I thought the previous version of script was the final... and nooo...
There was a big bad bug hidden in the lines and i had to chase it.

Now, i'm sure, it's the final fantasy Falling snow (or other brush) script Mark VI.

Download the file : falling-snow-animV6.zip

Thanks for your reply Ofnuts... your answers and links are very useful.

I'll try just to see what Python Plugin looks like and how it's faster than Scheme.

Have fun Smile
@+++