Creed31 Posted January 6, 2020 Share Posted January 6, 2020 Hi, I'm looking for a way to create random quads, so that it will look something like that: I'm looking for a generator though since (1) I want to create it on a somewhat big resolution (1024x1024) (2) I want the squares to be smaller than the picture (3) I want the lines to align together and be straight Any ideas how can on create such a texture, hopefully not manually? Quote Link to comment Share on other sites More sharing options...
Eli Posted January 6, 2020 Share Posted January 6, 2020 It may help if you explain the purpose of your quads. Quote Link to comment Share on other sites More sharing options...
Reptillian Posted January 6, 2020 Share Posted January 6, 2020 (edited) 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. Edited January 6, 2020 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
Red ochre Posted January 6, 2020 Share Posted January 6, 2020 Cuboids Use on an opaque layer then reduce face opacity in the effect and play with the settings. Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
Reptillian Posted January 6, 2020 Share Posted January 6, 2020 (edited) 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. Edited January 6, 2020 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted January 7, 2020 Share Posted January 7, 2020 I posted this reply yesterday - but it didn't appear. *shrugs* Random quads: 1. On a transparent layer render a Random Maze 1 from this plugin pack: MadJik's Plugins 2. Add a new layer and run the plugin again. 3. Flip the last layer for different combinations. It's not perfect - but it should give you a great starting point. 1 Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Creed31 Posted January 7, 2020 Author Share Posted January 7, 2020 Eli - they are used as a texture so there isn't much "purpose". Just something I want to create I guess Reptillian - what's g'mic? what is that code? how are they related? anywhere I can read about the 2? Red Ochre - Really cool plugin! The quads either align too well (which is a simple grid) or not, but I'm not strict about it so I'll play with it - might like the result. Thanks! Ego Eram Reputo - Awesome! I loved how you took the plugin and combined the layers together. Really cool trick! Quote Link to comment Share on other sites More sharing options...
Reptillian Posted January 7, 2020 Share Posted January 7, 2020 (edited) 4 hours ago, Creed31 said: Reptillian - what's g'mic? what is that code? how are they related? anywhere I can read about the 2? 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. Edited January 7, 2020 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
TrevorOutlaw Posted January 7, 2020 Share Posted January 7, 2020 @Creed31, you could also try Fibonacci Fill plugin. I realize it will not generate random rectangles you want, but if you think outside the box for a bit, you could use magic wand to select a rectangle generated by the Fibonacci Fill plugin, copy it, and paste it on a transparent layer. It would be worth exploring. Quote Paint.NET Gallery | Remove Foreground Object Tutorial | Dispersion Effect Tutorial Link to comment Share on other sites More sharing options...
Reptillian Posted January 8, 2020 Share Posted January 8, 2020 (edited) 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. Edited January 8, 2020 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
HyReZ Posted January 8, 2020 Share Posted January 8, 2020 Wow! That is a nice accomplishment! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.