4
$\begingroup$

I can rotate instances by a specific amount. What I can't figure it out, is the way to rotate each instance, around its own normal with a specific amount for its rotation. I want to rotate each cube in this example by 5 degrees, this means, the first index(0) should have rotation = 0, and index(1), should have a rotation amount of 5, and so on. This rotation only happens around instance normal, or local axis. I don't know how to create a for loop in the Geometry node and for each instance apply something like (i + 5 degree). I appreciate any help here.

enter image description here.

And here is the example that I tried to incorporate index:

enter image description here

enter image description here

$\endgroup$
6
  • $\begingroup$ Add the following after Instance on Points: Index * Angle (in radians!) -> Rotate Instances (Local Space) $\endgroup$
    – quellenform
    Commented Sep 3, 2022 at 1:45
  • $\begingroup$ @quellenform thanks for that. I updated my question with another screenshot and tried to follow what you explained. It doesn't work as I expected. Did I follow your instruction correctly, Thanks for your help. $\endgroup$
    – Mehr
    Commented Sep 3, 2022 at 4:05
  • $\begingroup$ @Mehr: you just added 1 to index. That's why quellenform wrote: in radians. And he wrote: multiply. Degree go from 0 to 360, but radians from 0 to 2*pi. Maybe read here about radians: en.wikipedia.org/wiki/Radian and i am pretty sure you don't want to rotate all axis by your angle, so you should plug in a combine xyz node before plugging it into rotation. $\endgroup$
    – Chris
    Commented Sep 3, 2022 at 6:36
  • $\begingroup$ Thanks, @Chris, I tried multiplying as well and used a radiant value of 2*pi . For some reason, I can't manage to rotate each instance around their local X-axis. Please refer to the last image I just uploaded. $\endgroup$
    – Mehr
    Commented Sep 3, 2022 at 7:48
  • $\begingroup$ Divide 2*pi first by 55: index*(2pi/55). ...i will soon post the answer $\endgroup$
    – quellenform
    Commented Sep 3, 2022 at 7:52

2 Answers 2

3
$\begingroup$

The easiest way might be to simply use a curve created with Curve Circle as a base and convert it into points. This way you get the necessary rotation as a starting point.

The circle is best created with a defined number of points, and if you divide $2\pi$ by this number of points, you get an angle that you can multiply directly with your index.

If you then combine the previously obtained rotation with this calculated angle in the node Rotate Euler (Local), you will get exactly the rotation you are looking for for your instances.

enter image description here PS: I've hidden the sockets/options here to save space, in case you're wondering where the inputs/outputs went.


(Blender 3.1+)

$\endgroup$
2
  • $\begingroup$ Thank you so much, it works perfectly. Much appreciated. $\endgroup$
    – Mehr
    Commented Sep 3, 2022 at 10:07
  • $\begingroup$ @Mehr You are welcome! $\endgroup$
    – quellenform
    Commented Sep 3, 2022 at 10:19
1
$\begingroup$

Here I found it. Multiply the index with the degrees you wanted in the y-axis

Hope it helps. enter image description here

$\endgroup$
3
  • $\begingroup$ Tip: The Math node has its own option called To Radians. $\endgroup$
    – quellenform
    Commented Sep 3, 2022 at 9:33
  • $\begingroup$ Thanks, Muzammil, your solution works as well. Appreciate your help. $\endgroup$
    – Mehr
    Commented Sep 3, 2022 at 10:26
  • $\begingroup$ Thanks, I never look at that. $\endgroup$
    – Muzammil
    Commented Sep 3, 2022 at 17:05

You must log in to answer this question.

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