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>Deformations</b>
- #@gui UltraWarp++ : fx_ultrawarpplusplus, fx_ultrawarpplusplus(1)
- #@gui : note = note("[Optional plasma texture generation and quadtree pixelisation or blurring followed by] random warp with gamma and hue randomisation and final HSV scaling"), sep = separator()
- #@gui : Refresh = bool(0)
- #@gui : sep = separator()
- #@gui : Plasma Texture = bool(0)
- #@gui : Quadtree Min Precision = int(128,2,2048)
- #@gui : Quadtree Max Precision = int(1024,0,2048)
- #@gui : Quadtree Min Homogeneity = float(0,0,5)
- #@gui : Quadtree Max Homogeneity = float(5,0,5)
- #@gui : Minimum Noise = float(0,0,100)
- #@gui : Maximum Noise = float(2.5,0,100)
- #@gui : sep = separator(), note = note("<small>[if non-zero, turns off pixelisation after plasma texture generation]</small>")
- #@gui : Blur = float (0,0,30)
- #@gui : sep = separator(), note = note("<small>Warping</small>")
- #@gui : Warp Iterations = int(5,0,30)
- #@gui : Warp Intensity = float(1,0,30)
- #@gui : Warp Offset = int(5,0,2000)
- #@gui : Correlated Channels = choice("Random","Off","On")
- #@gui : Channel(s) = choice("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 : Gamma Offset = float(0.25,0,1)
- #@gui : Hue Offset = float(1,0,1)
- #@gui : sep = separator(), note = note("<small>Final HSV Scaling</small>")
- #@gui : Minimum Hue = float(0,0,20)
- #@gui : Maximum Hue = float(5,0,20)
- #@gui : Minimum Saturation = float(0.5,0,20)
- #@gui : Maximum Saturation = float(5,0,20)
- #@gui : Minimum Value = float(0,0,20)
- #@gui : Maximum Value = float(5,0,20)
- #@gui : sep = separator(), 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 : Value action = choice("None","Cut","Normalize")
- ultrawarpplusplus:
- # plasma rendering and pixelisation followed by random warp with gamma and hue randomisation and final HSV scaling
- -if {$2}
- p_min={$3}
- p_max={$4}
- h_min={$5}
- h_max={$6}
- n_min={$7}
- n_max={$8}
- -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
- -if {$n_min > $n_max}
- n_min = {$n_min + $n_max}
- n_max = {$n_min - $n_max}
- n_min = {$n_min - $n_max}
- -endif
- -fx_plasma 0.5,0,8,1,0,128,128,128
- -if {$9==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
- -endif
- -fx_noise {max(0,round($n_min+(u*($n_max-$n_min))))},2,2,1,0
- -endif
- -fx_gaussian_blur {$9},0,0,1,2,0,0
- f={$10} # iterations
- i={$11} # warp intensity
- m={$12} # offset magnitude
- s={$15} # gamma
- v={$16} # hue
- hue_min={$17}
- hue_max={$18}
- sat_min={$19}
- sat_max={$20}
- val_min={$21}
- val_max={$22}
- 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)))}
- -if {$2}
- -fx_mix_hsv {$j},0,0,{$k},0,0,{$l},0,0,0,2,0
- -endif
- -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}
- m={(u-0.5)*$v*200}
- -if {$13==1}
- e=0
- -elif {$13==2}
- e=1
- -else
- e={round(u)}
- -endif
- -if {$14==0}
- -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
- -else
- -ac "-if {$15==1} e=0 -elif {$15==2} e=1 -else e={round(u)} -endif -_fx_warp_by_intensity {(u-0.5)*$10},{(u-0.5)*$10},{(u-0.5)*$12*sign($12)},{(u-0.5)*$12*sign($12)},{$e},0,{round((u*2.98)+0.51)}",{$14}
- -endif
- -fx_adjust_colors 0,0,{$h},{$m},0,0
- -done
- -fx_mix_hsv {$j},0,0,{$k},0,0,{$l},0,0,0,2,0
- fx_ultrawarpplusplus:
- -ac "-ultrawarpplusplus $*",$-2,$-1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement