Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

deadpixel

Opus Pattern Grid

Hi Houdini hive-mind

new here (sort of)

looking for some advice on how I might be able to create a grid where the cells are arranged in an opus pattern.

I have a cell of a minimum dimension (lets say 200x200), I want to be able to have the other cells multiple dimension of that in x and y.  (400x800, 600x400 or even 200x2000 for example).

Crucially there are no L shaped/tetris type arrangments.

Im fairly sure it involves making a grid of cells with the minimum size, and making random selections to delete and build bigger patches, but not sure the best way to go about it without creating odd shapes.

I've reached my intelligence limit, and I defer to clever folk here for any kind suggestions (or of course, solutions posted elsewhere)

Thanks

CY9QScd.jpg

opus.png

19_76randompattern.gif

1 person likes this

Share this post


Link to post
Share on other sites

I'm very curious, about this too. I'm moving today so I don't have access to phone. One I know bad idea would be to copy boxes to the point with random scale, the biggest one select first and remove from the group, and you can perform a check for over lap. And then correspondingly add smaller boxes.... A better idea is to use the same vine growth method with food, but in vex... A third idea would be to use a noise function and clamp to 5-6 tiers. I think there is a function in vex(math in general) that does this. No guarantee there would be not be an L, but you may be able to pick an appropriate noise function for the variety like a small perlin. Good luck. Hope u solve it.

1 person likes this

Share this post


Link to post
Share on other sites

Hi,

I don't know how to make it mathematically.

Here you can find different Opus Pattern:

https://www.mandarinstone.com/advice-and-support/stone-layouts/

As you can see most pattern are based on a 7x7 grid layout. There are mostly 4 different tile types with a aspect ratio relationship. (A=3x2 units, B=2x2 units, C=2x1 units, D=1x1 units). So you can use the points of  7x7 grid and assign scaling attributes to the points according to the type of opus pattern and copy a 1x1 tile to the points with the scaling attributes.

Hope that helps...

 

OpusPatternTool.hiplc

1 person likes this

Share this post


Link to post
Share on other sites

here's my attempt....it has a bit more randomizations...but also more 'blocky' cuz my approach is to repeat a 3x3 block...a variety of them...(plus another excuse to practice For Loop...)

 

vu_opus_grid_1.00.zip

1 person likes this

Share this post


Link to post
Share on other sites

It's just a start, but you could turn colorful points into quads and let them randomly overwrite each other.

opus_pattern2.hipnc

opus_pattern.png

Edited by konstantin magnus
Highlighted the nodes that randomize the pattern.
2 people like this

Share this post


Link to post
Share on other sites

I guess you could check for every patch if the area is equal to the width*height, if not its an "L" shape and should be split.
Fixing the corner shapes is probably the biggest challenge of this pattern, while also maintaining the larger block shapes.

1 person likes this

Share this post


Link to post
Share on other sites
1 hour ago, acey195 said:

I guess you could check for every patch if the area is equal to the width*height, if not its an "L" shape and should be split.
Fixing the corner shapes is probably the biggest challenge of this pattern, while also maintaining the larger block shapes.

this is the logic I'm trying to work with (get 'box' of section, measure area of box vs section, if not equal then it is an irregular shape, then also must be equal or less than 6 times a 'unit' area) but..struggling with recursive coding...(clustering into 2 smaller pieces)

Edited by Noobini
1 person likes this

Share this post


Link to post
Share on other sites

wow, thanks so much to everyone for all these great ideas, I have been playing with them all and I really appreciate it.

 

I have tried a few things now.

I had started by using using a voronoi cluster and fracture similar to the method as outlined on @mestela's cgwiki , but I could never quite get the level of control vs randomness I wanted.  I also struggled to get rid of the L/Tetris shape, although I did try a similar approach as outlined by some of you.

However I recently stumbled upon a thread with a brilliant solution from @trandzik which absolutely nails what I am trying to achieve  and I can adapt it very well to my particular needs.  Thank you so much Peter.

A super-cute and most unexpected side-effect of playing about with his setup today, (and throwing in some symmetry and random deletion) - I inadvertently ended up with a pretty excellent space invader generator!

See attached :D

 

 

spaceInvaders2.gif

Edited by deadpixel
smaller gif size
1 person likes this

Share this post


Link to post
Share on other sites

Playing with Konstantin's setup with an extrude sop and a for loop

 

 

greeble (1).jpg

Edited by loudsubs
2 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now