Perlin Noise Flow Field

Hello there!

so I’m programming an installation on growth, more precisely plant growth. I’ll be taking live data such as weight, temperature, noise, maybe a Kinect and some other stuff from the person using the installation to generate a virtual “seed” to grow the plant from. My basic underlying algorithm will be a vector field based on Perlin Noise through which I’ll send particles that will finally form parts of my “plant”. Basically, each frame every particle checks its position on the vector field. It will then add the new vector to its current velocity and its new velocity to its current position, which generates smooth, root like patterns.
So far I have been working in Processing.py and I’m now trying to implement the same algorithm in TD, but I cannot seem to find an efficent way of doing so. I tried Metaballs, but those are way to resource intensive. I’m getting the RGB data from the Noise TOP and converting it to a table of values, which will be my vectors. So a RGB value of 0 would become an angle of 0, a value of 127 would be an angle of 180 and so on.

tl;dr

In short: I want to get down to each single particle, check its position on the screen and apply the respective force from the vector that it is currently on.

Regards to the great Daniel Shiffmann:
youtube.com/watch?v=BjoM9oKOAKY&t=397s

Cheers from Mainz,

Felix

2 Likes

hey Felix,

The approach here would be to consider doing this in CHOPs or as a shader. There are some good examples of approach to experiment with in the Generative Design port that Markus did some time ago. Look at the random and noise examples:

docs.derivative.ca/index.php?ti … ive_Design

Thanks for the quick reply! The examples are already helping me a lot. It seems like instancing from CHOPs and a bit of scripting is the way to go. Thanks a lot.

Hey @FTheo
I was quite happy reading your question, because i also tried recreate the Processing example from daniel Shiffman in TD. My TD expertise would be advanced beginner. Would it be possible to share some insights how to get to the desired aesthetics.
best regards
from Switzerland
felix :slight_smile:

Hello there,

you actually picked the ideal moment to ask. I just reworked my initial attempts a few weeks ago, now everything is working as initially intended. The shader I wrote is rather short and simple and each step is clearly commented. The information stored in the ‘positions’ CHOP is RG as XY and BA as the current velocity vector. You have three main variables to work with: max_speed (so your particles dont accellerate off screen after 3 frames), force_intensity (to control how much force the r and g channels of your input apply to your particles and finally vel_intensity (how much of the current speed is retained). You can and should tweak these values carefully. To convert the texture into instances for the geo to render I used one of Matthew Ragans tutorials.
One more thing to note: Daniel Shiffmann converted monochromatic noise into a flowfield, this one is a lot more versatile I’d argue. If you have any more questions, feel free to ask.

Greetings from Wismar, Germany

Also Felix

Flowfield.toe (8.4 KB)

1 Like

Hy Felix

Sorry for my very late reply! Thank you very much for sharing. It worked almost like as i wished, but on the Perfomance side it wasn’t as fluid as with processing or P5js. i wanted to map the physics of the partikel with faders & sliders… didnt work as fluid as i hoped.
Good thing though i started again with processing and gave myself a deep dive in the nature of code from shiffman!
thanks to your sketch :slight_smile:

grüsse aus der Schweiz :slight_smile:

Hey there,

the performance issues surprise me a little. The patch is surely not optimised to perfection, but processing being faster seems odd. Anyways. In the more recent TD releases, you can now instance geometry or particles directly from TOP to the GEO. I havent tried it yet as my version is a few years behind, but it might get you a decent performance boost. But if your processing patch is running just fine, then roll with it!

Regards,

Felix