S.F.B.M. Pixel

From Ultrafractal Wiki

Jump to: navigation, search

S.F.B.M. Pixel is a Coloring Algorithm in sam.ucl.


Contents

What is it?

This coloring use a fBm algorithm. Go here if you want to know more about fBm.

Here is some explanations about how it works. First, a grid is put on the complex plane. On each vertex, a random number is chosen. The value assigned to a pixel is determined by the values of the four random numbers of the corners of the square containing the pixel. The Perlin noise function works a bit differently (see the link above), but the idea is more or less the same. Then the grid is modified (usually a reduction together with a rotation), and the process repeated, summing the values got at each iteration. After some iterations, you get a kind of random noise.

This coloring is designed to be used with the "Pixel" formula in mt.ufm and is useful to give texture to images. It should also work well with the Martin like formulas (Martin, Vine, Popcorn, Gnarl in mt.ufm and Martsam and Glyph in sam.ufm, for the ones I know). If you want to use it with another formula, S.F.B.M. General should be more appropriate.


Parameters

Noise type

Determine how the random numbers will be chosen on the gird. With the raw mode, the random numbers are chosen once for all and are the same for each pixel in a given square.The Perlin mode use the more subtle Perlin noise function using random vectors and dot products. Usually, the Perlin mode will give you a more "round" and smooth noise.

Number of iterations

The number of times the operations described above will be iterated. Note that if you use a quickly decreasing scale distribution (like 1/scale) and a relatively big magnification step, you won't need much iterations. If you're not sure, just try taking off a few iteration and look if it change the image. The less iterations you use, the faster the coloring will be.

String Mode

A fancy mode in which kind of strings appear. It can give some very nice textures.

String Power

A parameter only for the "String" mode. Keep it below one to see the strings. The closer to 0 it is, the less relief the texture will have.

Scale distribution

At each iteration, the value assigned to the pixel is summed and this sum will be used to assign the final color to the pixel considered. However, if you assign to each iterations the same "weight" in the sum, the small noise dominates and the result is rather messy. So the idea is to give the large scale noises more weight than the small scale ones. That's what accomplish the scale distribution. In the 1/scale mode, for instance, the result of each iteration is didvided by the "scale" of the noise (the "smaller" is the noise, the bigger is the scale), so that a small noise won't contribute much in the sum and the result will have a smooth appearance. The 1/sqrt(scale) do the same, but uses the square root of the scale. Since 1/sqrt(scale) decreases more slowly than 1/scale, the small noise will be given more importance with this mode. "Fancy" uses the really fancy factor 1/(scale^(1/scale)). The small noise will be given even more weight. 1/i will divide the result by the iteration number.

Pattern size

(...)

Magnification step

Define how the grid will be reduced between each iteration. Set it between 1 and 2.

Rotation step

Define how the grid will be rotated between each iteration. If you want to get a standard fBm noise, don't put a divisor of 360 (the whole angle) in this field, else... just try.

Power

This parameter is used when computing the distance of the pixel to the four square corners. The standard distance is raised to this power. The nicest fbm is obtained with 2, but there are other really interesting values...

Distance Estimator

Raw is the usual distance estimator, but "sin" gives more round and smooth results.

Perturb?

Use a strange grid to produce a discontinuous noise.

Seed

The seed to feed the random generator. Don't use a too small seed.

Random generator

  • "Division" use a division to get a random number. Since the numbers aren't really random, it's quite possible that you get some artifacts near (0,0) (spirals, for instance). Since these artifacts are sometimes rather nice and since I'm lazy, I didn't improve the random generator... Just change the location if you get such things.
  • "Selected Function" use the function you set in "Selected function" to generate *"random" numbers. These numbers are really not random, and you should see a pattern typical from the used function appear (set Rotation Step to zero). It can give some interesting effects...
  • I've added two modes : "Division II" and "Selected Function II". These modes are the same as the two ones above, except they use round() instead of floor(). They give better results IMHO.

Vary random numbers?

Enables you to put a perturbation parameter that will change at each iteration in the random algorithm.


Samuel Monnier

Personal tools