It is currently 04 Jun 2020, 12:08

• 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

Falling snow animated Scheme Script for Gimp

Share your Scheme Fu scripts for GIMP here
JimmyMarco
Forum Member

Falling snow animated Scheme Script for Gimp

Post#1 by JimmyMarco » 03 Apr 2020, 17:35


Hello, :gimp:

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

Exemple with the default parameters below:

Image

With flakes Opacity on 70/100 :

Image

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

Image

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

Image

With Wind force = 1 :

Image

With Wind force = 2 :

Image

With Wind force = 3 :

Image

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.
Delay can be set from 40 to 100 ms.
Animation display automatically open in the end of script to show what it looks like.

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

Good test. :gimp:
@+++
Image
3

Steve Reid
Script Coder

Post#2 by Steve Reid » 03 Apr 2020, 20:11


Thanks for an excellent script JimmyMarco :award_trophy:

A first try gave me this result, default settings used with the exception of windforce which was set to -1

I know I will play a lot with this script trying many variations using different settings to get the best from it

Only thing I can think I would like is an option to create the number of frames to use

Thanks again steve
snowstorm.gif
snowstorm.gif (4.86 MiB) Viewed 1062 times
GIMP Learn rocks...
1

JimmyMarco
Forum Member

Post#3 by JimmyMarco » 03 Apr 2020, 20:52


Steve Reid wrote:
03 Apr 2020, 20:11
Thanks for an excellent script JimmyMarco :award_trophy:

A first try gave me this result, default settings used with the exception of windforce which was set to -1

I know I will play a lot with this script trying many variations using different settings to get the best from it

Only thing I can think I would like is an option to create the number of frames to use

Thanks again steve

snowstorm.gif
Thanks for the comment.

What are the dimensions of the original image you have used to test the snow script ?

I have tried with a similare 640 x 480 picture, also 720 x 540, 800 x 600 and can't reproduce problem like that.

I'm using Gimp 2.10.18 version ... and you ?

Your proposition to allow different number of frames to use is interesting... i will think about it.
Image
0

Steve Reid
Script Coder

Post#4 by Steve Reid » 03 Apr 2020, 21:44


I'm using gimp 2.8.22

The original image was 2560 x 1920 which I scaled to 640 x 480 before running the script

I tried again scaling the origional to 1280 x 960 and it worked perfectly without the blip, it looks good as it fills the screen but is too big to post. I then scaled the gif to 640 x 480 and it is ok but the snow looks smaller. In future I will run the script first before scaling down and compensate by using bigger flakes to start

steve
GIMP Learn rocks...
1

Lenny
Forum Member

Post#5 by Lenny » 04 Apr 2020, 03:34


This is beautiful.
GIMP Learn rocks...
1

Steve Reid
Script Coder

Post#6 by Steve Reid » 04 Apr 2020, 15:06


I got the script working on my machine by changing a setting on line 141 (I set the last zero to one), as in

SF-ADJUSTMENT _"Wind force" '(0 -3 3 1 1 0 0)

to

SF-ADJUSTMENT _"Wind force" '(0 -3 3 1 1 0 1)

This alters the slider to a spinner and gives a smooth gif, I don't know why this works but I did notice the slider gives an option of -0 as in -3, -2, -1 -0, 0, 1, 2, 3, I can't remember a minus zero before

Anyway very happy now, the script gives a realistic snow fall

steve
snowfall-3.gif
snowfall-3.gif (4.85 MiB) Viewed 1013 times
GIMP Learn rocks...
0

JimmyMarco
Forum Member

Post#7 by JimmyMarco » 04 Apr 2020, 16:07


Hello, :)

Happy to please you, Lenny and over likers.
Well done steve with your modification.

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. ;)
@+++
Image
0

JimmyMarco
Forum Member

Post#8 by JimmyMarco » 05 Apr 2020, 11:49


Hello, :)

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

Download the file : falling-snow-animV3.zip

Good game. ;)
@+++
Image
1

Pat625
Tutorial Creator

Post#9 by Pat625 » 07 Apr 2020, 04:47


Jimmy, I just tried your script and I really like it. Works like a charm. Thank you, good work.
JMarco.FallingSnowLandscape.gif
JMarco.FallingSnowLandscape.gif (5.07 MiB) Viewed 930 times
0

JimmyMarco
Forum Member

Post#10 by JimmyMarco » 07 Apr 2020, 11:17


Hello, :)

Happy to please you designers.

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

And the color of what is falling :

Image

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... ;)

Good game. ;)
@+++
Image
0


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 1 guest