Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #@gui UltraWarp++++ : fx_ultrawarp4plus, fx_ultrawarp4plus_preview(1)
- #@gui : note = note("A 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. This original version has been kept alive despite being slower than UltraWarp 2.</small>"), sep = separator()
- #@gui : 0. Recompute = button(0)
- #@gui : sep = separator()
- #@gui : 1. Plasma Texture [Discards Input Image] = bool(0)
- #@gui : 2. Plasma Scale = float(3.3,0,20)
- #@gui : 3. Plasma Alpha Channel = bool(0)
- #@gui : sep = separator()
- #@gui : 4. Segmentation [No Alpha Channel] = bool(0)
- #@gui : 5. Edge Threshold = float (5,0.01,60)
- #@gui : 6. Smoothness = float (0,0,60)
- #@gui : sep = separator()
- #@gui : 7. Blur = float (0,0,30)
- #@gui : sep = separator()
- #@gui : 8. Quadtree Pixelisation [No Alpha Channel] = bool(0)
- #@gui : 9. Quadtree Min Precision = int(4,2,8192)
- #@gui : 10. Quadtree Max Precision = int(256,0,8192)
- #@gui : 11. Quadtree Min Homogeneity = float(4.8,0,5)
- #@gui : 12. Quadtree Max Homogeneity = float(5,0,5)
- #@gui : sep = separator()
- #@gui : 13. Noise Type = choice(2,"Gaussian","Uniform","Salt and pepper","Poisson")
- #@gui : 14. Minimum Noise = float(0,0,8)
- #@gui : 15. Maximum Noise = float(0,0,8)
- #@gui : 16. 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 : 17. Warp Iterations = int(3,0,30)
- #@gui : 18. Warp Intensity = float(3,0,10)
- #@gui : 19. Warp Offset = float(20,0,2000)
- #@gui : 20. Scale to Width = bool(1)
- #@gui : 21. Scale to Height = bool(1)
- #@gui : 22. Correlated Channels = choice("Random","Off","On")
- #@gui : 23. Boundary = choice(5,"Random","Random [non-transparent]","Transparent","Nearest","Periodic", "Mirror")
- #@gui : 24. 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 : 25. Random Negation = bool(1)
- #@gui : 26. 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 : 27. Gamma Offset = float(0.25,0,1)
- #@gui : 28. Hue Offset = float(1,0,1)
- #@gui : 29. Normalise = bool(1)
- #@gui : sep = separator(), note = note("<small>Final HSV Scaling</small>")
- #@gui : 30. Minimum Hue = float(0,0,20)
- #@gui : 31. Maximum Hue = float(5,0,20)
- #@gui : 32. Minimum Saturation = float(0,0,20)
- #@gui : 33. Maximum Saturation = float(3,0,20)
- #@gui : 34. Minimum Value = float(0.5,0,20)
- #@gui : 35. Maximum Value = float(2,0,20)
- #@gui : note = note("<small>Set these to their minimum values for randomisation</small>")
- #@gui : 36. Hue Offset = float(-180, -180, 180)
- #@gui : 37. Saturation Offset = float(0, -1.01, 1)
- #@gui : 38. 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")
- ultrawarp4plus:
- hue_min={$30}
- hue_max={$31}
- sat_min={$32}
- sat_max={$33}
- val_min={$34}
- val_max={$35}
- 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 {$1}
- if {$2} ch=0 else ch=2 fi
- ac "rr={round(u*255)}
- gg={round(u*255)}
- bb={round(u*255)}
- fx_plasma 0.5,0,{$2},1,1,{$rr},{$gg},{$bb}
- if {$3} to_rgba else ch=2 to_rgb fi",{$ch} fi
- fx_gaussian_blur {$7},0,0,1,2,0,0
- n_min=$14
- n_max=$15
- if $n_min>$n_max
- n_min=$n_min + $n_max
- n_max=$n_min - $n_max
- n_min=$n_min - $n_max
- fi
- noise_exp={max(0,$n_min+(u*($n_max-$n_min)))}
- n_amt={(2^($noise_exp-3))*$noise_exp}
- if {$4} fx_segment_watershed {$5},{$6},0,2,0 fi
- if {$8}
- p_min={$9}
- p_max={$10}
- h_min={$11}
- h_max={$12}
- if $p_min>$p_max
- p_min=$p_min + $p_max
- p_max=$p_min - $p_max
- p_min=$p_min - $p_max
- fi
- if $h_min>$h_max
- h_min=$h_min + $h_max
- h_max=$h_min - $h_max
- h_min=$h_min - $h_max
- fi
- ac "noise "$n_amt",$13",$16,1
- 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
- fi
- ac "noise "$n_amt",$13",$16,1
- f={$17}
- i={$18}
- m={$19}
- s={$27}
- v={$28}
- repeat {max(0,$f)}
- if {$20}
- scale_x=w/10
- a={((2^($18-5))*$18)*(u-0.5)*$scale_x*0.025}
- else
- scale_x=1
- a={((2^($18-5))*$18)*(u-0.5)}
- fi
- if {$22}
- scale_y=h/10
- b={((2^($18-5))*$18)*(u-0.5)*$scale_y*0.025}
- else
- scale_y=1
- b={((2^($18-5))*$18)*(u-0.5)}
- fi
- 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(-100,100)}
- o={u(-100,100)}
- if {$22==1}
- e=0
- elif {$22==2}
- e=1
- else
- e={round(u)}
- fi
- if {$23==0}
- f={round((u*2.98)-0.49)}
- elif {$23==1}
- f={round((u*2.98)+0.51)}
- else
- f={($23)-2}
- fi
- ac "_fx_warp_by_intensity "{$a}","{$b}","{$c}","{$d}","{$e}",0,"{$f}"",{$24},0
- if {$25}
- nn={round(u)}
- if {$nn}
- if {$26==0}
- nch={round((u*33.98)-0.49)}
- ac "negate",{$nch}
- else
- ac "negate",{$26}
- fi
- fi
- fi
- fx_adjust_colors 0,0,{$h},{$o},0,0
- if {$29}
- ac "n 0,255",3
- fi
- done
- if {$36==-180}
- hh=((u-0.5)*360)
- else
- hh={$36}
- fi
- if {$37==-8.01}
- ss=((u-0.5)*2)
- else
- ss={$37}
- fi
- if {$38==-20.01}
- vv=((u-0.5)*2)
- else
- vv={$38}
- fi
- fx_mix_hsv {$j},{$hh},0,{$k},{$ss},0,{$l},{$vv},0,0,2,0
- if {$-2}
- ac "n 0,255",{$-1}
- fi
- fx_ultrawarp4plus:
- repeat $! l[$>]
- ac "ultrawarp4plus ${2--3}",$-2,$-1
- fx_adjust_colors 0,0,0,{(u-0.5)*200},0,0
- endl done
- fx_ultrawarp4plus_preview:
- fx_ultrawarp4plus $*
Advertisement
Add Comment
Please, Sign In to add comment