1
$\begingroup$

Recently upon viewing the "Procedural Fish Animation in Blender 3.0 Geometrynodes!" tutorial by Cartesian Caramel on youtube (link), I got the idea of applying this same movement to a swarm of particles (mesh to volume node-> distribute points in volume -> instance on points), where they would all be moving independently.

I feel like this should be easy to do but I'm not very good with geometry nodes. Attached is a file containing his node setup & a nonfunctional implementation of it on a swarm.

Thanks in advance!

(original nodetree from Cartesian Caramel absent in blend file, now amended)

$\endgroup$

1 Answer 1

1
$\begingroup$

Answer 1 - Particles

Result

Create an initial geometry nodes setup that simply creates the random attributes that are input to the animation nodes:

Random attributes nodes

With this, we basically don't touch anything in the original setup (other than the instance on points, that is added at the end)

It's important that this node group (or the original geometry) deliver the point cloud.

In the original nodes, we just add an instancer to the end, so we have instances but still not changing anything important:

Instance on points in original nodes

Then just give the attributes some names and pass these attributes from the first to the second node setup:

Passing attributes between nodes

(Use the sheet icons beside the inputs to switch between user input and attribute input)

Answer 2 - Multiple "jelly cubes"

Result for multiple jellos

Now, if your goal is to have the deformed jelly cube multiplied, then we need to instance the cubes first, and adapt the randomizer to use mesh islands as IDs:

Randomizer for islands

It's basically the same randomizer with three main differences:

  • We're instancing and realizing the cubes here in this node group
  • All random nodes get the "Mesh Island Index" as ID, so all points of a same island get the same random value.
  • The "center of rotation" uses a "mean position" of each island (calculated by the accumulate field nodes)

Of course in this case we don't use "instance on points" a the end of the original nodes.

File

Improvement tip - Randomize the noise!

Since the original nodes are using a noise, there is a pattern that is repeating for all instances.

We can randomize this noise by adding some random value to the W input of the noise. This will increase randomization without breaking the "fish" behavior.

Result with noise randomization

In the randomizer nodes, this means just another random node with island ID and with a great variation:

Extra random value

In the original nodes, we add this to the W input of the noises:

Adding to W

New file

This new file contains the noise variation.

$\endgroup$
7
  • $\begingroup$ yes having the simulated particle distributed in a volume is the first step, the problem is they will now all act the exact same way with the same movements. essentially i wanna take his nodetree used to simulate a swimming fish and use it to make several particles all moving with randomized locations and movement. i had some ideas about making the noise values it reads global so it would move differently according to its location but im not sure how to implement that. $\endgroup$ Commented Mar 28 at 16:13
  • 1
    $\begingroup$ @Stagbeetle, so, what about the fish movement? Is it irrelevant? Can it be totally random? $\endgroup$ Commented Mar 28 at 20:27
  • $\begingroup$ the fish movement, other than of course using the movement system designed by cartesian caramel can be random, aka if they go in random directions or intersect with each other it doesnt matter. only as i said i need to find some way to also modify his node setup so each particle once distributed in a volume will not have the exact same movement. $\endgroup$ Commented Mar 29 at 21:52
  • 1
    $\begingroup$ Not sure I understand.... do you want fish or random? Random is super easy, fish can get more complicated. Is it fish in different directions? Or just random is ok? $\endgroup$ Commented Mar 29 at 22:09
  • 1
    $\begingroup$ @Stagbeetle, check the updated answer $\endgroup$ Commented Mar 30 at 1:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.