It is currently Sat Jun 13, 2026 5:46 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Sun Dec 08, 2024 10:22 am  (#1) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Hi everyone! :)

I intend to add a new G'MIC filter "Rendering / Neon Carpet".

With default parameters, on a 800x600 layer, it would give:
Attachment:
neonCarpet.png
neonCarpet.png [ 209.15 KiB | Viewed 5620 times ]


Here is its code:
#@gui ____<b>Rendering</b>
#------------------
#@gui Neon Carpet (prerelease): cl_neonCarpet_prerelease, cl_neonCarpet_prerelease(0)
#@gui : Sequence Number = ~int(0, 0, 200)
#@gui : Item Number = ~int(0, 0, 100)
#@gui : Invert = ~bool(0)
#@gui : sep = separator()
#@gui : note = note("Note: Some combinations of parameters give a completely black result")
#@gui : note = note("<small>Author: <i>Claude Lion</i>. Latest Update: <i>2024/12/08</i>.</small>")
#@gui : note = note["<small>It uses filters of David Tschumperlé and Andy Kelday (garagecoder)</small>"]

cl_neonCarpet_prerelease:
   num1,num2,inv=$"*"
   
   foreach {

      fact2={11+2*$num2}
      fact1={$fact2+$num1}

      fill. "(x*x+y*y+128*c)%512%"$fact1"%"$fact2
      n. 0,256
      distance. 128,3
      %. 32
      n. 0,255
      b. 1.1
      ac "repeat 6 { bilateral 10,7 }",0 # copied from "fx_smooth_bilateral 10,7,6,0" of David Tschumperlé
      cut. 0,100
      n. 0,255
      # copied from "gcd_despeckle 20,20" of Andy Kelday (garagecoder)
      +label. 20,1 nb={1+iM}
      +histogram. $nb,0,{$nb-1}
      map.. . rm.
      le. 20 *. 255
      inpaint.. . rm.
      # end of copy from garagecoder

      if $inv==1
         negate. n. 0,255
      fi

   }


Installation:

  • Copy and paste the above code into the file "~/.gmic" on Linux or the file "%USERPROFILE%\user.gmic" on Windows.
  • The new filter appears in "Filters -> G'MIC -> Rendering -> Rendering / Neon Carpet (prerelease)".

or you can use the new option.

Have fun! :)

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


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: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Wed Dec 11, 2024 9:14 am  (#2) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Are you able to use the filter?

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Wed Dec 11, 2024 9:36 am  (#3) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 298
Yes!
Image


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Wed Dec 11, 2024 12:31 pm  (#4) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
That's not the result I expected. I have to find the reason of that bug.
With your parameters, I obtain this:
Attachment:
neonCarpet90_4_0.png
neonCarpet90_4_0.png [ 2.59 MiB | Viewed 5515 times ]

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Wed Dec 11, 2024 1:36 pm  (#5) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Is the bug fixed with this version?
#@gui ____<b>Rendering</b>
#------------------
#@gui Neon Carpet (prerelease): cl_neonCarpet_prerelease, cl_neonCarpet_prerelease(0)
#@gui : Sequence Number = ~int(0, 0, 200)
#@gui : Item Number = ~int(0, 0, 100)
#@gui : Invert = ~bool(0)
#@gui : sep = separator()
#@gui : note = note("Note: Some combinations of parameters give a completely black result")
#@gui : note = note("<small>Author: <i>Claude Lion</i>. Latest Update: <i>2024/12/11</i>.</small>")
#@gui : note = note["<small>It uses filters of David Tschumperlé and Andy Kelday (garagecoder)</small>"]

cl_neonCarpet_prerelease:
   num1,num2,inv=$"*"
   
   foreach {

      remove_opacity.
      fact2={11+2*$num2}
      fact1={$fact2+$num1}

      fill. "(x*x+y*y+128*c)%512%"$fact1"%"$fact2
      n. 0,256
      distance. 128,3
      %. 32
      n. 0,255
      b. 1.1
      ac "repeat 6 { bilateral 10,7 }",0 # copied from "fx_smooth_bilateral 10,7,6,0" of David Tschumperlé
      cut. 0,100
      n. 0,255
      # copied from "gcd_despeckle 20,20" of Andy Kelday (garagecoder)
      +label. 20,1 nb={1+iM}
      +histogram. $nb,0,{$nb-1}
      map.. . rm.
      le. 20 *. 255
      inpaint.. . rm.
      # end of copy from garagecoder

      if $inv==1
         negate. n. 0,255
      fi

   }

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Wed Dec 11, 2024 1:47 pm  (#6) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 298
Yes, it looks like yours now


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Wed Dec 11, 2024 1:55 pm  (#7) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
:coolthup Thanks to you, I've fixed the bug, thank you! :tyspin

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Fri Dec 13, 2024 1:47 am  (#8) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 8364
Location: On the other side of your screen
nice

_________________
Image
Free Fun Photo Editing & resources
Poems from the Lord
Gimp Newby
Gimp version 3.2.0 and GMIC-Qt 3.7.5 OS :- Windows 10 Home 64


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Sun Dec 15, 2024 10:46 am  (#9) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Thanks, Sallyanne :)

@everyone
Have you experienced any other bugs?

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Sun Dec 15, 2024 3:16 pm  (#10) 
Offline
GimpChat Member

Joined: Apr 11, 2024
Posts: 298
Seems to work fine.
Looks nice in monochrome, too:
Image

Removed the black background, then coloured the remainders white.
Put a coloured layer underneath. Voilà.
Looks a bit like embroidered ...


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Tue Dec 17, 2024 2:52 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jan 13, 2011
Posts: 2639
Location: Poland
:tyspin

Image

_________________
Image


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Tue Dec 17, 2024 10:23 pm  (#12) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14019
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
MareroQ wrote:
:tyspin

[ Image ]

:jumpclap

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: New G'MIC filter "Rendering / Neon Carpet"
PostPosted: Fri Dec 20, 2024 8:22 am  (#13) 
Offline
GimpChat Member

Joined: Apr 19, 2021
Posts: 138
Location: France
Thanks, Quietreader, MareroQ and Wallace :tyspin

Now, the filter is included in version 3.5.0_pre of G'MIC.

_________________
Photo to cartoon : https://github.com/cl4cnam/gimp_cartoon_plugin


Top
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group