6
$\begingroup$

I'm quite new to Geometry Nodes -- please forgive the ignorance!

Here I'm using a Line node for a point instance array. The object I'm instancing, for this demonstration, is a rudimentary arrow and monkey. How far I've gotten... Note how the Line node's "Count" integer is linked to the Group Input. Having control over the exact number of instances is important to my procedure, as the number of required monkeys could range anywhere from 1 to 25, or more.

What I'd like to accomplish with geometry nodes is to flip (-1 on the X axis) every other instance of the object, like so: enter image description here

I've searched around, and the only clues I've found involve randomly assigning transformations. What I need to accomplish, however, is an alternating pattern between two per-determined transformations (1, and -1).

Any help would be appreciated!

$\endgroup$
3
  • 1
    $\begingroup$ just a hint for future questions: please do write all restrictions and prerequisites in your questions and don't think they are kind of self-evident. we (who want to answer) cannot read your mind and so we both don't waste our time on answer you cannot use. $\endgroup$
    – Chris
    Aug 20 at 7:47
  • $\begingroup$ Absolutely! Thank you very much for your help. I'm quite new to all this, but I'll try to be more thorough in future questions. I hope it wasn't too much trouble for you to rewrite your answer! $\endgroup$
    – LittleAden
    Aug 20 at 10:17
  • $\begingroup$ you are welcome! $\endgroup$
    – Chris
    Aug 20 at 14:33
6
$\begingroup$

One thing i am pretty sure of, now you will update your question again and say "yeah, but the offset isn't working now". Yes, but you didn't say that in your question too ;) But here is the solution for your next (future) question update:

enter image description here

UPDATE: new solution for added new restriction to question:

enter image description here

result:

enter image description here

OLD ANSWER

you can do it with this node setup:

enter image description here

result:

enter image description here

It just copies the point instance again, but rotates it (point rotate) and moves it (point translate) before instancing.

$\endgroup$
2
  • $\begingroup$ This gets very close to my goal! However... the only problem I have with this solution is the fact that increasing the Line node's Count integer increases the number of monkeys by two, instead of just one. I'll edit my post to better reflect that control over the exact number of instances is part of my goal. I didn't realize a solution could be this straight-forward, but I will try to find a way to make it viable for my application! $\endgroup$
    – LittleAden
    Aug 20 at 3:51
  • $\begingroup$ i update my answer $\endgroup$
    – Chris
    Aug 20 at 7:28
6
$\begingroup$

Even Chris answer is correct, I think this is too complicated, so I decided to make a simpler node setup:

enter image description here

The key function of this setup is modulo function (Attribute Math node). It produces 0 value on every odd point, and you can use it to rotate every even point.

BTW if you want to rotate on 90 degrees, just type pi/2 in the field

UPD. @Chris: It's not a big problem. You can achieve this by this setup:

enter image description here

$\endgroup$
3
  • $\begingroup$ Although Chris's answer is already working for my project at the moment, I'll give this one a whirl as well, once I get the chance. Thank you for answering! $\endgroup$
    – LittleAden
    Aug 20 at 10:20
  • $\begingroup$ @Crantisz: well done! +1 $\endgroup$
    – Chris
    Aug 20 at 14:55
  • 1
    $\begingroup$ just a small remark: if you would have taken the offset as vector as i have, i think you would have needed 1 more node too....😉 $\endgroup$
    – Chris
    Aug 20 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.