Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #@gmic
- #
- # File : seriously.gmic
- # ( G'MIC commands file )
- #
- # Description : some rubbish
- #
- # Copyright : yeah no
- #
- # License : just don't expect a warranty
- #
- #@gui _<b>Artistic</b>
- #@gui UltraWarp+++ : fx_ultrawarpplusplusplus, fx_ultrawarpplusplusplus(1)
- #@gui : note = note("Sequence of multiple partially-randomised texture generation and image deformation filters with multi-iteration warping"), sep = separator()
- #@gui : 1. Quick Refresh Button = bool(0)
- #@gui : sep = separator()
- #@gui : 2. Plasma Texture = bool(0)
- #@gui : 3. Plasma Scale = float(2.5,0,20)
- #@gui : 4. Plasma Alpha Channel = bool(0)
- #@gui : sep = separator()
- #@gui : 5. Blur = float (0,0,30)
- #@gui : sep = separator()
- #@gui : 6. Quadtree Pixelisation [no alpha channel] = bool(0)
- #@gui : 7. Quadtree Min Precision = int(4,2,2048)
- #@gui : 8. Quadtree Max Precision = int(256,0,2048)
- #@gui : 9. Quadtree Min Homogeneity = float(0,0,5)
- #@gui : 10. Quadtree Max Homogeneity = float(5,0,5)
- #@gui : sep = separator()
- #@gui : 11. Noise Type = choice(2,"Gaussian","Uniform","Salt and pepper","Poisson")
- #@gui : 12. Minimum Noise = float(0,0,200)
- #@gui : 13. Maximum Noise = float(1,0,200)
- #@gui : 14. Noise Channel(s) = choice(2,"All","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
- #@gui : sep = separator(), note = note("<small>Warping</small>")
- #@gui : 15. Warp Iterations = int(5,0,30)
- #@gui : 16. Warp Intensity = float(2,0,30)
- #@gui : 17. Warp Offset = int(10,0,2000)
- #@gui : 18. Correlated Channels = choice("Random","Off","On")
- #@gui : 19. Warp Channel(s) = choice(2,"Random","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
- #@gui : 20. Random Negation = bool(1)
- #@gui : 21. Random Negation Channel(s) = choice(2,"Random","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
- #@gui : 22. Gamma Offset = float(0.25,0,1)
- #@gui : 23. Hue Offset = float(1,0,1)
- #@gui : 24. Normalise = bool(1)
- #@gui : sep = separator(), note = note("<small>Final HSV Scaling</small>")
- #@gui : 25. Minimum Hue = float(0,0,20)
- #@gui : 26. Maximum Hue = float(5,0,20)
- #@gui : 27. Minimum Saturation = float(0.5,0,20)
- #@gui : 28. Maximum Saturation = float(5,0,20)
- #@gui : 29. Minimum Value = float(0,0,20)
- #@gui : 30. Maximum Value = float(2,0,20)
- #@gui : sep = separator(),
- #@gui : -3. Normalise = bool(1)
- #@gui : -2. Channel(s) = choice("All","RGBA [all]","RGB [all]","RGB [red]","RGB [green]","RGB [blue]","RGBA [alpha]","Linear RGB [all]","Linear RGB [red]","Linear RGB [green]","Linear RGB [blue]","YCbCr [luminance]","YCbCr [blue-red chrominances]","YCbCr [blue chrominance]","YCbCr [red chrominance]","YCbCr [green chrominance]","Lab [lightness]","Lab [ab-chrominances]","Lab [a-chrominance]","Lab [b-chrominance]","Lch [ch-chrominances]","Lch [c-chrominance]","Lch [h-chrominance]","HSV [hue]","HSV [saturation]","HSV [value]","HSI [intensity]","HSL [lightness]","CMYK [cyan]","CMYK [magenta]","CMYK [yellow]","CMYK [key]","YIQ [luma]","YIQ [chromas]")
- #@gui : -1. Value action = choice("None","Cut","Normalize")
- ultrawarpplusplusplus:
- # plasma rendering and pixelisation followed by random warp with gamma and hue randomisation and final HSV scaling
- -srand
- hue_min={$25}
- hue_max={$26}
- sat_min={$27}
- sat_max={$28}
- val_min={$29}
- val_max={$30}
- -if {$2}
- -if {$4} ch=0 -else ch=2 -endif
- -ac "rr={round(u*255)}
- gg={round(u*255)}
- bb={round(u*255)}
- -fx_plasma 0.5,0,{$3},1,1,{$rr},{$gg},{$bb}
- -if {$4} -to_rgba -else ch=2 -to_rgb -endif",{$ch}
- -endif
- -fx_gaussian_blur {$5},0,0,1,2,0,0
- n_min={$12}
- n_max={$13}
- -if {$n_min > $n_max}
- n_min = {$n_min + $n_max}
- n_max = {$n_min - $n_max}
- n_min = {$n_min - $n_max}
- -endif
- -if {$6}
- p_min={$7}
- p_max={$8}
- h_min={$9}
- h_max={$10}
- -if {$p_min > $p_max}
- p_min = {$p_min + $p_max}
- p_max = {$p_min - $p_max}
- p_min = {$p_min - $p_max}
- -endif
- -if {$h_min > $h_max}
- h_min = {$h_min + $h_max}
- h_max = {$h_min - $h_max}
- h_min = {$h_min - $h_max}
- -endif
- -fx_noise {max(0,round($n_min+(u*($n_max-$n_min))))},{$11},{$14},1,0
- -fx_quadtree 0,{max(2,round($p_min+(u*($p_max-$p_min))))},{max(0,round($h_min+(u*($h_max-$h_min))))},0,3,1.5,1,1,0
- -fx_mix_hsv {$j},0,0,{$k},0,0,{$l},0,0,0,2,0
- -endif
- -fx_noise {max(0,round($n_min+(u*($n_max-$n_min))))},{$11},{$14},1,0
- f={$15} # iterations
- i={$16} # warp intensity
- m={$17} # offset magnitude
- s={$22} # gamma
- v={$23} # hue
- -repeat {max(0,$f)}
- a=(u-0.5)*$i
- b=(u-0.5)*$i
- c=(u-0.5)*$m*sign($m)
- d=(u-0.5)*$m*sign($m)
- f={round((u*2.98)+0.51)}
- g={round((u*33.98)-0.49)}
- h={(u-0.5)*$s*200}
- o={(u-0.5)*$v*200}
- -if {$18==1}
- e=0
- -elif {$18==2}
- e=1
- -else
- e={round(u)}
- -endif
- -if {$18==0}
- -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
- -else
- -ac "a={(u-0.5)*$16}
- b={(u-0.5)*$16}
- c={(u-0.5)*$17*sign($17)}
- d={(u-0.5)*$17*sign($17)}
- f={round((u*2.98)+0.51)}
- -if {$18==1}
- e=0
- -elif {$18==2}
- e=1
- -else
- e={round(u)}
- -endif
- -_fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f}",{$19},0
- -srand
- -endif
- -if {$20}
- nn={round(u)}
- -if {$nn}
- -if {$21==0}
- nch={round((u*33.98)-0.49)}
- -ac "-negate",{$nch}
- -else
- -ac "-negate",{$21}
- -endif
- -endif
- -endif
- -fx_adjust_colors 0,0,{$h},{$o},0,0
- -if {$24}
- -ac "-n 0,255",3
- -endif
- hh=((u-0.5)*360)
- ss=((u-0.5)*2)
- vv=((u-0.5)*2)
- -done
- -repeat {1}
- j={min($hue_min,$hue_max)+(u*(max($hue_min,$hue_max)-min($hue_min,$hue_max)))}
- k={min($sat_min,$sat_max)+(u*(max($sat_min,$sat_max)-min($sat_min,$sat_max)))}
- l={min($val_min,$val_max)+(u*(max($val_min,$val_max)-min($val_min,$val_max)))}
- hh=((u-0.5)*360)
- ss=((u-0.5)*2)
- vv=((u-0.5)*2)
- -fx_mix_hsv {$j},{$hh},0,{$k},{$ss},0,{$l},{$vv},0,0,2,0
- -done
- -if {$-3}
- -ac "-n 0,255",3
- -endif
- fx_ultrawarpplusplusplus:
- -srand
- -ac "-ultrawarpplusplusplus $*",$-2,$-1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement