It is currently Fri Jul 26, 2024 9:24 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Starry sky script (Fixed by nelo)
PostPosted: Fri Nov 16, 2018 11:37 am  (#1) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
GIMP Version: 2.10.6
Operating System: Windows
OS Version: 64bit
GIMP Experience: Intermediate Level

List any relevant plug-ins or scripts:
Starry Sky

List any ERROR messages you received:
Error while executing script-fu-starry-sky:

Error: ( : 1) Procedure execution of gimp-drawable-set-pixel failed




Does anybody have fixed this script or can Scripters or Coders please fix it . I keep getting error message when I try to create stars with this script. I don't know who wrote, otherwise I would contact the creator. Thank in advance.

_________________
https://www.deviantart.com/pocholo17
Image


Last edited by Pocholo on Sun Nov 18, 2018 8:53 pm, edited 1 time in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Starry sky script
PostPosted: Fri Nov 16, 2018 5:55 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
You should always upload your non-compliant script. Don't assume everyone has that script.


Top
 Post subject: Re: Starry sky script
PostPosted: Fri Nov 16, 2018 10:38 pm  (#3) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
racer-x wrote:
You should always upload your non-compliant script. Don't assume everyone has that script.


Here it is...


Attachments:
starry-sky.scm [7.07 KiB]
Downloaded 147 times

_________________
https://www.deviantart.com/pocholo17
Image


Last edited by Pocholo on Sun Nov 18, 2018 8:52 pm, edited 1 time in total.
Top
 Post subject: Re: Starry sky script
PostPosted: Sat Nov 17, 2018 9:46 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
@Pocholo
Change line 80 to
(set! lum (+ (rand 160) 31))
32 can bring the total pixel value outside the max allowed 255 (max 191+64)

_________________
"Where am I ?"


Top
 Post subject: Re: Starry sky script
PostPosted: Sat Nov 17, 2018 2:35 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Uhm, tried to re-set the original value of 32 and the script works now on my PC; when I first tested it I got the same error as Pocholo. IDK.

_________________
"Where am I ?"


Top
 Post subject: Re: Starry sky script
PostPosted: Sat Nov 17, 2018 2:49 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
IMHO it works when the total sum of the rand functions do not produce a value>255.

It works...randomly.
Hence, ignore my previous posts.
There should be another reason for failing.

_________________
"Where am I ?"


Top
 Post subject: Re: Starry sky script
PostPosted: Sun Nov 18, 2018 1:38 am  (#7) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
Thank you for trying dinasset, I found out that Gnu Tux was the one who made the filter. I know he's been away because of medical condition. :(

_________________
https://www.deviantart.com/pocholo17
Image


Top
 Post subject: Re: Starry sky script
PostPosted: Sun Nov 18, 2018 4:54 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
This script is very erratic. Sometimes it works and sometimes it doesn't. I can't figure it out and gave up trying. My advice would be to get it to work one time, then make a brush out of it.

I don't have interest in this, because I have much better means of rendering star fields using other programs.


Top
 Post subject: Re: Starry sky script
PostPosted: Sun Nov 18, 2018 3:25 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Sep 27, 2016
Posts: 345
Location: Germany, BW
Have I found the culprit? Not sure.
But I think it's because sometimes pixels render on the direct edge of the picture, which seems to be a problem in GIMP 2.10.
I have done the following changes to avoid this behaviour and run the script several times and with lots of stars! without errors:
Find following lines in the sections and replace

Generating small stars
      (set! xs (rand width))
      (set! ys (rand height))
     
      change to:
      (set! xs (rand (- width 1)))
      (set! ys (rand (- height 1)))
     
     
Generating medium stars
      (set! xm (rand (- width 1)))
      (set! ym (rand (- height 1)))
     
      change to:
      (set! xm (rand (- width 2)))
      (set! ym (rand (- height 2)))


Generating big stars
      (set! xb (rand (- width 2)))
      (set! yb (rand (- height 2)))
     
      change to:
      (set! xb (rand (- width 3)))
      (set! yb (rand (- height 3)))

_________________
Regards
nelo

(Gimp 2.10 on Linux Mint MATE 20.1)


Top
 Post subject: Re: Starry sky script
PostPosted: Sun Nov 18, 2018 8:51 pm  (#10) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
Oh Wow, nelo...Thank you thank you thank you. I vow my head to you, you are the only one who had succeed in fixing this script. My hat is off to you! great work. :clap :jumpclap :yr
I tested it 10 out of ten no errors... Whooooohooo
I will replace the prior uploaded file with the fixed. Thank you once again.

_________________
https://www.deviantart.com/pocholo17
Image


Top
 Post subject: Re: Starry sky script (Fixed by nelo)
PostPosted: Mon Nov 19, 2018 2:08 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Good finding, Nelo !

_________________
"Where am I ?"


Top
 Post subject: Re: Starry sky script (Fixed by nelo)
PostPosted: Sun Nov 25, 2018 5:36 pm  (#12) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
Thank you very much, Nelo for fixing the script.


Top
 Post subject: Re: Starry sky script (Fixed by nelo)
PostPosted: Sun Nov 25, 2018 6:54 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Mar 16, 2015
Posts: 613
Location: On Earth,specifically Queensland,Australia
Image Thanks Nelo. Works great.

_________________
Image


Top
 Post subject: Re: Starry sky script (Fixed by nelo)
PostPosted: Sun Nov 25, 2018 11:29 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12536
Excellent script-fu; added some sparkle to the mix. Like the fact that this version adds color to stars unlike the original that I had (but I faked that using color noise set to color). Kudos for the update. :)


Attachments:
ssky.jpg
ssky.jpg [ 121.37 KiB | Viewed 1488 times ]

_________________
Lyle

Psalm 109:8

Image
Top
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Starry Night

1

No new posts Van Gogh Starry Night repainted digitally

5

No new posts Attachment(s) Create a starfield plugin (Faster than "starry sky.scm")

9

No new posts Attachment(s) Errors (some) in G'MIC SQUIGGLY (FIXED)

4

No new posts Attachment(s) today error on some G'MIC filters (fixed on pre 2.9.8)

8



* Login  



Powered by phpBB3 © phpBB Group