🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

More noise

Published June 28, 2008
Advertisement
I've been revamping the noise library (again). Initially, it was modelled after libnoise, as a chained module system. It is still a chained module system, but I have redone things a bit differently. Before, the fractal-type modules (fBm, billow, ridged, etc...) were hard-set to be of a specified basis function type (ie, gradient, simplex, value, whatever) when the module was created, and all octaves of the fractal were of the specified type. I have now changed it so that any combiner module, fractals included, takes as input for the octaves any basis function. Including the output from, say, another fractal generator. Or any of the function-based patterns. Pretty much, any module can be an octave in the fractal.

This method, of course, carries some risks. Computational complexity goes up a bit, and there is more of a chance that a mistake will made causing an infinite loop. Infinite loops were possible in the original design, of course, but this just makes it more likely. (An infinite loop occurs when a module has for one of it's sources a module chain that calls the module itself, causing it to be called over and over again.)

However, aside from the risks and tradeoffs, I'm happy with the results. I can select any of the possible basis functions for any of the layers of a fractal method. Currently, the choices for basis functions are still a bit limited. They include:

1,2,3 dimensional value noise
1,2,3 dimensional gradient noise
1,2,3 dimensional value/gradient (sum) noise
1,2,3 dimensional simplex noise
1,2,3 dimensional voronoi (crackle) noise
1,2,3 dimensional cellular noise, specifiable coefficients for F1,F2,F3,F4
1,2,3 dimensional white noise (chaotic)
Various patterns and shapes including: sphere, cone, cylinder, bars, checkerboard, radiating sine waves, lateral sine waves, dots on a lattice, and a few others in progress

Any of the above basis functions can be chained as-is with other combiner/modifier/transformer modules including:

Combiner operations (sum, subtract, multiply a list of modules, fractal methods, max, min, selection, blending, etc...)
Transform operations (rotate, scale, translate, or turbulence applied to domain)
Modifier operations (power function, gain/bias, scale and translate output, stair-stepping, invert, clamp, abs, map to curve, map to exponential function)

All of the combiner/translator/modifier operations are defined as modules that can be set as sources for other modules.

The following image is a collage of fractals constructed randomly. Each fractal is one of: Ridged, Billow, fBm, hybrid multifractal and each is composed of 8 octaves of basis functions drawn randomly from the set of: Value3D, Gradient3D, Simplex3D, ValueGradient3D, Cellular3D. Each octave has applied to it a domain rotation of a randomly determined angle around a randomly determined axis, to mitigate any possible axis-aligned artifacts. The rotation is applied using the Rotate module. The coefficients for the Cellular3D noise were randomly selected from the set [-1,1] for some of the fractals; for others, they were hard-set to (-1,1,0,0) for F1,F2,F3 and F4.

I constructed a simple composer routine to build the fractals and dump them into an image and this was the result. Some pretty interesting functions in there, and the possibilities are endless.



I've been tinkering with wavelet noise which I might add to the set just for completeness. Simulation noise has also entered my radar, although I've done very little research on it as yet. I also have planned numerous other shape and pattern based function sources.
Previous Entry Back. And married.
Next Entry More noise
0 likes 2 comments

Comments

mrbastard
Wow - very pretty!

Being able to use any basis function for each octave of a fractal is a really cool idea.
June 29, 2008 02:21 PM
LachlanL
Nice work!
June 29, 2008 05:46 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement