Difference between revisions of "TextureMatrix"

From BZFlagWiki
Jump to: navigation, search
Line 6: Line 6:
 
  textureMatrix
 
  textureMatrix
 
  name example_texmat
 
  name example_texmat
  scale 0.0 0.0 1.0 1.0 # u/v freqs, u/v scales
+
  scale 0.0 0.0 1.0 1.0
  spin 0.0 # rotation freq
+
  spin 0.0
  shift 0.0 0.0 # u/v freqs
+
  shift 0.0 0.0
  center 0.5 0.5 # dynamic u/v center (for spin and scale) 
+
  center 0.5 0.5  
  fixedscale 0.0 0.0 # time invariant u/v scale
+
  fixedscale 0.0 0.0
  fixedspin 0.0 # time invariant rotation
+
  fixedspin 0.0
  fixedshift 0.0 0.0 # time invariant u/v shift
+
  fixedshift 0.0 0.0
 
  end
 
  end
 
|}
 
|}

Revision as of 03:54, 9 November 2007

The texture matrix object allows you to define how a texture will appear in an material. It can be used to manipulate still (fixed) textures as well as animated ones.

Code

textureMatrix
name example_texmat
scale 0.0 0.0 1.0 1.0
spin 0.0
shift 0.0 0.0
center 0.5 0.5 
fixedscale 0.0 0.0
fixedspin 0.0
fixedshift 0.0 0.0
end

Texture Matrix must be used in conjunction with the Material object using texmat. valid parameters for a Material are:

name name for reference
scale u/v freqs, u/v scales
spin rotation freq
shift u/v freqs
center dynamic u/v center (for spin and scale)
fixedscale time invariant u/v scale
fixedspin time invariant rotation
fixedshift time invariant u/v shift


Examples

Texture Matrix is often used to create the appearance of flowing water or lava with the "shift" argument.