Advertisement
Guest User

?

a guest
Jun 27th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.54 KB | None | 0 0
  1. #@gmic
  2. #
  3. # File : seriously.gmic
  4. # ( G'MIC commands file )
  5. #
  6. # Description : some rubbish
  7. #
  8. # Copyright : yeah no
  9. #
  10. # License : just don't expect a warranty
  11. #
  12. #@gui _<b>Deformations</b>
  13.  
  14. #@gui HyperWarp+ : hyperwarpplus, hyperwarpplus(1)
  15. #@gui : note = note("(Optional plasma rendering and pixelisation followed by) random warp with gamma and hue randomisation and final HSV scaling"), sep = separator()
  16. #@gui : Plasma Texture = bool(0)
  17. #@gui : Warp Iterations = int(5,1,30)
  18. #@gui : Warp Intensity = float(1,0,30)
  19. #@gui : Warp Offset = int(5,0,2000)
  20. #@gui : Gamma Offset = float(0.25,0,1)
  21. #@gui : Hue Offset = float(1,0,1)
  22. #@gui : sep = separator(), note = note("<small>Final HSV Scaling</small>")
  23. #@gui : Minimum Hue = float(0,0,20)
  24. #@gui : Maximum Hue = float(5,0,20)
  25. #@gui : Minimum Saturation = float(0.5,0,20)
  26. #@gui : Maximum Saturation = float(5,0,20)
  27. #@gui : Minimum Value = float(0,0,20)
  28. #@gui : Maximum Value = float(5,0,20)
  29.  
  30. # plasma rendering and pixelisation followed by random warp with gamma and hue randomisation and final HSV scaling
  31.  
  32. -if {!$1}
  33. -fx_plasma 0.5,0,8,1,0,128,128,128
  34.  
  35. pixel_x={round(u*7.498+3.501)}
  36. pixel_y={round(u*7.498+3.501)}
  37.  
  38. # embedded samj_Contours_Gros_Pixels
  39.  
  40. Flou=0.5
  41. Isophotes_Nb_Levels=10
  42. Dilatation=2
  43. Gros_Pixels_X={$pixel_x}
  44. Gros_Pixels_Y={$pixel_y}
  45. Quantize_Levels=100
  46. Couleur=1.25
  47. Transparence=0
  48. Valider_Edges=0
  49. Threshold_Edges=15
  50. Colorisation=0
  51. Alpha_Colorisation=0
  52. Mode_blend=22
  53. Opacity_blend=1
  54.  
  55. -to_rgb[-1]
  56. -blur[-1] $Flou
  57. -isophotes[-1] $Isophotes_Nb_Levels
  58. -if {$Dilatation>0}
  59. -dilate_circ[-1] $Dilatation
  60. -endif
  61. -if {$Valider_Edges==1}
  62. -if {$Colorisation==1}
  63. --Je_passe_l_hiver_en_Floride[-1]
  64. -pow[-2] $Couleur
  65. -dilate_circ[-2] $Dilatation
  66. -endif
  67. -endif
  68.  
  69.  
  70. # Partie code filtre Tetris
  71. wh={w},{h},1,{s} -r $Gros_Pixels_X%,$Gros_Pixels_Y%,10%,100%,2 -n[-1] 0,255 -quantize[-1] $Quantize_Levels,1,0 -r $wh
  72.  
  73. -pow[-1] $Couleur
  74. -if {$Transparence==1}
  75. -to_rgba[-1]
  76. -else
  77. -to_rgb[-1]
  78. -endif
  79. -if {$Valider_Edges==1}
  80. -edges[-1] $Threshold_Edges%
  81. -n[-1] 0,255
  82. -to_rgb[-1]
  83. -if {$Colorisation==1}
  84. -n[-2] 0,255
  85. -if {$Alpha_Colorisation==0}
  86. -to_rgb[-2]
  87. -endif
  88. -gimp_blend_1651[-2,-1] $Mode_blend,2,$Opacity_blend,0 # add
  89. -endif
  90. -endif
  91.  
  92. -endif
  93.  
  94. f={!$2} # iterations
  95. i={!$3} # warp intensity
  96. m={!$4} # offset magnitude
  97. s={!$5} # gamma
  98. v={!$6} # hue
  99.  
  100. hue_min={!$7}
  101. hue_max={!$8}
  102. sat_min={!$9}
  103. sat_max={!$10}
  104. val_min={!$11}
  105. val_max={!$12}
  106.  
  107. -if {$hue_min > $hue_max}
  108. hue_min = {$hue_min + $hue_max}
  109. hue_max = {$hue_min - $hue_max}
  110. hue_min = {$hue_min - $hue_max}
  111. -endif
  112.  
  113. -if {$sat_min > $sat_max}
  114. sat_min = {$sat_min + $sat_max}
  115. sat_max = {$sat_min - $sat_max}
  116. sat_min = {$sat_min - $sat_max}
  117. -endif
  118.  
  119. -if {$val_min > $val_max}
  120. val_min = {$val_min + $val_max}
  121. val_max = {$val_min - $val_max}
  122. val_min = {$val_min - $val_max}
  123. -endif
  124.  
  125. -repeat {$f*sign($f)}
  126.  
  127. a=(u-0.5)*$i
  128. b=(u-0.5)*$i
  129. c=(u-0.5)*$m*sign($m)
  130. d=(u-0.5)*$m*sign($m)
  131. e={round(u)}
  132. f={round((u*2.98)+0.51)}
  133. g={round((u*33.98)-0.49)}
  134. h=(u-0.5)*$s*200
  135. i=(u-0.5)*$v*200
  136.  
  137. -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
  138. -fx_adjust_colors 0,0,{$h},{$i},0,0
  139.  
  140. -done
  141.  
  142. j={$hue_min+(u*($hue_max-$hue_min))}
  143. k={$sat_min+(u*($sat_max-$sat_min))}
  144. l={$val_min+(u*($val_max-$val_min))}
  145.  
  146. -fx_mix_hsv {$j},0,0,{$k},0,0,{$l},0,0,0,2,0
  147. -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
  148.  
  149. hyperwarpplus_preview:
  150. -gui_split_preview "-hyperwarpplus $*",$-1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement