8
$\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, 2021 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, 2021 at 10:17
  • $\begingroup$ you are welcome! $\endgroup$
    – Chris
    Aug 20, 2021 at 14:33

3 Answers 3

8
$\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, 2021 at 3:51
  • $\begingroup$ i update my answer $\endgroup$
    – Chris
    Aug 20, 2021 at 7:28
9
$\begingroup$

Even though Chris answer is correct, I think it 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$
4
  • $\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, 2021 at 10:20
  • $\begingroup$ @Crantisz: well done! +1 $\endgroup$
    – Chris
    Aug 20, 2021 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, 2021 at 14:58
  • 1
    $\begingroup$ I don't think this works in Blender 3.x $\endgroup$
    – Neil
    Feb 17, 2022 at 19:22
2
$\begingroup$

The question has been bumped, so here's the Blender 3.x and 4.x way to do it:

$3.142$ is the $π$ which is $180°$ expressed in radians. Rather than typing the 3.1415 into the field, you can type pi or radians(180).

(Tested on 3.0.1)

$\endgroup$

You must log in to answer this question.

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