Noise function?

I want to create an organic pattern like plasma or lava. Many examples use a noise function (like Perlin noise). Is a noise function required or are there other ways to do this?

Here’s an example project that used a noise function - https://www.instructables.com/id/LED-Flame-Controlled-by-Noise/

That’s funny, I was just in a wikipedia hole last night on OpenSimplex, Worley noise, and diamond-square.

I don’t think these are based on Perlin noise, but check out the “plasma 3D” and “cube fire 3D” patterns in the pattern library. Both render down to 2D.

I think they’re based on the Plasma concept in the bidouille.org link in this post.

1 Like

@jeff thanks for the reply.

From the previews both Plasma 3D and Fire Cube 3D look interesting, but they both render poorly on a LED strip.

I’m hoping for something that looks like a 1 pixel horizontal or vertical slice from something like this;

Here’s a Perlin noise generator I just ported.

Perlin Noise 2D.epe (10.8 KB)

It’s not up to my normal standards for posting to the patterns library, but it seems to be working!

I threw in a 1D render() for you to try out as well.

Note that I think most plasma effects, including the one you posted, will be cycling a thinner stripe through the Perlin’s height map output. I’m only cycling hues through it, then panning the viewport through the noise in a circle.

@jeff that’s good coding there.

It looks good on your 2D LED matrix but not so good on a strip. Might look better with a denser 144/m strip but with the gaps in my 60/m strip it doesn’t look smooth. The pattern on the strip just kind of sloshes back and forth, which makes sense looking at the 2D matrix. I had some fun messing with your code but never came up with anything good. It may not be possible to get a good plasma on a 60/m strip. I did enjoy digging into your code, I learned a lot. Thanks for giving me so much code to tinker with.

Hey @KanyonKris -

I tidied things up, added a lot of parameters for tuning, and also put up a specialized 1D version that looks decent on strips.

Here’s the post.

1 Like