I have only changed joan_rake.gmic from my own branch in gmic for testing purpose, and the main change I wanted to show is that I have added triangle wave function into cascading self-glitching. If all goes well, I’ll have to do a pull request modifying Joan_Rake.gmic file as he’s not here anymore.
Here’s a sample with smooth modulo also known as triangle wave
I made my own command, and I think I might be able to make my own self-cascading glitch with the modulo modes.
Behold the result of this command!
Also, to filter developers, I have modified modo cli a bit. I’ll have to update it though I don’t think anyone is using those yet. modf is usable, but modo should not be used. modf can be used for anything related to gradient editing when last variable is at 0. Because of modo, and modf, I can attempt to make a universal sawtoother. Here’s the code so far
#@gui Advanced Sawtoother : fx_modulo, fx_modulo_preview(0)
#@gui : note = note("This filter utilize various forms of modulo operations at once per different channels or multiple channels at once."), sep = separator()
#@gui : 1. Color Space Model = choice(0,"RGB-8","CMY-8","HSI-8","HSL-8","HSV-8","LAB-8","LCH-8","YUV-8","XYZ-8")
#@gui : sep = separator(), note = note("<b>Master Channel Editor</b>")
#@gui : Use Master Editor? = bool(1)
#@gui : 1. Edit Channel #1? = bool(1)
#@gui : 2. Edit Channel #2? = bool(1)
#@gui : 3. Edit Channel #3? = bool(1)
#@gui : 4. Edit Alpha Channel? = bool(0)
#@gui : 5. Treat Alpha Layers as the blend of each other instead? = bool(1)
#@gui : 6. Modulo Shift = float(0,-2,2)
#@gui : 7. Max End Value of Modulo Shift = float(255,0,512)
#@gui : 8. Modulo Shift Mode = choice(0,"Regular","Continuous")
#@gui : 9. Treat Modulo Shift as interchanging blending? = bool(0)
#@gui : 10. Modulo Division = float(1,0,1)
#@gui : 11. Max End Value of Modulo Division = float(255,0,512)
#@gui : 12. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 13. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : 14. Regular Modulo = float(1,0,1)
#@gui : 15. Max End Value of Modulo Division = float(255,0,512)
#@gui : 16. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 17. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : 18. Smoothness = float(0,0,32)
#@gui : sep = separator(), note = note("<b>Individual Channel Editor</b>\n\n")
#@gui : sep = separator(),19. Edit Channel #1 = bool(1)
#@gui : 20. Modulo Shift = float(0,-2,2)
#@gui : 21. Max End Value of Modulo Shift = float(255,0,512)
#@gui : 22. Modulo Shift Mode = choice(0,"Regular","Continuous")
#@gui : 23. Treat Modulo Shift as interchanging blending? = bool(0)
#@gui : 24. Modulo Division = float(1,0,1)
#@gui : 25. Max End Value of Modulo Division = float(255,0,512)
#@gui : 26. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 27. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : 28. Regular Modulo = float(1,0,1)
#@gui : 29. Max End Value of Modulo Division = float(255,0,512)
#@gui : 30. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 31. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : 32. Smoothness = float(0,0,32)
#@gui : sep = separator(), 33. Edit Channel #2 = bool(1)
#@gui : 34. Modulo Shift = float(0,-2,2)
#@gui : 35. Max End Value of Modulo Shift = float(255,0,512)
#@gui : 36. Modulo Shift Mode = choice(0,"Regular","Continuous")
#@gui : 37. Treat Modulo Shift as interchanging blending? = bool(0)
#@gui : 38. Modulo Division = float(1,0,1)
#@gui : 39. Max End Value of Modulo Division = float(255,0,512)
#@gui : 40. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 41. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : 42. Regular Modulo = float(1,0,1)
#@gui : 43. Max End Value of Modulo Division = float(255,0,512)
#@gui : 44. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 45. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : 46. Smoothness = float(0,0,32)
#@gui : sep = separator(), 47. Edit Channel #3 = bool(1)
#@gui : 48. Modulo Shift = float(0,-2,2)
#@gui : 49. Max End Value of Modulo Shift = float(255,0,512)
#@gui : 50. Modulo Shift Mode = choice(0,"Regular","Continuous")
#@gui : 51. Treat Modulo Shift as interchanging blending? = bool(0)
#@gui : 52. Modulo Division = float(1,0,1)
#@gui : 53. Max End Value of Modulo Division = float(255,0,512)
#@gui : 54. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 55. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : 56. Regular Modulo = float(1,0,1)
#@gui : 57. Max End Value of Modulo Division = float(255,0,512)
#@gui : 58. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 59. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : 60. Smoothness = float(0,0,32)
#@gui : sep = separator(), 61. Edit Alpha Layers? = bool(1)
#@gui : 62. Treat alpha as blending modes ignoring modulo operation? = bool(1)
#@gui : 63. Modulo Shift = float(0,-2,2)
#@gui : 64. Max End Value of Modulo Shift = float(255,0,512)
#@gui : 65. Modulo Shift Mode = choice(0,"Regular","Continuous")
#@gui : 66. Treat Modulo Shift as interchanging blending? = bool(0)
#@gui : 67. Modulo Division = float(1,0,1)
#@gui : 68. Max End Value of Modulo Division = float(255,0,512)
#@gui : 69. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 70. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : 71. Regular Modulo = float(1,0,1)
#@gui : 72. Max End Value of Modulo Division = float(255,0,512)
#@gui : 73. Modulo Division Mode = choice(0,"Regular","Continuous")
#@gui : 74. Treat Modulo Division as interchanging blending? = bool(0)
#@gui : sep = separator(), note = note("<small>Author : <i>Reptorian</i>. Latest update : <i>2018/08/18</i>.</small>")
fx_modulo:
_fx_modulo:
fx_modulo_preview :
Got some more updates - Now, a PNG filter is on it way to being born
iw=w
ih=h
repeat 4 1,{$ih},1,1 done l[1] noise 100 +noise 100 n 0,255 blend multiply n 0,1 f "round(i^2)" n 0,255 endl l[3] noise 1000 blur 10 n 0,125 endl l[4] to_rgb noise 10000 (255,0,0,0,255,255^0,255,0,255,0,255^0,0,255,255,255,0) index[0] [1],0,1 rm[1] endl
r[1-4] {w#5},{h#5},1,3,1
f[2] "x" n[2] 0,255 f[2] "i>i#3?0:255" rm[3] blend[1,2] multiply luminance[1] a[1,2] c blend difference