1
$\begingroup$

The following images show what I want to achieve with animation nodes.

enter image description here enter image description here enter image description here

So far I came up with this, but I have no idea how to combine them or if I'm on the right track:

Random transform & rotation enter image description here Transform and rotation around local axis enter image description here

If someone can help me with this, I would be very grateful.

$\endgroup$

1 Answer 1

2
$\begingroup$

You can randomly distribute points in a circle with a generator. Don't forget to slice the last element since it will be the center of the circle.

enter image description here

Add your empty's position to translate your circle points.

enter image description here

Add your cube, scale it accordingly and apply the transform with CTRL + A. Then instance it and use the previous coordinates.

enter image description here

Add a random array of vectors for the rotation. You can tweak the seed in the node.

enter image description here

Add a vector wiggle node for location. You can tweak the seed and the evolution for a nice wiggle effect. You can also use this node for the rotation to achieve the same effect. Add a float input for the amplitude of the translation.

enter image description here

Add a relevant shader to the base cube :

enter image description here

Now make it wiggle !

enter image description here

Result :

enter image description here

EDIT : Actually I didn't answer the question. You can do the actual rotation several ways. Here's how I would do it :

Create a subprogram and rotate the cubes along the Y axis, then around the Z axis so that they face the center of the circle.

enter image description here enter image description here

Actual result :

enter image description here

$\endgroup$
5
  • 1
    $\begingroup$ Very nice and a very clear explanation! I will try it today if I get the chance, but it must go right with your clear explanation :) Thank you very much Gorgious! $\endgroup$
    – Vince
    Commented Jun 5, 2020 at 12:19
  • $\begingroup$ Hi Gorgious, I'm almost there, Just one question: What type of iterator did you use in the subpogram named Y? $\endgroup$
    – Vince
    Commented Jun 7, 2020 at 17:27
  • 1
    $\begingroup$ I believe it is a float. Note that you can directly drag from the "iterator" output to the input of the combine XYZ node, it will automatically create an interator with the right type $\endgroup$
    – Gorgious
    Commented Jun 7, 2020 at 20:39
  • $\begingroup$ Oh yeah, I missed that one, didn't know that was possible. It all works now! Thanks very much! $\endgroup$
    – Vince
    Commented Jun 8, 2020 at 9:12
  • $\begingroup$ Yes it's pretty handy ! As you noticed you have to be aware that the new iterator takes the name of the input label, so you can can't know the type right away anymore. Glad it helped :) $\endgroup$
    – Gorgious
    Commented Jun 8, 2020 at 9:16

You must log in to answer this question.

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