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 HyperWarp+ : hyperwarpplus, hyperwarpplus(1)
- #@gui : note = note("(Optional plasma rendering and pixelisation followed by) random warp with gamma and hue randomisation and final HSV scaling"), sep = separator()
- #@gui : Plasma Texture = bool(0)
- #@gui : Warp Iterations = int(5,1,30)
- #@gui : Warp Intensity = float(1,0,30)
- #@gui : Warp Offset = int(5,0,2000)
- #@gui : Gamma Offset = float(0.25,0,1)
- #@gui : Hue Offset = float(1,0,1)
- #@gui : sep = separator(), note = note("<small>Final HSV Scaling</small>")
- #@gui : Minimum Hue = float(0,0,20)
- #@gui : Maximum Hue = float(5,0,20)
- #@gui : Minimum Saturation = float(0.5,0,20)
- #@gui : Maximum Saturation = float(5,0,20)
- #@gui : Minimum Value = float(0,0,20)
- #@gui : Maximum Value = float(5,0,20)
- # plasma rendering and pixelisation followed by random warp with gamma and hue randomisation and final HSV scaling
- -if {!$1}
- -fx_plasma 0.5,0,8,1,0,128,128,128
- pixel_x={round(u*7.498+3.501)}
- pixel_y={round(u*7.498+3.501)}
- # embedded samj_Contours_Gros_Pixels
- Flou=0.5
- Isophotes_Nb_Levels=10
- Dilatation=2
- Gros_Pixels_X={$pixel_x}
- Gros_Pixels_Y={$pixel_y}
- Quantize_Levels=100
- Couleur=1.25
- Transparence=0
- Valider_Edges=0
- Threshold_Edges=15
- Colorisation=0
- Alpha_Colorisation=0
- Mode_blend=22
- Opacity_blend=1
- -to_rgb[-1]
- -blur[-1] $Flou
- -isophotes[-1] $Isophotes_Nb_Levels
- -if {$Dilatation>0}
- -dilate_circ[-1] $Dilatation
- -endif
- -if {$Valider_Edges==1}
- -if {$Colorisation==1}
- --Je_passe_l_hiver_en_Floride[-1]
- -pow[-2] $Couleur
- -dilate_circ[-2] $Dilatation
- -endif
- -endif
- # Partie code filtre Tetris
- 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
- -pow[-1] $Couleur
- -if {$Transparence==1}
- -to_rgba[-1]
- -else
- -to_rgb[-1]
- -endif
- -if {$Valider_Edges==1}
- -edges[-1] $Threshold_Edges%
- -n[-1] 0,255
- -to_rgb[-1]
- -if {$Colorisation==1}
- -n[-2] 0,255
- -if {$Alpha_Colorisation==0}
- -to_rgb[-2]
- -endif
- -gimp_blend_1651[-2,-1] $Mode_blend,2,$Opacity_blend,0 # add
- -endif
- -endif
- -endif
- f={!$2} # iterations
- i={!$3} # warp intensity
- m={!$4} # offset magnitude
- s={!$5} # gamma
- v={!$6} # hue
- hue_min={!$7}
- hue_max={!$8}
- sat_min={!$9}
- sat_max={!$10}
- val_min={!$11}
- val_max={!$12}
- -if {$hue_min > $hue_max}
- hue_min = {$hue_min + $hue_max}
- hue_max = {$hue_min - $hue_max}
- hue_min = {$hue_min - $hue_max}
- -endif
- -if {$sat_min > $sat_max}
- sat_min = {$sat_min + $sat_max}
- sat_max = {$sat_min - $sat_max}
- sat_min = {$sat_min - $sat_max}
- -endif
- -if {$val_min > $val_max}
- val_min = {$val_min + $val_max}
- val_max = {$val_min - $val_max}
- val_min = {$val_min - $val_max}
- -endif
- -repeat {$f*sign($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)
- e={round(u)}
- f={round((u*2.98)+0.51)}
- g={round((u*33.98)-0.49)}
- h=(u-0.5)*$s*200
- i=(u-0.5)*$v*200
- -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
- -fx_adjust_colors 0,0,{$h},{$i},0,0
- -done
- j={$hue_min+(u*($hue_max-$hue_min))}
- k={$sat_min+(u*($sat_max-$sat_min))}
- l={$val_min+(u*($val_max-$val_min))}
- -fx_mix_hsv {$j},0,0,{$k},0,0,{$l},0,0,0,2,0
- -fx_warp_by_intensity {$a},{$b},{$c},{$d},{$e},0,{$f},{$g},0
- hyperwarpplus_preview:
- -gui_split_preview "-hyperwarpplus $*",$-1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement