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 : 1. Refresh = bool(0)
- #@gui : sep = separator()
- #@gui : 2. Plasma Texture = bool(0)
- #@gui : 3. Plasma Scale = float(5,0,20)
- #@gui : sep = separator()
- #@gui : 4. Blur = float (0,0,30)
- #@gui : sep = separator()
- #@gui : 5. Quadtree Pixelisation = bool(0)
- #@gui : 6. Quadtree Min Precision = int(128,2,2048)
- #@gui : 7. Quadtree Max Precision = int(1024,0,2048)
- #@gui : 8. Quadtree Min Homogeneity = float(2.5,0,5)
- #@gui : 9. Quadtree Max Homogeneity = float(5,0,5)
- #@gui : sep = separator()
- #@gui : 10. Minimum Noise = float(0,0,100)
- #@gui : 11. Maximum Noise = float(2.5,0,100)
- #@gui : sep = separator(), note = note("<small>Warping</small>")
- #@gui : 12. Warp Iterations = int(3,0,30)
- #@gui : 13. Warp Intensity = float(1,0,30)
- #@gui : 14. Warp Offset = int(5,0,2000)
- #@gui : 15. Correlated Channels = choice("Random","Off","On")
- #@gui : 16. 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 : 17. Gamma Offset = float(0.25,0,1)
- #@gui : 18. Hue Offset = float(1,0,1)
- #@gui : sep = separator(), note = note("<small>Final HSV Scaling</small>")
- #@gui : 19. Minimum Hue = float(0,0,20)
- #@gui : 20. Maximum Hue = float(5,0,20)
- #@gui : 21. Minimum Saturation = float(0.5,0,20)
- #@gui : 22. Maximum Saturation = float(5,0,20)
- #@gui : 23. Minimum Value = float(0,0,20)
- #@gui : 24. Maximum Value = float(5,0,20)
- #@gui : sep = separator(),
- #@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")
- ultrawarpplusplus:
- # plasma rendering and pixelisation followed by random warp with gamma and hue randomisation and final HSV scaling
- 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}
- rr={round(u*255)}
- gg={round(u*255)}
- bb={round(u*255)}
- -fx_plasma 0.5,0,8,{$3},0,{$rr},{$gg},{$bb}
- -fx_mix_hsv {$j},0,0,{$k},0,0,{$l},0,0,0,2,0
- -endif
- -fx_gaussian_blur {$4},0,0,1,2,0,0
- n_min={$10}
- n_max={$11}
- -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 {$5}
- p_min={$6}
- p_max={$7}
- h_min={$8}
- h_max={$9}
- -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))))},2,2,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))))},2,2,1,0
- f={$12} # iterations
- i={$13} # warp intensity
- m={$14} # offset magnitude
- s={$17} # gamma
- v={$18} # 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 {$15==1}
- e=0
- -elif {$15==2}
- e=1
- -else
- e={round(u)}
- -endif
- -if {$16==0}
- -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
- -else
- -ac "a={(u-0.5)*$13}
- b={(u-0.5)*$13}
- c={(u-0.5)*$14*sign($14)}
- d={(u-0.5)*$14*sign($14)}
- f={round((u*2.98)+0.51)}
- -if {$15==1}
- e=0
- -elif {$15==2}
- e=1
- -else
- e={round(u)}
- -endif
- -_fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f}",{$16},0
- -endif
- -fx_adjust_colors 0,0,{$h},{$o},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