Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #@gui _<b>Artistic</b>
- #@gui UltraWarp++++ : fx_ultrawarpplusplusplusplus, fx_ultrawarpplusplusplusplus(1)
- #@gui : note = note("Sequence of multiple partially-randomised texture generation and image deformation filters with multi-iteration warping")
- #@gui : note = note("<small>This modular filter is extremely complex and its logic may not follow that which you expect. Left on its default settings, it is very likely to munge your image beyond recognition.</small>"), sep = separator()
- #@gui : 1. Quick Refresh Button = bool(0)
- #@gui : sep = separator()
- #@gui : 2. Plasma Texture [Discards input image] = bool(0)
- #@gui : 3. Plasma Scale = float(3.3,0,20)
- #@gui : 4. Plasma Alpha Channel = bool(0)
- #@gui : sep = separator()
- #@gui : 5. Segmentation [no alpha channel] = bool(0)
- #@gui : 6. Edge Threshold = float (5,0.01,60)
- #@gui : 7. Smoothness = float (0,0,60)
- #@gui : sep = separator()
- #@gui : 8. Blur = float (0,0,30)
- #@gui : sep = separator()
- #@gui : 9. Quadtree Pixelisation [no alpha channel] = bool(0)
- #@gui : 10. Quadtree Min Precision = int(4,2,2048)
- #@gui : 11. Quadtree Max Precision = int(256,0,2048)
- #@gui : 12. Quadtree Min Homogeneity = float(4.8,0,5)
- #@gui : 13. Quadtree Max Homogeneity = float(5,0,5)
- #@gui : sep = separator()
- #@gui : 14. Noise Type = choice(2,"Gaussian","Uniform","Salt and pepper","Poisson")
- #@gui : 15. Minimum Noise = float(0,0,8)
- #@gui : 16. Maximum Noise = float(0,0,8)
- #@gui : 17. 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 : 18. Warp Iterations = int(3,0,30)
- #@gui : 19. Warp Intensity = float(3,0,10)
- #@gui : 20. Warp Offset = float(20,0,2000)
- #@gui : 21. Scale to Width = bool(1)
- #@gui : 22. Scale to Height = bool(1)
- #@gui : 23. Correlated Channels = choice("Random","Off","On")
- #@gui : 24. Boundary = choice(5,"Random","Random [non-transparent]","Transparent","Nearest","Periodic", "Mirror")
- #@gui : 25. 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 : 26. Random Negation = bool(1)
- #@gui : 27. 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 : 28. Gamma Offset = float(0.25,0,1)
- #@gui : 29. Hue Offset = float(1,0,1)
- #@gui : 30. Normalise = bool(1)
- #@gui : sep = separator(), note = note("<small>Final HSV Scaling</small>")
- #@gui : 31. Minimum Hue = float(0,0,20)
- #@gui : 32. Maximum Hue = float(5,0,20)
- #@gui : 33. Minimum Saturation = float(0,0,20)
- #@gui : 34. Maximum Saturation = float(3,0,20)
- #@gui : 35. Minimum Value = float(0.5,0,20)
- #@gui : 36. Maximum Value = float(2,0,20)
- #@gui : note = note("<small>Set these to their minimum values for randomisation</small>")
- #@gui : 37. Hue Offset = float(-180.01, -180.01, 180)
- #@gui : 38. Saturation Offset = float(0, -1.01, 1)
- #@gui : 39. Value Offset = float(0,-20.01,20)
- #@gui : sep = separator(),
- #@gui : -4. Normalise = bool(1)
- #@gui : -3. Normalisation Channel(s) = choice(11,"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(),
- #@gui : -2. UltraWarp+++ 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")
- ultrawarpplusplusplusplus:
- # plasma rendering and pixelisation followed by random warp with gamma and hue randomisation and final HSV scaling
- hue_min={$31}
- hue_max={$32}
- sat_min={$33}
- sat_max={$34}
- val_min={$35}
- val_max={$36}
- 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}
- -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 {$8},0,0,1,2,0,0
- n_min={$15}
- n_max={$16}
- -if {$n_min > $n_max}
- n_min = {$n_min + $n_max}
- n_max = {$n_min - $n_max}
- n_min = {$n_min - $n_max}
- -endif
- noise_exp={max(0,$n_min+(u*($n_max-$n_min)))}
- n_amt={(2^($noise_exp-3))*$noise_exp}
- -if {$5}
- -fx_segment_watershed {$6},{$7},0,2,0
- -endif
- -if {$9}
- p_min={$10}
- p_max={$11}
- h_min={$12}
- h_max={$13}
- -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 {$n_amt},{$14},{$17},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
- -endif
- -fx_noise {$n_amt},{$14},{$17},1,0
- f={$18} # iterations
- i={$19} # warp intensity
- m={$20} # offset magnitude
- s={$28} # gamma
- v={$29} # hue
- -repeat {max(0,$f)}
- -if {$21}
- scale_x=w/10
- a={((2^($19-5))*$19)*(u-0.5)*$scale_x*0.025}
- -else
- scale_x=1
- a={((2^($19-5))*$19)*(u-0.5)}
- -endif
- -if {$22}
- scale_y=h/10
- b={((2^($19-5))*$19)*(u-0.5)*$scale_y*0.025}
- -else
- scale_y=1
- b={((2^($19-5))*$19)*(u-0.5)}
- -endif
- c=(u-0.5)*$m*sign($m)*$scale_x
- d=(u-0.5)*$m*sign($m)*$scale_y
- g={round((u*33.98)-0.49)}
- h={(u-0.5)*$s*200}
- o={(u-0.5)*$v*200}
- -if {$23==1}
- e=0
- -elif {$23==2}
- e=1
- -else
- e={round(u)}
- -endif
- -if {$24==0}
- f={round((u*2.98)-0.49)}
- -elif {$24==1}
- f={round((u*2.98)+0.51)}
- -else
- f={($24)-2}
- -endif
- -if {$25==0}
- -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
- -else
- -ac "-if {$21}
- scale_x=w/10
- a={((2^($19-5))*$19)*(u-0.5)*$scale_x*0.025}
- -else
- scale_x=1
- a={((2^($19-5))*$19)*(u-0.5)}
- -endif
- -if {$22}
- scale_y=h/10
- b={((2^($19-5))*$19)*(u-0.5)*$scale_y*0.025}
- -else
- scale_y=1
- b={((2^($19-5))*$19)*(u-0.5)}
- -endif
- c={(u-0.5)*$20*sign($20)*$scale_x}
- d={(u-0.5)*$20*sign($20)*$scale_y}
- -if {$23==1}
- e=0
- -elif {$23==2}
- e=1
- -else
- e={round(u)}
- -endif
- -if {$24==0}
- f={round((u*2.98)-0.49)}
- -elif {$24==1}
- f={round((u*2.98)+0.51)}
- -else
- f={($24)-2}
- -endif
- -_fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f}",{$25},0
- -endif
- -if {$26}
- nn={round(u)}
- -if {$nn}
- -if {$27==0}
- nch={round((u*33.98)-0.49)}
- -ac "-negate",{$nch}
- -else
- -ac "-negate",{$27}
- -endif
- -endif
- -endif
- -fx_adjust_colors 0,0,{$h},{$o},0,0
- -if {$30}
- -ac "-n 0,255",3
- -endif
- -done
- -if {$37==-180.1}
- hh=((u-0.5)*360)
- -else
- hh={$37}
- -endif
- -if {$38==-8.01}
- ss=((u-0.5)*2)
- -else
- ss={$38}
- -endif
- -if {$39==-20.01}
- vv=((u-0.5)*2)
- -else
- vv={$39}
- -endif
- -fx_mix_hsv {$j},{$hh},0,{$k},{$ss},0,{$l},{$vv},0,0,2,0
- -if {$-4}
- -ac "-n 0,255",{$-3}
- -endif
- fx_ultrawarpplusplusplusplus:
- index=0
- layers=l
- -repeat {max(0,$layers)}
- -ac[$index] "-ultrawarpplusplusplusplus $*",$-2,$-1
- -fx_adjust_colors[$index] 0,0,0,{(u-0.5)*200},0,0
- index={$index+1}
- -done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement