Show/hide clones according to a specific pattern
-
Say you have a Cloner with 9 clones in a 3x3 grid like in the image below:
If I wanted to hide clones 1, 2, 5, and 7, I could use the MoGraph Selection tool and chose Hide Selected from the MoGraph menu to get this:
While manually selecting clones works for a small 3x3 grid, it becomes unfeasible for larger setups with tens of thousands of clones.
Is there any way to programmatically define a visibility pattern?
I've played around with Formulas, Python, and the MoGraph Selection node in XPresso, but I can't figure out how to do it.
I feel there must be a way to define an array like this [1, 0, 0, 1, 1, 0, 1, 0, 1] where 1 = "show" and 0 equals "hide", but I'm at a loss.
Any help would be appreciated.
-
Hi eclipse-planet,
What formula would you like to see for binary representation of clones? Typing 0 and 1 perhaps works more than the "paint" selection set on a clone setup.
In short, I need more details and more information.
Examples
CV4_2025_drs_25_MGfs_01.c4d
CV4_2025_drs_25_MGfs_11.c4dHow about a texture as a "field" in an Effector.
Anything Python is discussed in the Developer Café. Here, we do not exchange code snippets for security reasons, with no exceptions.
https://developers.maxon.net/forum/
I assume the simplest is to feed a List and read it ou, but that is for the Developer CaféAll the best
-
Thank you!
I was able to figure it out using the Store Selection node in the first example file you provided.
For anyone who comes across this in the future, here's what I did.
-
Using the same example as before, I converted my binary array into a list of indices representing only the clones I want to be visible. So [1, 0, 0, 1, 1, 0, 1, 0, 1] becomes "0,3,4,6,8".
-
Add a Plane with a Store Selection node as a child.
-
Add a Cloner with a your desired clone object.
-
Set the "Width Segments" and "Height Segments" fields of the Plane to your desired grid size. In my case it's a 3x3 grid.
-
Set the Cloner to "Object" mode and drag the Plane into the "Object" field. Set "Distribution" to "Polygon Center".
-
Give the Store Selection node a name (can be anything) to generate a "Polygon Selection Tag". Drag the resulting tag into the "Selection" field of the Cloner.
-
Hide the Plane and paste the list of indices into the "Selection String" field of the Store Selection node.
That's it.
Thanks again.
-
-
Thank you very much for your feedback, eclipse-planet.
Sounds good!
My best wishes for your project.