Author Topic: Panels insterstices size based on number of them  (Read 441 times)

Hi there,
I need some help here with a panels generator I want to try as an excercise.
I've used a bricks node and I want them to have gaps between them. But the panels' numbers can be non uniform, so may end up with a texture with 4x8 panels.
So, I want the interstices to be of the same size vertically or horizontally, like in this screenshot:



How could I do that?
I thought to do a function that could take the ratio between the vertical and horizontal bricks (so 4x4=1 but 8x4=2 and 2x4=0.5) and then use that to multiply the desired thickness by that ratio.
This is my attempt:



My math knowledge is very poor, so any help is appreciated. Thanks

OK, I was overcomplicating things so much. It was as easy as giving the bricks a random grayscale and apply an edge detect after it with the desired thickness.
Thanks anyway! :)