4
$\begingroup$

It is necessary to make the object constantly rotate randomly when the animation starts using "frame" python keyword (nothing bad if they are sharp jumps from one angle to another). In this regard, 2 questions:

  1. Why doesn't my scheme work (what does the red line mean?) enter image description here
  2. How to do random rotation correctly?
$\endgroup$

2 Answers 2

3
$\begingroup$

You can solve this relatively easily with the help of the node Noise Texture:

enter image description here

Here I use Scene Time as base value and a very low value for Noise Scale.

The node Noise Texture produces values somewhere between $(0,0,0)$ and $(1,1,1)$, which I map with Map Range to a rotation range from $-2\pi$ to $2\pi$.

With this solution you get different rotations over your whole timeline without (visible) repetition.

$\endgroup$
3
$\begingroup$

you could e.g. use this node setup:

enter image description here

result:

enter image description here

The red line means: this connection is forbidden and won't do anything.

You connected a circle (one value) with diamond (means field value = multiple values). That's not allowed.

Note: GN as well as Blender inside always works with radians, not with degrees. So you won't be happy with random values from 0 to 360. Better take 0 to 2*pi.

if you want to transform just one object, use this:

enter image description here

The ID will be filled with a constant integer with transforms the field value of the random value node to a single value node.

UPDATE:

ok, here you are:

enter image description here

$\endgroup$
2
  • $\begingroup$ This is closer to what I'm aiming for, but if you turn on the animation for a long distance, you can see a cyclic algorithm by which the object rotates, that is, it's not completely random rotation. $\endgroup$
    – arachnoden
    Commented Jul 10, 2022 at 12:07
  • $\begingroup$ i updated my answer - now with sharp jumps $\endgroup$
    – Chris
    Commented Jul 10, 2022 at 13:20

You must log in to answer this question.

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