[EDIT April 9, 2013
will post GitHub url here [/url]]
original post follows
Not sure where to post this. I’m selecting “Game Design” as it is related to designing graphics (possibly animated) using Procedural Noise techniques.
I can see where there are a LOT of texture editors already out there, as well as Perlin & Simplex noise source generators. This post is more about learning about ways to combine noise “channels”, to have a “hands on” way to see what happens if I poke something this way or that.
As a consequence, this is very much “In Progress” and the Applet is next to useless due to trying to cram too much on the screen. No way yet to save or load files or generate images. Can only dabble and see what happens.
I’m taking as my “base octave” the value of x/width, where x is the number of the pixel, and width is the number of pixels in the display area. This gives a progression from 0 to 1. I’ve seen others that use an equation that instead gives -1 to 1 for their “base octave”. To progress more quickly across the Simplex space, one multiplies the x value by a scaling factor.
I made a provision to put in arbitrary scalings factors, as well as translators (values added to the x * scale), and made a display TextField to show the resulting equation that I could use if I want to program the display results procedurally.
This screen shot is of a well known example of combining octaves where the colors span from blue to white. (It CAN to other colors.) The values are added together in a way that tapers geometrically. The result: standard fluffy clouds.
The return value from the Simplex function ranges from -1 to 1, so to use it with designating a color value, a transform is common. Very common is (val + 1)/2, which shifts and compresses the -1 to 1 results to 0 to 1. Another common way is to use an ABS function: “|val|”. This operation seems to result in a more threadlike quality to the noise. In the example below, I select “|val|” on the second Simplex channel and flip the colors (via “<>” button between the RGB fields) so that the thread color is White.
As I said, I wanted to experiment with other ways to make textures, not necessarily at octaves. I allow ADD vs LERP in the way values are combined. With ADD there is a possibility of overflow & underflow. The “Prevent Overflow” puts in a MIN function to prevent the color value from exceeding 255. So there are some interesting clamping effects. The slider value with ADD is divided by 64, thus as long as the four channel volumes add up to less than 64, you are okay (unless you allow the “no transform” option and are sending in negative values, potentially causing underflow).
The program could use a way to Save & Load, and to generate jpgs or ani gifs (am thinking of putting some “rollers” on the translator sliders that continuously move). It could use a Color Picker and ways to automatically copy values from one channel to another or set octaves since they are so powerful a construct. It could use a much better use of space, maybe popping up the thing you are working on, while letting other aspects that don’t have the focus stay smaller.
I want to maybe allow other panels in with other texture sources, as well as a way to explore using the Simplex to generate a value along a custom gradient (such as are used with “earth” colors to make topo maps), or the classic cloud demo on Perlin’s lecture site. But I don’t think I really want to invest a lot of time making yet another texture builder app. As I said, my main goal was just to get some “hands on” with noise textures which this code allows to a limited extent.