CINEVERSITY

    Maxon Logo
    • Login
    • Search
    • Recent
    • Popular
    • Users
    • Groups

    Show/hide clones according to a specific pattern

    Question & Answers
    2
    4
    112
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      eclipse-planet last edited by

      Say you have a Cloner with 9 clones in a 3x3 grid like in the image below:

      image-00.jpg

      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:

      image-01.jpg

      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.

      1 Reply Last reply Reply Quote
      • Dr. Sassi
        Dr. Sassi last edited by Dr. Sassi

        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.c4d

        How 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

        Dr. Sassi Sassmannshausen Ph.D.
        Senior Trainer, Maxon Master Trainer, L&D - Strategist
        Cinema 4D mentor since 2004, Member of VES, DCS.

        1 Reply Last reply Reply Quote
        • E
          eclipse-planet last edited by

          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.

          1. 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".

          2. Add a Plane with a Store Selection node as a child.

          3. Add a Cloner with a your desired clone object.

          4. Set the "Width Segments" and "Height Segments" fields of the Plane to your desired grid size. In my case it's a 3x3 grid.

          5. Set the Cloner to "Object" mode and drag the Plane into the "Object" field. Set "Distribution" to "Polygon Center".

          6. 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.

          7. Hide the Plane and paste the list of indices into the "Selection String" field of the Store Selection node.

          That's it.

          Thanks again.

          1 Reply Last reply Reply Quote
          • Dr. Sassi
            Dr. Sassi last edited by

            Thank you very much for your feedback, eclipse-planet.

            Sounds good!

            My best wishes for your project.

            Dr. Sassi Sassmannshausen Ph.D.
            Senior Trainer, Maxon Master Trainer, L&D - Strategist
            Cinema 4D mentor since 2004, Member of VES, DCS.

            1 Reply Last reply Reply Quote
            • First post
              Last post