1
$\begingroup$

I learned how to randomly place the objects in the collection and let them be placed only once per object. enter image description here This object was used to prevent the same object from appearing twice. enter image description here Geometry node for this object. enter image description here This is the geometry node of the result. enter image description here This ensures that objects in the next collection are placed randomly and not repeatedly.

I want to know how to arrange this result additionally on the z-axis.

I want to know two ways.

  1. How to add it to the z-axis as the result below

  2. When the z-axis is arrayed,I want to make them have a different random arrangement than below.

$\endgroup$

1 Answer 1

1
$\begingroup$

I approached it as an integer sequence: Took your short random N-digits long sequence and put it several times in a row (see the table row A), then I took the source of random values again (with different seed) but this time I put each value N-times in a row (B), then I summed it up (Sum) and finally calculated its reminder after division by N. This way I kept the mutual uniqueness but mixed them at the cluster level (Mod).

enter image description here

The last row when divided to rows by cluster:

enter image description here

To implement it in GN I used your randomizing object two times (but I actually duplicated it and made seed as a modifier input attribute to improve randomness) and utilized the fact that depending on whether the object is created "As instance" or not, orders points in different manner (actually like A and B in the table). Then it was just a simple arithmetic as described above.

enter image description here

Randomizing only one row and then copy it is easy and can be made in many ways. I implemented a switch controlled by a modifier attribute. See results for switch on and off bellow:

enter image description here

enter image description here

It is not perfect. I am not so good at modular arithmetic to tell how good pseudo-random numbers it provide, but the fact is there are some seeds where it looks suspicious. Actually even your GN randomizing object isn't perfect - it works for given seed (0) just because of pure luck. Actually there is non-zero probability it returns just one vertex. To reduce this probability I recommend to increase the number of generated points to some humongous number.

$\endgroup$
4
  • $\begingroup$ Thank you for answering my question. Thank you for your kind reply and effort. If I use this method that I learned from the video, there will be a problem when increasing the count, and it happens here, too. If i add objects to the collection and adjust the count accordingly, there are objects that are repeated, but isn't this method itself not good? Is there a way to make this easier and without errors? If you have any reference materials, please recommend them. $\endgroup$
    – loejua2332
    Commented Jan 18, 2023 at 12:22
  • $\begingroup$ Hi, you're welcome. What video? Did I miss something? I assume you learned that randomizing method from a video. But problem lays apparently there. I just used what you got and applied it to more rows. And no, I don't currently know better method for variating the objects without repeating. I found randomizing in GN rather problematic in general so far. I'll try to think about it once I get some time. Afaik in Blender 3.5 there should be loops, that could solve this easily. $\endgroup$
    – Vajtus
    Commented Jan 18, 2023 at 13:05
  • $\begingroup$ I found better randomizer here: blender.stackexchange.com/questions/265202/… Works really good. It was even possible to get rid of those helper objects, but It turned out the modulation of individual lines is also a weakness. In this way, it is possible to create as many permutations as there are items on the row. Once there are more rows, the permutations start repeating. $\endgroup$
    – Vajtus
    Commented Jan 19, 2023 at 9:02
  • $\begingroup$ Thank you very much for your answer. I will refer to the data you recommended. Thank you $\endgroup$
    – loejua2332
    Commented Jan 19, 2023 at 12:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .