0
$\begingroup$

I have a simple double array made with mesh line and instances on points and i want to rotate each block individually, but it seems it is only rotating the Mesh lines instead. For example, look at how along the 2nd array all rotations are equal, because the random value is only affecting the 1st array.
enter image description hereenter image description here

I've tried adding a Rotate Instances node, but it's rotating everything along the 2nd axis. Adding a random value to the 2nd array presents the same problem (except it rotates each line individually, but still not each cube) enter image description hereenter image description here

So far adding the random value to the first array has given me the closest result to what i want. But i can't come up with the real solution, Thanks in advance! -Albert

$\endgroup$
2
  • $\begingroup$ Do you need the double array, or could you use a Grid, to save a few nodes? $\endgroup$
    – Robin Betts
    Dec 31, 2022 at 12:59
  • 1
    $\begingroup$ @RobinBetts Thank you! This worked exactly how i wanted after adding a random value to rotation, as it treats each instance individually. Tbh I didn't even know Grid node existed so thank you again for that. If you want to add this comment as an Answer then I'll mark it as correct $\endgroup$
    – Legeo
    Dec 31, 2022 at 13:14

2 Answers 2

1
$\begingroup$

Not exactly an answer to your question, but it turns out that in your case, you can simplify the tree by using a Mesh Primitive > Grid, (or maybe even two of them) instead of constructing a 2D array by hand:

enter image description here

$\endgroup$
3
  • $\begingroup$ @vklidu Doooohhh! I seem to have developed a bad habit, and gone Instance-on-Points blind! I only popped this one in because OP asked me to, and to close it out.. I'll correct it when I can. $\endgroup$
    – Robin Betts
    Dec 31, 2022 at 19:44
  • 1
    $\begingroup$ Not necessary ... I was curious what I missed here. "See" you at incoming New Year (3 hours lefts) ... $\endgroup$
    – vklidu
    Dec 31, 2022 at 20:10
  • $\begingroup$ @vklidu You too! Have a very good one! $\endgroup$
    – Robin Betts
    Dec 31, 2022 at 20:44
1
$\begingroup$

It is actually possible to achieve exactly what you wanted.

enter image description here

You need to realize your instances and get geometric center of elements by scaling them to zero and then merge them to one point per element/island (or you can get them another way, you just need exactly one point per each element). Then rotate them along the pivots using vector rotate and set position nodes. See this group:

enter image description here

Finally, to get your random rotation per object, group random values by island index like this:

enter image description here

Here is complete GN setup:

enter image description here

$\endgroup$

You must log in to answer this question.

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