Hello again.

I am currently porting my particle system processing sketches to of. They are heavily influenced by perlin noise and I am currently stuck since there is no noise function included in of. Do I have to write my own perlin noise generator?

not sure if OF has noise functions by default (i’m a noob myself), but if all else fails you can use libnoise
has oretty much all the noise functions you can need!

1 Like

hmm I could not really get the libnoise lib installed on my mac. Anyways I found this class:…-lass.shtml

It works for me even though the results I get right now are incredibly hard to control.

Weird, that class looks like it should work pretty much like the processing one.

Remember that the noise3 function in that class is not the equivalent of the noise3 function in processing. The noise3 function in processing is actually the fractal noise - giving results between 0…1 whereas the noise3 function in this class is the core pseudorandom generator giving results between -1… 1.

You want to use the function perlin_noise_2D to get the same results as processing. But for some reason they’ve made it only 2D so you cannot animate it. If you just change the float vec[2] to float vec[3] and add vec[2]*=mFrequency; vec[2] *= 2.0f; to the relevant places it should work (and call noise3 instead of noise2 of course).

Hope that helps…

This looks cool. When you get it going can you post an example app please.



Yeah, I allready did that. I simply wrote a perlin_noise_3D function and linked it in the GET function of Perlin. I also added a third parameter. I had some small errors I didnt see because I was too tired. Maybe it would be great to know which is the standard setup of processings noise function (octaves, frequency ect.) anyways I will post a small example soon. I almost got everything to work to port my first piece for some nice realtime features YAY!

Here is a quick example in xcode. It it just a ball moving up and down to the noise.…