Jump to content

Reptillian

Members
  • Posts

    1,239
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Reptillian

  1. You're gonna have to resort to vector apps for this.
  2. I have something here @Creed31 . Is this something you want? Colored version (with predefined palette) Black and White version Using Image to define the color These are made with the recent filters I have made using the G'MIC QT scripting language. If you want it, I'll let you know when they're pushed to G'MIC-QT.
  3. Thanks for splitting it so anyone that would like to solve the problem can do so here. I got some progress on solving the square and rectangle problem. square_size=50 mw=${-max_w} mh=${-max_h} nvw={ceil($mw/$square_size)} nvh={ceil($mh/$square_size)} $nvw,$nvh,1,1 eval ${-math_lib}" xx=0; yy=0; v=0; const msize=1; select_two=vector2(0); select_three=vector(3); for(p=0,p<wh#-1,p++, brk_point=0; nxx_left=xx-1; if(nxx_left<0,nxx_left=w#-1-1;); nxx_right=xx+1; if(nxx_right>=w#-1,nxx_right=0;); nyy_top=yy-1; if(nyy_top<0,nxx_top=h#-1-1;); nyy_bottom=yy+1; if(nyy_bottom>=h#-1,nxx_bottom=0;); selectable=!i(#-1,nxx_left,yy)+!i(#-1,nxx_right,yy)+!i(#-1,xx,nyy_top)+!i(#-1,xx,nyy_bottom); if(selectable==1, if(!i(#-1,nxx_left,yy),dir=0;); if(!i(#-1,xx,nyy_top),dir=1;); if(!i(#-1,nxx_right,yy),dir=2;); if(!i(#-1,xx,nyy_bottom),dir=3;);, if(selectable==2, if(!i(#-1,nxx_left,yy),select_two[brk_point]=0;brk_point++;); if(!i(#-1,xx,nyy_top),select_two[brk_point]=1;brk_point++;); if(!i(#-1,nxx_right,yy)&&brk_point<2,select_two[brk_point]=2;brk_point++;); if(!i(#-1,xx,nyy_bottom)&&brk_point<2,select_two[brk_point]=3;); find_dir=round(u(0,1)); dir=select_two[find_dir];, if(selectable==3, if(!i(#-1,nxx_left,yy),select_three[brk_point]=0;brk_point++;); if(!i(#-1,xx,nyy_top),select_three[brk_point]=1;brk_point++;); if(!i(#-1,nxx_right,yy),select_three[brk_point]=2;brk_point++;); if(!i(#-1,xx,nyy_bottom)&&brk_point<3,select_three[brk_point]=3;); find_dir=round(u(0,2)); dir=select_three[find_dir];, xx=w#-1-1; yy=h#-1-1; do(xx--; do(yy--; ,yy>0&&i(#-1,xx,yy)>0); ,xx>0&&i(#-1,xx,yy)>0); ); ); ); if(selectable, if(!p,cdir=dir); if(cdir!=dir,v=ceil(v/msize)*(msize-1);cdir=dir;,v+=round(u(0,msize-1));); if(dir==0,i(#-1,nxx_left,yy)=v; xx=nxx_left;, if(dir==1,i(#-1,xx,nyy_top)=v; yy=nyy_top;, if(dir==2,i(#-1,nxx_right,yy)=v; xx=nxx_right;, i(#-1,xx,nyy_bottom)=v; yy=nyy_bottom; ); ); ); ,i(#-1,xx,yy)=v; ); v++; ); " label. 0,1 EDIT: I figured it out. The newly created vector would be used as reference for finding rectangles and square. EDIT: Actually, never mind, there's still work to do. EDIT: Closest solution here.
  4. G'MIC is a plugin for Paint.NET, and it is a image processing library. Those are the WIP codes to attempt to solve the problem of creating only rectangle and squares with random layout. It is a very interesting problem because no one else has solved it. The attempt to solve it has been split into a different thread in plugin development.
  5. @Ego Eram Reputo Can you move this to the plugin development section? The reason why is that I'm trying to develop a solution here to this problem, and it would be more observable to plugin developer. Even though I'm not using c#, some of the codes here are directly translate-able. But this depends if someone wants to collaborate with me even with language barrier regarding g'mic and c#. The code isn't actually finished, but it's a starting point as the newly created vector is what's going to define rectangle and squares. size_sqr=50 mw=${-max_w} #Find maximum images width# mh=${-max_h} #Find maximum images height# lw={ceil($mw/$size_sqr)*$size_sqr+2} #Find nearest value to the nearest multiple of size_sqr# lh={ceil($mh/$size_sqr)*$size_sqr+2} #Find nearest value to the nearest multiple of size_sqr# $lw,$lh,100%,1,"x==0||x==w-1||y==0||y==h-1?1" #Create 2D vector of size iw,ih. The part between "" is a formula to fill the values of vector# #Below can be directly translated to codelab provided a vector or something, can it?# eval ${-math_lib}" xx=1; yy=1; val=1; selectable_2=vector2(0); selectable_3=vector3(0); const msize=3; do( selectable_size=0;brk_point=0; if(!i(#-1,xx-1,yy),selectable_size++;); if(!i(#-1,xx+1,yy),selectable_size++;); if(!i(#-1,xx,yy+1),selectable_size++;); if(!i(#-1,xx,yy-1),selectable_size++;); if(selectable_size==4,dir=round(u(0,3)); ,if(selectable_size==1, if(!i(#-1,xx-1,yy),dir=0;); if(!i(#-1,xx+1,yy),dir=1;); if(!i(#-1,xx,yy+1),dir=2;); if(!i(#-1,xx,yy-1),dir=3;); , if(!i(#-1,xx-1,yy),brk_point++;); if(!i(#-1,xx+1,yy),if(selectable_size==2,selectable_2[brk_point]=1;,selectable_3[brk_point]=1;);brk_point++;); if(brk_point<selectable_size,if(!i(#-1,xx,yy+1),if(selectable_size==2,selectable_2[brk_point]=2;,selectable_3[brk_point]=2;);brk_point++;);); if(brk_point<selectable_size,if(!i(#-1,xx,yy-1),if(selectable_size==2,selectable_2[brk_point]=3;,selectable_3[brk_point]=3;););); if(selectable_size==2, sdir=round(u(0,1)); dir=selectable_2[sdir]; , sdir=round(u(0,2)); dir=selectable_2[sdir]; ); ); ); mdist=round(u(1,msize)); cl=0; if(dir==0, do(xx--;i(#-1,xx,yy)=val;cl++;,cl<mdist||!i(#-1,xx-1,yy));, if(dir==1, do(xx++;i(#-1,xx,yy)=val;cl++;,cl<mdist||!i(#-1,xx+1,yy));, if(dir==2, do(yy++;i(#-1,xx,yy)=val;cl++;,cl<mdist||!i(#-1,xx,yy+1));, do(yy--;i(#-1,xx,yy)=val;cl++;,cl<mdist||!i(#-1,xx,yy-1)); ); ); ); val+=1;,!i(#-1,xx-1,yy)||!i(#-1,xx+1,yy)||!i(#-1,xx,yy-1)||!i(#-1,xx,yy+1) ); "
  6. I have attempted to search a solution and tried coding it, I do find this problem to be difficult because no one has coded up a random texture generator with squares and rectangles connecting to each other. For reference, here's my current g'mic code. repeat $! l[$>] new_dimension_w={ceil(w/50)*50+1} new_dimension_h={ceil(h/50)*50+1} r $new_dimension_w,$new_dimension_h,100%,1 f. "begin(qmd=50;); xor(x%qmd?0:1,y%qmd?0:1); " label_fg 0,0 f. "begin(T=vectoriM(0); for(v=1,v<iM-1,v++, T[v]=round(u(0,1)); ); ); if(i,T[i]);; " f. " A=i(x-2,y)+i(x+2,y)+i(x,y+2)+i(x,y-2)>=2?1:0; B=i(x-1,y)+i(x+1,y)+i(x,y+1)+i(x,y-1)>=2?1:0; A+B==2?1:i; " endl done r is resize ; I resized it into 1 channel with the nearest number to the multiples of a variable number. f is fill vector from left to right and top to bottom label_fg basically finds the shape and fill them 50 is a variable. First fill generates a grid. Second fill finds the lines and removes some of them. Third fill fills the missing dots. The problem now is to get it into square and rectangle form. Another solution I can think of in theory is to use multiple fills, and using a master fill to determine the end fill. I'm not sure how to explain that.
  7. Could go with Clouds, then G'MIC QuadTree Variation. There might be a few more step here. I think I might code something up here btw.
  8. Ok, made another version of Majority. One that is based on average rather than threshold. Refresh filters.
  9. I have made a new filter named Majority. Yes, it operates on the very same principles as the one MadJik has made, but extended. It has arrived by the way.
  10. @welshblue Not to get offtopic, but wanted to comment though. At first I was expecting a grim reaper, but I like that take nonetheless.
  11. Here's some new changes. Some of my filters have been moved to Distortions and Rendering. Nebulous is under Rendering now. The only fixes that would be needed to them are cosmetic fixes basically as in better description/grammar and forgotten credits (distortions part needs attribution which I will do even if I mentioned who did the original version @Asmageddon Prince before). They don't have bugs otherwise. Thorn Fractal has been upgraded. Now, you can insert custom alternating formula. EDIT: Definitely here. Refresh filters.
  12. Surprise news, I am now a official collaborator of gmic-community, no longer I'll have to make PR.
  13. Minor update, 2 of my projects has been closed. I completed modf, and I have managed to make rep_tfrac more maintainable. modf calculates the result the fastest way I can get it to. For Projects reference: 1.Add support for custom palette for Autofill Coloring Book 2.Upgrade Construction Material Texture 3.Recreate all of MadJik plugins with extension - Permission has been given by MadJik to reverse-engineer those plugins. Ask MadJik if you want confirmation. 4.Create g'mic gossamer 5.Create my own version of gossamer. No reverse engineering has been done. - See Joan Rake's G'MIC Pseudo-ECB. I am upgrading that. Note - modf is basically the g'mic version of Image Modulo Toolkit I have made for Paint.NET. Pull Request Link - https://github.com/dtschump/gmic-community/pull/239
  14. 8-bit as in 255 colors? That's not done by G'MIC, but by saving. You can do it on several page by using GIMP or Krita and apply to all layers and/or you can do it through cli, and in that case PM me.
  15. Did you try afre_cleantext? You need to refresh, then search clean.
  16. There's also the idea of 3d modeling them. If you want to go insane, 3d model them using a text editor (I kid here).
  17. For the float version of the overlay blending mode formula - a-base b-blend f(a,b)= a<.5 ? 2ab : 1-2(1-a)(1-b) ; This implies that the ranges has to be normalized to 0-1 ranges before calculation.
  18. You could use a calculator to calculate the size. 100%=1 150%*75=112.5 That's a workaround.
  19. Added projects to my own g'mic community fork. Also, my g'mic community fork has been updated. https://github.com/Reptorian1125/gmic-community/projects These are the list of projects to do. Recreate all of MadJik plugins with extension - Permission has been given by MadJik to reverse-engineer those plugins. Ask MadJik if you want confirmation. Create g'mic gossamer - Create my own version of gossamer. No reverse engineering has been done. Update modular_formula - N/A Update Pseudo-ECB script - See Joan Rake's G'MIC Pseudo-ECB. I am upgrading that.
  20. Actually never mind... I don't think I have a confirmed way to work with G'MIC Perspective Streak utilizing different output options. I'm working on a PDN tutorial to work with it.
  21. Is there anything like a color curve filter being influenced by another channel? For better explanation on what it is as I have a hard time explaining.
  22. Perspective Streak and Axis Streak now has officially arrived!
  23. Ok, it been almost a day since the filters has been pushed by G'MIC maintainer. Is anyone able to get the updates? I wasn't able to see Perspective Streak nor Axis Streak. Maybe tomorrow, they'll be here.
  24. I'm thinking of a better name. Is 'Modulus Operation' is a better name or is 'Modular Formula' better for this plugin. The second one tells what it does better than the first in my opinion.
×
×
  • Create New...