Interform Procedural Textures

The interform procedural texture generates a texture from two color index maps and a palette. The effect varies, but is usually used for bubbling or flowing effects. It is highly recommended that you play with the interform procedure explorer in Kai's Power Tools before trying to make interform textures of your own.

ATD1

type            = interform
width           = integer
height          = integer

palette         = filename

mother          = filename
mother_move     = string   (optional)
mother_vx       = float    (optional, for scrolling)
mother_vy       = float    (optional, for scrolling)
mother_speed    = float    (optional, for wander)
mother_rate     = float    (optional, for wander)
mother_strength = float    (optional, for wander)

father          = filename
father_move     = string   (optional)
... (other options same as for mother image)

Parameters

width
Width of the texture, must be a power of two.
height
Height of the texture, must be a power of two.
palette
Filename of the image from which the color palette is derived. The image must be a 24-bit PNG file that is exactly 256 pixels wide and at least one pixel high. This allows for easy creation of palettes using the gradient tool in Photoshop. The top line of the image becomes the interform palette.
mother
Filename of the first source color map, which must be an 8-bit PNG file that is at least as large as the output size, but not necessarily a power of two. For your own convenience, it is recommended to be a greyscale file, rather than merely 8-bit paletted, so you can more easily think of the file as a color MAP rather than having colors. See remarks section below.
mother_move
Determines how the mother image moves. Can be one of the following values (more can be added upon request):
string Description
none No movement whatsoever. This is the default value.
scroll Scroll the texture continuously with speeds specified by mother_vx and mother_vy. These values are in texture units per second. For example, if you have −1.0 for mother_vx and 0.5 for mother_vy then after one second, the mother will have scrolled its entire width to the left and half its height upwards.
wander Scroll the texture in a random direction but change the direction of travel over time. The scrolling speed is controlled by mother_speed, the amount of change in direction is controlled by mother_rate, and the strength of the steering force is controlled by mother_strength. Note that these are all optional values and do not need to be specified.

Remarks

The interform procedural texture takes two color maps, the mother and father, averages the values of corresponding pixels and uses that value as a lookup into a palette. By constantly moving the color maps around, very interesting effects can be created. Keep in mind that when you are creating the color maps, you are not creating two greyscale images that are going to be blended together in any normal way.

It is recommended for the best interform effects that the mother and father textures are "smooth" textures where the index value does not vary too quickly between successive pixels. Interform textures sometimes have a tendency to look blocky and pixellated, otherwise.

Advanced OpenGL Parameters

internal format
GL_RGB
GL_TEXTURE_MIN_FILTER
GL_LINEAR (no mipmapping, bilinear interpolation)
GL_TEXTURE_MAG_FILTER
GL_LINEAR (bilinear interpolation)

Examples

No examples are presented here because it is rather difficult to capture the interform effect without many frames in an animated GIF and I have a lot of tasks on my list to do. Please take a look around map joeyproc for a variety of example interform textures.