Page 2 of 2

Re: fractal noise particular

Posted: 2015-08-29T09:22:08-07:00
by snibgo
Thanks for the links.

Perlin noise in ImageMagick is simply:

Code: Select all

-size AxB xc:gray(50%)
+noise NOISE_TYPE
-filter FILTER_TYPE
-resize CxD!
Where AxB is the number of grid points, NOISE_TYPE is Gaussian or whatever you want, and CxD is the final image size. The filter line is optional, and defines the interpolation type.

This defines the initial grid, populates it with noise, and interpolates between grid values for the final image. The noise is coherent, but not self-similar.

This could be coded in C as a single IM operation, perhaps involving large pre-built look-up tables as suggested by Ken Perlin, so it would be very fast, and run on GPUs etc. An interested person (not me) might take up the challenge.

The next stage is to create multiple scales of noise and add or blend them, making fractal noise which is coherent and self-similar. This would have controls for the relative weights of the octaves, whether to take absolute values of the noise (Perlin calls this "turbulence", but I think it is different to Adobe's "turbulence"), and so on. Fred has published a script for this. I have my own unpublished script. Adobe's version has extra controls, eg to rotate octaves.

This could also be coded as an IM operation.

The next stage is to combine fractal noise with other image operations, eg by using them as displacement maps, as inputs to CLUTs and so on. I intend to write a page on this with a variety of examples. I think this is what Adobe have done with their "Turbulent Noise effect". Some of Adobe's controls have simple equivalents in IM, for example Adobe's "invert" is IM's "-negate". Others such as "swirls" are more complex.

For animation, the grid noise values can be saved from one frame to the next, slightly changed, rather than re-generated from scratch. Noise is added to noise. This can be scaled, so the low-frequency octaves change more slowly than high-frequency noise, which mimics turbulent fluid flow. I have done some (unpublished) work on this, using IM in scripts.

Re: fractal noise particular

Posted: 2015-08-29T10:36:08-07:00
by fmw42
snibgo wrote:Others such as "swirls" are more complex.
This may be equivalent to my disperse script?

Re: fractal noise particular

Posted: 2015-08-29T10:53:55-07:00
by snibgo
fmw42 wrote:This may be equivalent to my disperse script?
From a quick look at your page http://www.fmwconcepts.com/imagemagick/ ... /index.php and script, yes, that seems likely, if you use fractal noise instead of "+noise Random" for your $tmp0 displacement map.

Re: fractal noise particular

Posted: 2015-08-31T04:38:15-07:00
by manuel_songokuh
@fmw42
do you have news?

Re: fractal noise particular

Posted: 2015-08-31T09:43:27-07:00
by fmw42
manuel_songokuh wrote:@fmw42
do you have news?
News about what?