Texture Units
From Multiverse
Overview
This article describes the attributes of the texture_unit section in a material script. The general syntax is
texture_unit {
attribute1 value1
attribute2 value2
...
}
Where value1, value2, and so on, may actually be multiple values.
For example:
// Texture unit 0
texture_unit
{
texture wibbly.jpg
scroll_anim 0.1 0.0
wave_xform scale sine 0.0 0.7 0.0 1.0
}
Each of the following sections describes an attribute.
texture_alias
Sets the alias name for this texture unit. Setting the texture alias name is useful if the material is to be copied by other other materials and only the textures will be changed in the new material. For more information, see Copying Materials.
If a texture_unit has a name then the texture_alias defaults to the texture_unit name.
Format:
texture_alias name
Example:
texture_alias NormalMap
texture
Sets the name of the static texture image this layer will use. This attribute is mutually exclusive with the anim_texture attribute. The texture name cannot include spaces.
Format:
texture texturename [type] [unlimited | numMipMaps] [alpha] [PixelFormat]
Example:
texture funkywall.jpg
The optional type parameter specifies a the type of the texture, as described in the following table.
| Texture type | Description |
|---|---|
| 1d | A one-dimensional texture; that is, a texture which is only one pixel high. Such textures are useful to encode a function in a texture and use it as a simple lookup, perhaps in a fragment program. It is important that you use this setting when you use a fragment program which uses one-dimensional texture coordinates, since GL requires you to use a texture type that matches (D3D will let you get away with it, but you ought to plan for cross-compatibility). Your texture widths should still be a power of two for best compatibility and performance. |
| 2d | A texture with a width and a height, both of which must be powers of two. Generally, make such textures square because they will look best on the most hardware. These can be addressed with 2D texture coordinates. The default. |
| 3d | A three-dimensional texture (volume texture). Such a texture has a width, a height, both of which should be powers of two, and has depth. These can be addressed with 3D texture coordinates through a pixel shader. |
| cubic | This texture is made up of six 2D textures which are pasted around the inside of a cube. Can be addressed with 3D texture coordinates and are useful for cubic reflection maps and normal maps. |
The numMipMaps parameter specifies the number of mipmaps to generate for this texture. The default is "unlimited" which means mips down to 1x1 size are generated. You can specify a fixed number (even zero) instead. If you use the same texture in many material scripts, the number of mipmaps generated will conform to the number specified in the first texture_unit used to load the texture; so be consistent with your usage.
The alpha parameter, if specified, indicates to load a single channel (luminence) texture as alpha. If not specified, by default the Multiverse Client will load it into the red channel. This can be helpful if you want to use alpha-only textures in the fixed function pipeline.
The PixelFormat parameter, if provided, specifies the pixel format of the texture to create, which may be different from the pixel format of the texture file being loaded. The final pixel format will be constrained by hardware capabilities so you may not get exactly what you ask for.
The following table describes the possible pixel formats.
| Pixel format | Description |
|---|---|
| PF_L8 | 8-bit pixel format, all bits luminace. |
| PF_L16 | 16-bit pixel format, all bits luminace. |
| PF_A8 | 8-bit pixel format, all bits alpha. |
| PF_A4L4 | 8-bit pixel format, 4 bits alpha, 4 bits luminace. |
| PF_BYTE_LA | 2 byte pixel format, 1 byte luminance, 1 byte alpha |
| PF_R5G6B5 | 16-bit pixel format, 5 bits red, 6 bits green, 5 bits blue. |
| PF_B5G6R5 | 16-bit pixel format, 5 bits blue, 6 bits green, 5 bits red. |
| PF_R3G3B2 | 8-bit pixel format, 3 bits red, 3 bits green, 2 bits blue. |
| PF_A4R4G4B4 | 16-bit pixel format, 4 bits for alpha, red, green and blue. |
| PF_A1R5G5B5 | 16-bit pixel format, 1 bit for alpha, 5 bits for red, green and blue. |
| PF_R8G8B8 | 24-bit pixel format, 8 bits for red, green and blue. |
| PF_B8G8R8 | 24-bit pixel format, 8 bits for blue, green and red. |
| PF_A8R8G8B8 | 32-bit pixel format, 8 bits for alpha, red, green and blue. |
| PF_A8B8G8R8 | 32-bit pixel format, 8 bits for alpha, blue, green and red. |
| PF_B8G8R8A8 | 32-bit pixel format, 8 bits for blue, green, red and alpha. |
| PF_R8G8B8A8 | 32-bit pixel format, 8 bits for red, green, blue and alpha. |
| PF_X8R8G8B8 | 32-bit pixel format, 8 bits for red, 8 bits for green, 8 bits for blue like PF_A8R8G8B8, but alpha will get discarded |
| PF_X8B8G8R8 | 32-bit pixel format, 8 bits for blue, 8 bits for green, 8 bits for red like PF_A8B8G8R8, but alpha will get discarded |
| PF_A2R10G10B10 | 32-bit pixel format, 2 bits for alpha, 10 bits for red, green and blue. |
| PF_A2B10G10R10 | 32-bit pixel format, 2 bits for alpha, 10 bits for blue, green and red. |
| PF_FLOAT16_R | 16-bit pixel format, 16 bits (float) for red |
| PF_FLOAT16_RGB | 48-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue |
| PF_FLOAT16_RGBA | 64-bit pixel format, 16 bits (float) for red, 16 bits (float) for green, 16 bits (float) for blue, 16 bits (float) for alpha |
| PF_FLOAT32_R | 16-bit pixel format, 16 bits (float) for red |
| PF_FLOAT32_RGB | 96-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue |
| PF_FLOAT32_RGBA | 128-bit pixel format, 32 bits (float) for red, 32 bits (float) for green, 32 bits (float) for blue, 32 bits (float) for alpha |
| PF_SHORT_RGBA | 64-bit pixel format, 16 bits for red, green, blue and alpha |
texture_source
This section identifies an external texture source. Format:
texture_source type {
attributes
...
}
Currently the only valid type parameter is mvMovie.
It may have the attributes shown in the following table:
| Attribute | Description | Valid values |
|---|---|---|
| name | Name of the video. | Any unique string. If two materials both refer to the same movie name, only one movie will be created, and it will be displayed in both materials simultaneously. |
| codec | Video codec to use. | DirectShow, Browser |
| path | File path to video source, relative to asset repository root. Or, the URL to the movie or web page to load. | String |
| looping | Whether to restart the video when it finishes. Valid only with the DirectShow codec. | true or false |
| volume | The loudness of the video, as a percentage value from 0-100. Valid only with the DirectShow codec. | 0 for silent video, 50 for half volume, 100 for full volume. |
| balance | The left speaker vs. right speaker bias for playing the movie. Valid only with the DirectShow codec. | -100 for full volume on the left, 0 for equally balanced sound, 100 for full volume on the right. |
| videoSize | Horizontal and vertical dimensions of display, in pixels. Valid only with the Browser codec. | HorzxVert, for example 320x240 |
| textureSize | Horizontal and vertical dimensions of the texture to use for the browser display. Note that this doesn't do scaling; it must be larger than videoSize and a power of two. Valid only with the Browser codec. | HorzxVert, for example 1024x1024 |
Example
texture_source mvMovie {
name DShow Movie
codec DirectShow
path RafAndCorey.wmv
looping true
}
anim_texture
This attribute sets the images to be used in an animated texture layer. In this case an animated texture layer means one which has multiple frames, each of which is a separate image file. There are two formats, one for implicitly determined image names, and one for explicitly named images.
Short format
anim_texture base_name num_frames duration
Example:
anim_texture flame.jpg 5 2.5
This example sets up an animated texture layer made up of five frames named flame_0.jpg, flame_1.jpg, flame_2.jpg etc, with an animation length of 2.5 seconds (2fps). If duration is set to zero (0), then no automatic transition takes place and frames must be changed manually in code.
Long format
anim_texture frame1 frame2 ... duration
Example:
anim_texture flamestart.jpg flamemore.png flameagain.jpg moreflame.jpg lastflame.tga 2.5
This example sets up the same duration animation but from five separately named image files. The first format is more concise, but the second is provided if you cannot make your images conform to the naming standard required for it.
Default:
None
cubic_texture
Sets the images used in a cubic texture, i.e. one made up of 6 individual images making up the faces of a cube. These kinds of textures are used for reflection maps (if hardware supports cubic reflection maps) or skyboxes. There are 2 formats, a brief format expecting image names of a particular format and a more flexible but longer format for arbitrarily named textures.
Short format
cubic_texture base_name addressing
The base_name in this format is something like 'skybox.jpg', and the system will expect you to provide skybox_fr.jpg, skybox_bk.jpg, skybox_up.jpg, skybox_dn.jpg, skybox_lf.jpg, and skybox_rt.jpg for the individual faces.
The addressing parameter specifies how the textures are addressed, and must be either:
- combinedUVW: The six textures are combined into a single 'cubic' texture map which is then addressed using 3D texture coordinates with U, V and W components. Necessary for reflection maps since you never know which face of the box you are going to need. Not all cards support cubic environment mapping.
- separateUV: The six textures are kept separate but are all referenced by this single texture layer. One texture at a time is active (they are actually stored as six frames), and they are addressed using standard 2D UV coordinates. This type is good for skyboxes since only one face is rendered at one time and this has more guaranteed hardware support on older cards.
Long format
cubic_texture front back left right up down separateUV
This format specifies each face explicitly, in case you don't want to conform to the image naming standards above. You must specify separateUV as the final parameter, since the combinedUVW version requires a single texture name to be assigned to the combined 3D texture (see below).
Default:
None.
binding_type
Specifies that this texture binds to either the fragment processing unit or the vertex processing unit (for Vertex Texture Fetch).
Format:
binding_type type
Where type is one of:
- vertex - this texture binds to either the vertex processing unit.
- fragment - this texture binds to either the fragment processing unit.
Default:
binding_type fragment
content_type
The content_type attribute specifies where the texture unit gets its content. The default is to get texture content from a named texture, as defined with the anim_texture attributes. However you can also pull texture information from other automated sources.
Format:
content_type type
Default:
content_type named
Where type is one of:
- named: Derives texture content from a texture name, loaded by ordinary means from a file or manually created with a given name. The default type.
- shadow: Pulls in a shadow texture, and is only valid when you use texture shadows and one of the 'custom sequence' shadowing types. The shadow texture in question will be from the 'n'th closest light that casts shadows, unless you use light-based pass iteration or the light_start option which may start the light index higher. When you use this option in multiple texture units within the same pass, each one references the next shadow texture. The shadow texture index is reset in the next pass, in case you want to take into account the same shadow textures again in another pass (e.g. a separate specular / gloss pass). By using this option, the correct light frustum projection is set up for you for use in fixed-function, if you use shaders just reference the texture_viewproj_matrix auto parameter in your shader.
tex_coord_set
Sets which texture coordinate set to use for this texture layer. A mesh can define multiple sets of texture coordinates; this sets which one the material uses.
Using a tex_coord_set other than 0 requires a mesh that is specially constructed with more than one set of UV coordinates.
NOTE: The tex_coord_set attribute applies only when using the fixed function pipeline. If using a shader, the shader code determines which values to use for texture coordinates when sampling a texture.
Format:
tex_coord_set set_num
Example:
tex_coord_set 2
Default:
tex_coord_set 0
tex_address_mode
This attribute defines what happens when texture coordinates exceed 1.0 for this texture layer. Use the simple format to specify the addressing mode for all three potential texture coordinates at once, and the the extended format to specify a different mode for each texture coordinate.
Simple format
tex_address_mode uvw_mode
This format specifies the addressing mode for all three coordinates.
Default:
tex_address_mode wrap
Extended format
tex_address_mode u_mode v_mode [w_mode]
This format specifies the addressing mode for each coordinate separately.
Valid modes are described in the table below.
| Mode | Description |
|---|---|
| wrap | Any value beyond 1.0 wraps back to 0.0. Texture is repeated. |
| clamp | Values beyond 1.0 are clamped to 1.0. Texture 'streaks' beyond 1.0 since last line of pixels is used across the rest of the address space. Useful for textures which need exact coverage from 0.0 to 1.0 without the 'fuzzy edge' wrap gives when combined with filtering. |
| mirror | Texture flips every boundary, meaning texture is mirrored every 1.0 u or v. |
| border | Values outside the range [0.0, 1.0] are set to the border color. You might also set the tex_border_colour attribute. |
tex_border_colour
Sets the border colour of border texture address mode (see tex_address_mode).
Format:
tex_border_colour red green blue [alpha]
Valid color values are between 0.0 and 1.0.
Example:
tex_border_colour 0.0 1.0 0.3
Default:
tex_border_colour 0.0 0.0 0.0 1.0
filtering
Sets the type of texture filtering used when magnifying or minifying a texture. This attribute has two formats: simple format that specifies the name of a predefined set of filtering options, and complex format, that individually sets the minification, magnification, and mip filters.
Simple format
filtering type
Where type is one of the types in the following table:
| Type | Description |
|---|---|
| none | No filtering or mipmapping is used. This is equivalent to the complex format 'filtering point point none'. |
| bilinear | Performs two by two box filtering when magnifying or reducing a texture, and picks a mipmap from the list but does no filtering between the levels of the mipmaps. This is equivalent to the complex format 'filtering linear linear point'. The default filtering type. |
| trilinear | Performs two by two box filtering when magnifying and reducing a texture, and filter the closest two mipmaps together. This is equivalent to the complex format 'filtering linear linear linear'. |
| anisotropic | This is the same as 'trilinear', except the filtering algorithm takes account of the slope of the triangle in relation to the camera rather than simply doing a 2x2 pixel filter in all cases. This makes triangles at acute angles look less fuzzy. Equivalent to the complex format 'filtering anisotropic anisotropic linear'. Note that in order for this to make any difference, you must also set the max_anisotropy attribute too. |
Default:
filtering bilinear
Complex format
filtering min-filter mag-filter mip-filter
This format gives you complete control over the minification, magnification, and mip filters. The min-filter parameter is the minification filter, mag-filter is the magnification filter, and mip-filter is the mip filter.
Each parameter can have the values described in the following table.
| Type | Description |
|---|---|
| none | Use no filtering. Only valid for the mip-filter, since this turns mipmapping off completely. The lowest setting for min-filter and mag-filter is 'point'. |
| point | For the min-filter or mag-filter, picks the closet pixel. For the mip-filter, picks the closet matching mipmap. |
| linear | Filter a two by two box of pixels around the closest one. In the mip-filter, enables filtering between mipmap levels. |
| anisotropic | Makes the filter compensate for camera-space slope of the triangles. Only valid for min-filter and mag-filter. For this to make any difference, you must also set the max_anisotropy attribute too. |
Default:
filtering linear linear point
max_anisotropy
This attribute sets the maximum degree of anisotropy that the renderer will try to compensate for when filtering textures. The degree of anisotropy is the ratio between the height of the texture segment visible in a screen space region versus the width - so for example a floor plane, which stretches on into the distance and thus the vertical texture coordinates change much faster than the horizontal ones, has a higher anisotropy than a wall which is facing you head on (which has an anisotropy of 1 if your line of sight is perfectly perpendicular to it). You should set the max_anisotropy value to something greater than 1 to begin compensating; higher values can compensate for more acute angles. The maximum value is determined by the hardware, but it is usually 8 or 16.
For this to be used, you have to set the minification and/or the magnification filtering option on this texture to anisotropic.
Format:
max_anisotropy value
Default:
max_anisotropy 1
mipmap_bias
This attribute sets the bias value applied to the mipmapping calculation, thus allowing you to alter the decision of which level of detail of the texture to use at any distance. The bias value is applied after the regular distance calculation, and adjusts the mipmap level by 1 level for each unit of bias. Negative bias values force larger mip levels to be used, positive bias values force smaller mip levels to be used. The bias is a floating point value so you can use values in between whole numbers for fine tuning.
To use this option, the hardware has to support mipmap biasing (exposed through the render system capabilities), and minification filtering has to be set to point or linear.
Format:
mipmap_bias value
Default:
mipmap_bias 0
colour_op
This attribute determines how to combine the color of this texture layer with the one below it (or the lighting effect on the geometry if this is the first layer). Using this attribute is the simplest way to blend texture layers, because it requires only one parameter, gives you the most common blending types, and automatically sets up two blending methods: one for if single-pass multitexturing hardware is available, and another for if it is not and the blending must be achieved through multiple rendering passes.
However, this method is limited and does not expose the more flexible multitexturing operations, because they aren't automatically supported in multipass fallback mode. To use the fancier options, use colour_op_ex, but be sure that either enough multitexturing units are available, or set a fallback using colour_op_multipass_fallback.
Format:
colour_op operation
Where operation is one of:
- replace: Replace all color with texture with no adjustment.
- add: Add color components together.
- modulate: Multiply color components together.
- alpha_blend: Blend based on texture alpha.
Default:
colour_op modulate
colour_op_ex
This attribute is an extended version of the colour_op attribute which allows extremely detailed control over the blending applied between this and earlier layers. Multitexturing hardware can apply more complex blending operations that multipass blendind, but you are limited to the number of texture units which are available in hardware.
Format:
colour_op_ex operation source1 source2
[manual_factor] [manual_colour1]
[manual_colour2]
Default:
None (colour_op modulate)
Example
colour_op_ex add_signed src_manual src_current 0.5
See the IMPORTANT note below about the issues between mulitpass and multitexturing that using this method can create. Texture colour operations determine how the final colour of the surface appears when rendered. Texture units are used to combine colour values from various sources (e.g. the diffuse colour of the surface from lighting calculations, combined with the colour of the texture). This method allows you to specify the 'operation' to be used, i.e. the calculation such as adds or multiplies, and which values to use as arguments, such as a fixed value or a value from a previous calculation.
The operation parameter must be one of :
- source1: Use source1 without modification
- source2: Use source2 without modification
- modulate: Multiply source1 and source2 together.
- modulate_x2: Multiply source1 and source2 together, then by 2 (brightening).
- modulate_x4: Multiply source1 and source2 together, then by 4 (brightening).
- add: Add source1 and source2 together.
- add_signed: Add source1 and source2 then subtract 0.5.
- add_smooth: Add source1 and source2, subtract the product
- subtract: Subtract source2 from source1
- blend_diffuse_alpha: Use interpolated alpha value from vertices to scale source1, then add source2 scaled by (1-alpha).
- blend_texture_alpha: As blend_diffuse_alpha but use alpha from texture
- blend_current_alpha: As blend_diffuse_alpha but use current alpha from previous stages (same as blend_diffuse_alpha for first layer)
- blend_manual: As blend_diffuse_alpha, but use a constant manual alpha value specified in manual
- dotproduct: The dot product of source1 and source2
- blend_diffuse_colour: Use interpolated color value from vertices to scale source1, then add source2 scaled by (1-colour).
The source1 and source2 parameters must be one of:
- src_current: The color as built up from previous stages.
- src_texture: The color derived from the texture assigned to this layer.
- src_diffuse: The interpolated diffuse color from the vertices (same as 'src_current' for first layer).
- src_specular: The interpolated specular color from the vertices.
- src_manual: The manual colour specified at the end of the command.
For example 'modulate' takes the color results of the previous layer, and multiplies them with the new texture being applied. Bear in mind that colours are RGB values from 0.0-1.0 so multiplying them together will result in values in the same range, 'tinted' by the multiply. Note however that a straight multiply normally has the effect of darkening the textures - for this reason there are brightening operations like modulate_x2. Note that because of the limitations on some underlying APIs (Direct3D included) the 'texture' argument can only be used as the first argument, not the second.
The last parameter is only required if you decide to pass a value manually into the operation. Hence you only need to fill these in if you use the 'blend_manual' operation.
IMPORTANT: The Multiverse Client tries to use multitexturing hardware to blend texture layers together. However, if it runs out of texturing units (for example, 2 on a GeForce2, four on a GeForce3) it has to fall back on multipass rendering, rendering the same object multiple times with different textures. This is both less efficient and there is a smaller range of blending operations which it can perform. For this reason, if you use this method, set the colour_op_multipass_fallback attribute to specify which effect to fall back on if sufficient hardware is not available (the default is just 'modulate' which is unlikely to be what you want). To avoid having to do this, use the simpler colour_op attribute which provides fewer blending options but sets up the multipass fallback automatically, since it only allows operations which have direct multipass equivalents.
colour_op_multipass_fallback
Sets the multipass fallback operation for this layer, if you used colour_op_ex and not enough multitexturing hardware is available.
Because some of the effects you can create using colour_op_ex are only supported under multitexturing hardware, if the hardware is lacking, the system must fallback on multipass rendering, which unfortunately doesn't support as many effects. This attribute specifies the desired fallback operation.
The parameters are the same as in the scene_blend attribute; this is because multipass rendering IS effectively scene blending, since each layer is rendered on top of the last using the same mechanism as making an object transparent, it's just being rendered in the same place repeatedly to get the multitexture effect. If you use the simpler (and less flexible) colour_op attribute you don't need to call this as the system sets up the fallback for you.
Format:
colour_op_multipass_fallback src_factor dest_factor
Example:
colour_op_mulitpass_fallback one one_minus_dest_alpha
alpha_op_ex
Behaves in exactly the same away as colour_op_ex except that it determines how alpha values are combined between texture layers rather than colour values.The only difference is that the 2 manual colours at the end of colour_op_ex are just single floating-point values in alpha_op_ex.
env_map
The env_map attribute turns on or off texture coordinate effect that makes this layer an environment map.
Environment maps make an object look reflective by using automatic texture coordinate generation depending on the relationship between the objects vertices or normals and the eye.
Format:
env_map type
Where type is one of the types described in the table below.
Default:
env_map off
The following table describes types of environment maps.
| Type | Description |
|---|---|
| spherical | A spherical environment map. Requires a single texture which is either a fish-eye lens view of the reflected scene, or some other texture which looks good as a spherical map (a texture of glossy highlights is popular especially in car sims). This effect is based on the relationship between the eye direction and the vertex normals of the object, so works best when there are a lot of gradually changing normals, that is, curved objects. |
| planar | Similar to the spherical environment map, but the effect is based on the position of the vertices in the viewport rather than vertex normals. This effect is therefore useful for planar geometry (where a spherical env_map would not look good because the normals are all the same) or objects without normals. |
| cubic_reflection | A more advanced form of reflection mapping which uses a group of six textures making up the inside of a cube, each of which is a view if the scene down each axis. Works extremely well in all cases but has a higher technical requirement from the card than spherical mapping. Requires that you bind a cubic_texture to this texture unit and use the 'combinedUVW' option. |
| cubic_normal | Generates 3D texture coordinates containing the camera space normal vector from the normal information held in the vertex data. Again, full use of this feature requires a cubic_texture with the 'combinedUVW' option. |
| off | Turn off texture coordinate effect that makes this layer an environment map. The default. |
scroll
Sets a fixed scroll offset for the texture. This method offsets the texture in this layer by a fixed amount, and is useful for small adjustments without altering texture coordinates in models. To create an animated scroll effect, see the scroll_anim attribute.
Format:
scroll x y
scroll_anim
Sets up an animated scroll for the texture layer. Useful for creating fixed-speed scrolling effects on a texture layer (for varying scroll speeds. See wave_xform.
Format:
scroll_anim xspeed yspeed
rotate
Rotates a texture to a fixed angle. This attribute changes the rotational orientation of a texture to a fixed angle, useful for fixed adjustments. If you wish to animate the rotation, see rotate_anim.
Format:
rotate angle
The parameter is a anticlockwise angle in degrees.
rotate_anim
Sets up an animated rotation effect of this layer. Useful for creating fixed-speed rotation animations (for varying speeds, see wave_xform).
Format:
rotate_anim revs_per_second
The parameter is a number of counter-clockwise revolutions per second.
scale
Adjusts the scaling factor applied to this texture layer. Useful for adjusting the size of textures without making changes to geometry. This is a fixed scaling factor, if you wish to animate this see wave_xform.
Format:
scale x_scale y_scale
Valid scale values are greater than 0, with a scale factor of 2 making the texture twice as big in that dimension etc.
wave_xform
Sets up a transformation animation based on a wave function. Useful for more advanced texture layer transform effects. You can add multiple instances of this attribute to a single texture layer if you wish.
Format:
wave_xform xform_type wave_type base frequency phase amplitude
Where each parameter can have the values specified in the following table.
| Parameter | Description |
|---|---|
| xform_type | Value to animate. One of:
|
| wave_type | Type of wave form. One of:
|
| base | The base value: the minimum if amplitude greater than zero, the maximum if amplitude less than zero. |
| frequency | Number of wave iterations per second, or speed. |
| phase | Offset of the wave start |
| amplitude | Size of the wave. |
Example:
wave_xform scale_x sine 1.0 0.2 0.0 5.0
The range of the output of the wave goes from base to base + amplitude. So the example above scales the texture in the x direction between 1 (normal size) and 5 along a sine wave at one cycle every five seconds (0.2 waves per second).
transform
This attribute allows you to specify a static 4x4 transformation matrix for the texture unit, thus replacing the individual scroll, rotate and scale attributes mentioned above.
Format:
transform m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23 m30 m31 m32 m33
The indexes of the 4x4 matrix value above are expressed as mrow'col.
This document is based on the OGRE Manual and is licensed under the Creative Commons Attribution-ShareAlike 2.5 License.
