Packing Flooring Boards
-
Suppose I want to create a floor from individual cubes, representing flooring planks, where the width and height of the cubes is the same but they vary in length, say 10cm, 2cm, [30, 50, 70, 100cm] (x,y,z).
How could I distribute these in a procedural manner so that the different lengths appeared randomly and the cubes were all snugged together and oriented along their z-axis?
I've tried Cloners with various Effectors (Random and Push Apart), the Distribution nodes in the Scene Node editor, Fracture Object, and a few others.
Thanks,
Greg -
Hi Greg,
There is no default option for this.
It needs some work to create (minutes), but then you can have a wide variety.First, set up a standard board and clone it ten times in a row.
Current State to Clone, then Connect and delete.
Create copies from it. Move the neighbor points in the line direction.
I created each line of ten boards differently. I used the Rectangle Selection for it and then moved the points.
Check out the files Cube 0.0 to Cube 0.4, which are individual versions. Cube 0.5 to Cube0.9 are copies.This goes under Cloner, set to Blend, on Clone (yes, just one. This gets the Random Effector, Noise, and Modify Clones, Uncheck Position (Parameters)
The Single Clone Cloner is then a child of the Cloner that sets the long "Ten Tile" lines as an entire floor.The Random Effector will not blend between them, so the dimensions are each time different.
Explore the Effector Tab section of the Random Effector in the file.Materials can be set via Selection Tags. Typically, they don't blend, but that is another theme.
… and yes, real random leads sometimes lined up boards. Never matching an edge is not full random
https://stcineversityprod02.blob.core.windows.net/$web/Cineversity_Forum_Support/2024_PROJECTS_DRS/20240228_CV4_2024_drs_24_MGfl_02.c4d.zip
Cheers
-
@Dr-Sassi Thanks Dr. Sassi!!
I found this person, https://aturtur.com/about/ searching the web. He has a bunch of scripts, including some Python Effectors. One of the Phtyon Effectors does exactly what I needed so I can stay more procedural. It produces a nice result.
Thanks,
Greg! -
Hi Greg,
Thanks for the feedback.
My best wishes for your project
-
Here's a link to a render I created using the 'Pile Up' Python Effector. Fairly decent but it is a bit particular. Seemed to work for only a linear cloner so had to create multiple. But, almost completely procdedural except for the meshes of the boards themselves. I probably could have used a parametric cube for the boards and still got a pretty good outcome.
Here's the image I rendered:
https://www.dropbox.com/scl/fi/abqw189rrscvldt78zp26/AV00CC-Mar24_1.1.3.png?rlkey=vf14sewgzx0ppstjfuruftfli&dl=0
Greg
-
Hi Greg,
Thanks for the image. It's nice to see you get the results you like.
As mentioned here:
https://cineversity.forums.maxon.net/topic/1001/use-frame-number-to-drive-seed-in-a-random-effector-and-dome-light-color
Please no code in the forum.Would you mind removing the Python scripts link? I discussed it internally a while ago, and any script belongs in the Developer Cafe. Not here.
I can't check if the code is OK or not, nor if it is changed over time and contains things that might harm our users. This is a general decision.
Sorry about that. We need to keep it safe here. Python can read from the hard drive and connect outside of your hardware, so if you trust the source, that is your decision, but I can't leave it here.
Thank you very much for understanding.
All the best
-
Ok, done. Sorry for the confusion. I guess I thought that you don't want to discuss or have actual code here. I understand now your intent!
Cheers,
Greg -
Hi Greg,
Thanks for getting my intention.
My best wishes