Advertisement
Guest User

Untitled

a guest
Apr 10th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.50 KB | None | 0 0
  1. #@gui _<b>Artistic</b>
  2.  
  3. #@gui UltraWarp++++ : fx_ultrawarpplusplusplusplus, fx_ultrawarpplusplusplusplus(1)
  4. #@gui : note = note("Sequence of multiple partially-randomised texture generation and image deformation filters with multi-iteration warping")
  5. #@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()
  6. #@gui : 1. Quick Refresh Button = bool(0)
  7. #@gui : sep = separator()
  8. #@gui : 2. Plasma Texture [Discards input image] = bool(0)
  9. #@gui : 3. Plasma Scale = float(3.3,0,20)
  10. #@gui : 4. Plasma Alpha Channel = bool(0)
  11. #@gui : sep = separator()
  12. #@gui : 5. Segmentation [no alpha channel] = bool(0)
  13. #@gui : 6. Edge Threshold = float (5,0.01,60)
  14. #@gui : 7. Smoothness = float (0,0,60)
  15. #@gui : sep = separator()
  16. #@gui : 8. Blur = float (0,0,30)
  17. #@gui : sep = separator()
  18. #@gui : 9. Quadtree Pixelisation [no alpha channel] = bool(0)
  19. #@gui : 10. Quadtree Min Precision = int(4,2,2048)
  20. #@gui : 11. Quadtree Max Precision = int(256,0,2048)
  21. #@gui : 12. Quadtree Min Homogeneity = float(4.8,0,5)
  22. #@gui : 13. Quadtree Max Homogeneity = float(5,0,5)
  23. #@gui : sep = separator()
  24. #@gui : 14. Noise Type = choice(2,"Gaussian","Uniform","Salt and pepper","Poisson")
  25. #@gui : 15. Minimum Noise = float(0,0,8)
  26. #@gui : 16. Maximum Noise = float(0,0,8)
  27. #@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]")
  28. #@gui : sep = separator(), note = note("<small>Warping</small>")
  29. #@gui : 18. Warp Iterations = int(3,0,30)
  30. #@gui : 19. Warp Intensity = float(3,0,10)
  31. #@gui : 20. Warp Offset = float(20,0,2000)
  32. #@gui : 21. Scale to Width = bool(1)
  33. #@gui : 22. Scale to Height = bool(1)
  34. #@gui : 23. Correlated Channels = choice("Random","Off","On")
  35. #@gui : 24. Boundary = choice(5,"Random","Random [non-transparent]","Transparent","Nearest","Periodic", "Mirror")
  36. #@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]")
  37. #@gui : 26. Random Negation = bool(1)
  38. #@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]")
  39. #@gui : 28. Gamma Offset = float(0.25,0,1)
  40. #@gui : 29. Hue Offset = float(1,0,1)
  41. #@gui : 30. Normalise = bool(1)
  42. #@gui : sep = separator(), note = note("<small>Final HSV Scaling</small>")
  43. #@gui : 31. Minimum Hue = float(0,0,20)
  44. #@gui : 32. Maximum Hue = float(5,0,20)
  45. #@gui : 33. Minimum Saturation = float(0,0,20)
  46. #@gui : 34. Maximum Saturation = float(3,0,20)
  47. #@gui : 35. Minimum Value = float(0.5,0,20)
  48. #@gui : 36. Maximum Value = float(2,0,20)
  49. #@gui : note = note("<small>Set these to their minimum values for randomisation</small>")
  50. #@gui : 37. Hue Offset = float(-180.01, -180.01, 180)
  51. #@gui : 38. Saturation Offset = float(0, -1.01, 1)
  52. #@gui : 39. Value Offset = float(0,-20.01,20)
  53. #@gui : sep = separator(),
  54. #@gui : -4. Normalise = bool(1)
  55. #@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]")
  56. #@gui : sep = separator(),
  57. #@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]")
  58. #@gui : -1. Value action = choice("None","Cut","Normalize")
  59.  
  60. ultrawarpplusplusplusplus:
  61.  
  62. # plasma rendering and pixelisation followed by random warp with gamma and hue randomisation and final HSV scaling
  63.  
  64. hue_min={$31}
  65. hue_max={$32}
  66. sat_min={$33}
  67. sat_max={$34}
  68. val_min={$35}
  69. val_max={$36}
  70.  
  71. j={min($hue_min,$hue_max)+(u*(max($hue_min,$hue_max)-min($hue_min,$hue_max)))}
  72. k={min($sat_min,$sat_max)+(u*(max($sat_min,$sat_max)-min($sat_min,$sat_max)))}
  73. l={min($val_min,$val_max)+(u*(max($val_min,$val_max)-min($val_min,$val_max)))}
  74.  
  75. -if {$2}
  76.  
  77. -if {$4} ch=0 -else ch=2 -endif
  78.  
  79. -ac "rr={round(u*255)}
  80. gg={round(u*255)}
  81. bb={round(u*255)}
  82.  
  83. -fx_plasma 0.5,0,{$3},1,1,{$rr},{$gg},{$bb}
  84. -if {$4} -to_rgba -else ch=2 -to_rgb -endif",{$ch}
  85.  
  86. -endif
  87.  
  88. -fx_gaussian_blur {$8},0,0,1,2,0,0
  89.  
  90. n_min={$15}
  91. n_max={$16}
  92.  
  93. -if {$n_min > $n_max}
  94. n_min = {$n_min + $n_max}
  95. n_max = {$n_min - $n_max}
  96. n_min = {$n_min - $n_max}
  97. -endif
  98.  
  99. noise_exp={max(0,$n_min+(u*($n_max-$n_min)))}
  100. n_amt={(2^($noise_exp-3))*$noise_exp}
  101.  
  102. -if {$5}
  103. -fx_segment_watershed {$6},{$7},0,2,0
  104. -endif
  105. -if {$9}
  106.  
  107. p_min={$10}
  108. p_max={$11}
  109. h_min={$12}
  110. h_max={$13}
  111.  
  112. -if {$p_min > $p_max}
  113. p_min = {$p_min + $p_max}
  114. p_max = {$p_min - $p_max}
  115. p_min = {$p_min - $p_max}
  116. -endif
  117.  
  118. -if {$h_min > $h_max}
  119. h_min = {$h_min + $h_max}
  120. h_max = {$h_min - $h_max}
  121. h_min = {$h_min - $h_max}
  122. -endif
  123.  
  124. -fx_noise {$n_amt},{$14},{$17},1,0
  125. -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
  126.  
  127. -endif
  128.  
  129. -fx_noise {$n_amt},{$14},{$17},1,0
  130.  
  131. f={$18} # iterations
  132. i={$19} # warp intensity
  133. m={$20} # offset magnitude
  134. s={$28} # gamma
  135. v={$29} # hue
  136.  
  137. -repeat {max(0,$f)}
  138.  
  139. -if {$21}
  140. scale_x=w/10
  141. a={((2^($19-5))*$19)*(u-0.5)*$scale_x*0.025}
  142. -else
  143. scale_x=1
  144. a={((2^($19-5))*$19)*(u-0.5)}
  145. -endif
  146. -if {$22}
  147. scale_y=h/10
  148. b={((2^($19-5))*$19)*(u-0.5)*$scale_y*0.025}
  149. -else
  150. scale_y=1
  151. b={((2^($19-5))*$19)*(u-0.5)}
  152. -endif
  153. c=(u-0.5)*$m*sign($m)*$scale_x
  154. d=(u-0.5)*$m*sign($m)*$scale_y
  155. g={round((u*33.98)-0.49)}
  156. h={(u-0.5)*$s*200}
  157. o={(u-0.5)*$v*200}
  158.  
  159. -if {$23==1}
  160. e=0
  161. -elif {$23==2}
  162. e=1
  163. -else
  164. e={round(u)}
  165. -endif
  166.  
  167. -if {$24==0}
  168. f={round((u*2.98)-0.49)}
  169. -elif {$24==1}
  170. f={round((u*2.98)+0.51)}
  171. -else
  172. f={($24)-2}
  173. -endif
  174.  
  175.  
  176. -if {$25==0}
  177. -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
  178. -else
  179. -ac "-if {$21}
  180. scale_x=w/10
  181. a={((2^($19-5))*$19)*(u-0.5)*$scale_x*0.025}
  182. -else
  183. scale_x=1
  184. a={((2^($19-5))*$19)*(u-0.5)}
  185. -endif
  186. -if {$22}
  187. scale_y=h/10
  188. b={((2^($19-5))*$19)*(u-0.5)*$scale_y*0.025}
  189. -else
  190. scale_y=1
  191. b={((2^($19-5))*$19)*(u-0.5)}
  192. -endif
  193.  
  194. c={(u-0.5)*$20*sign($20)*$scale_x}
  195. d={(u-0.5)*$20*sign($20)*$scale_y}
  196.  
  197.  
  198. -if {$23==1}
  199. e=0
  200. -elif {$23==2}
  201. e=1
  202. -else
  203. e={round(u)}
  204. -endif
  205.  
  206. -if {$24==0}
  207. f={round((u*2.98)-0.49)}
  208. -elif {$24==1}
  209. f={round((u*2.98)+0.51)}
  210. -else
  211. f={($24)-2}
  212. -endif
  213.  
  214.  
  215. -_fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f}",{$25},0
  216. -endif
  217.  
  218.  
  219. -if {$26}
  220. nn={round(u)}
  221. -if {$nn}
  222. -if {$27==0}
  223. nch={round((u*33.98)-0.49)}
  224. -ac "-negate",{$nch}
  225. -else
  226. -ac "-negate",{$27}
  227. -endif
  228. -endif
  229. -endif
  230. -fx_adjust_colors 0,0,{$h},{$o},0,0
  231.  
  232.  
  233.  
  234. -if {$30}
  235. -ac "-n 0,255",3
  236. -endif
  237.  
  238. -done
  239.  
  240. -if {$37==-180.1}
  241. hh=((u-0.5)*360)
  242. -else
  243. hh={$37}
  244. -endif
  245. -if {$38==-8.01}
  246. ss=((u-0.5)*2)
  247. -else
  248. ss={$38}
  249. -endif
  250. -if {$39==-20.01}
  251. vv=((u-0.5)*2)
  252. -else
  253. vv={$39}
  254. -endif
  255.  
  256. -fx_mix_hsv {$j},{$hh},0,{$k},{$ss},0,{$l},{$vv},0,0,2,0
  257.  
  258. -if {$-4}
  259. -ac "-n 0,255",{$-3}
  260. -endif
  261.  
  262. fx_ultrawarpplusplusplusplus:
  263.  
  264. index=0
  265. layers=l
  266.  
  267. -repeat {max(0,$layers)}
  268. -ac[$index] "-ultrawarpplusplusplusplus $*",$-2,$-1
  269. -fx_adjust_colors[$index] 0,0,0,{(u-0.5)*200},0,0
  270. index={$index+1}
  271. -done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement