Quatsch/Jux Reference - Configurable Functions

From Picogen-doc


Contents

Heightmaps

Heightmaps in form of image-files (e.g. created with the GIMP, terraform, or from real life data) are supported by the following configurable function. DEM support is not (yet available).

([Heightmap
    width {<real-number>}        // optional, default: 10000
    depth {<real-number>}        // optional, default: 10000
    height{<real-number>}        // optional, default: 1000
    filename{<filename>}         // mandatory --> relative to scene file, e.g. "filename{canyon.png}"
    filter{nearest  |
           bilinear |
           cosine   |
           cubic
          }                      // optional, default: cubic
                                    --> quality of interpolation between pixels ofheightmap
 ] x y) 

E.g., to load some canyon-heightmap named "canyons.bmp" which is placed in the same folder as your scene, and which engrosses a real-life-region of 15*15 kilometers, and which describes heights between 0 and 500 meters, use this:

// Example
([Heightmap width{15000} depth{15000} height{500} filename{canyon.bmp}] x y)

Currently supported formats include: bmp, png, jpeg, tif, gif. The recommended format for re-distribution is png, as it compresses lossless, is standardized and open.

Libnoise Support

Libnoise (http://libnoise.sourceforge.net/) is a free (as in freedom) library which provides several noise generators and ways to combine them arbitrarily. We believe that this is a great and flexible library of very good quality, and it's an awesome example of how to write re-usable code. Picogen supports the noise generators of libnoise. Note that because picogen does already have its own heightmap modelling language, most functions of libnoise are not "needed", so "complete integration" would be nonsense.

Perlin

This function provides libnoise's implementation of Perlin Noise. See also http://libnoise.sourceforge.net/docs/classnoise_1_1module_1_1Perlin.html.

Syntax

([LibnoisePerlin
  frequency{<real-number>}        // optional, default: 1.0
  lacunarity{<real-number>}       // optional, default: 2.0
  octave-count{<integral-number>} // optional, default: 6
  persistence{<real-number>}      // optional, default: 0.5
  seed{<integral-number>}         // optional, default: 0
] x y)                            // x and y can be any valid expression


Billow

This function provides libnoise's Billow noise. See also http://libnoise.sourceforge.net/docs/classnoise_1_1module_1_1Billow.html.

Syntax

([LibnoiseBillow
  frequency{<real-number>}        // optional, default: 1.0
  lacunarity{<real-number>}       // optional, default: 2.0
  octave-count{<integral-number>} // optional, default: 6
  persistence{<real-number>}      // optional, default: 0.5
  seed{<integral-number>}         // optional, default: 0
] x y)                            // x and y can be any valid expression


Ridged Multifractal Perlin Noise

This function provides libnoise's implementation of ridged multifractal noise. See http://libnoise.sourceforge.net/docs/classnoise_1_1module_1_1RidgedMulti.html

Syntax

([LibnoiseRidgedMulti
  frequency{<real-number>}        // optional, default: 1.0
  lacunarity{<real-number>}       // optional, default: 2.0
  octave-count{<integral-number>} // optional, default: 6
  seed{<integral-number>}         // optional, default: 0
] x y)                            // x and y can be any valid expression


Voronoi

This function provides libnoise's implementation of Voronoi noise. See also http://libnoise.sourceforge.net/docs/classnoise_1_1module_1_1Voronoi.html.

Syntax

([LibnoiseVoronoi
  frequency{<real-number>}        // optional, default: 1.0
  displacement{<real-number>}     // optional, default: 1.0
  enable-distance{<0 or 1>}       // optional, default: 0  (1 = enabled, 0 = disabled)
  seed{<integral-number>}         // optional, default: 0
] x y)                            // x and y can be any valid expression


Cylinders

This function provides libnoise's Cylinders generator. See also http://libnoise.sourceforge.net/docs/classnoise_1_1module_1_1Cylinders.html.

Syntax

([LibnoiseCylinders
  frequency{<real-number>}        // optional, default: 1.0
] x y)                            // x and y can be any valid expression


Spheres

This function provides libnoise's Spheres generator. See also http://libnoise.sourceforge.net/docs/classnoise_1_1module_1_1Spheres.html.

Syntax

([LibnoiseSpheres
  frequency{<real-number>}        // optional, default: 1.0
] x y)                            // x and y can be any valid expression