Texture Data Type
 
 
 

Declaration:

texture <name> ( procedure=<procedure name>, <component list> ) ;

Reference:

<name>

Purpose:

This defines a texture. All textures are procedures, and, hence, the procedure name is required. Each procedure has its own set of components. However, all procedures have the following set of components in common:

Comments:

All components are specified using a keyword=value form.Components are separated by commas. Not all components are optional. The components may be specified in any order. Components which are not specified take on their default value. If any component is specified more than once, the last such specification will be used, and all previous ones ignored. Not all components are meaningful in all combinations. In situations where a component is not meaningful, any specification of it will be ignored with no ill effect.

Only those components common to all texture procedures are described here, See the description of the individual texture procedures for definition of the components unique to each. Note that texture components are not reserved words (and, thus, are not printed in bold here), although the terms texture and procedure both are reserved.

Example:

texture marb ( procedure = SmarbleRGB,
	wrap = FALSE,
	blurmult = 0.5
	);

active

Syntax:

active

Range:

0 (FALSE) or not 0 (TRUE)

Default:

TRUE

Purpose:

active sets a flag indicating whether or not a given texture is to be used in the rendering process.

amult

Syntax:

amult = <scalar>

Range:

Generally, a useful range is from -1.0 to 1.0.

Default:

1.0

Purpose:

Value multiplier factor. All values of the texture are multiplied by this.

Comments:

This component may be animated.

NoteThe attribute being textured often has a limited range, so the value used for amult will have de facto limits in that context. For example, transparency is limited to the range 0 to 1. If an amult of -1 is used, then a corresponding aoffset must also be used to prevent the entire coverage area from bottoming out to zero.

Example:

amult = -1.0

aoffset

Syntax:

aoffset = <scalar>

Range:

A useful range is from -1.0 to 1.0.

Default:

0.0

Purpose:

Value offset factor. This is added to each value in the texture.

Comments:

This component may be animated.

Example:

aoffset = 1.0

aout

Syntax:

aout = <scalar>

Range:

0 to 1

Default:

0

Purpose:

Value outside of the area influenced by the texture.

Comments:

This component may be animated.

Example:

aout = 0.5

blurmult

Syntax:

blurmult = <scalar>

Range:

Non-negative. Generally, a useful range is from 0.0 to 10.0.

Default:

1.0

Purpose:

Scaling factor for blur of texture.

Comments:

This component may be animated.

Example:

blurmult = 0.2

bluroffset

Syntax:

bluroffset = <scalar>

Range:

Non-negative. Generally, a useful range is from 0.0 to 1.0.

Default:

0.0

Purpose:

Offset value for blur of texture.

Comments:

This component may be animated.

Example:

bluroffset = 0.001

chord_length

Syntax:

chord_length= <scalar>

Range:

0 (FALSE) to non-zero (TRUE)

Default:

FALSE

Purpose:

This flag maps a parametric texture so that it conforms to the curvature of the surface, not to the isoparametric surface values.

Example:

chord_length = TRUE;

filter

Syntax:

filter= <scalar>

Range:

0 (OFF), 1 (BLEND_FILTER), 2 (QUADRATIC_FILTER), 3 (QUARTIC_FILTER), 4(GAUSS_FILTER)

Default:

BLEND_FILTER

Purpose:

This flag selects a filter to use with file texture.

Example:

filter= BLEND_FILTER;

mirror

Syntax:

mirror

Range:

0 (FALSE) or not zero (TRUE)

Default:

FALSE

Purpose:

If mirror is TRUE, then repeated “tiles” of a texture are alternately flipped. Thus the colors at the seams will match, hiding the seams.

Comments:

This can be useful when trying to cover a large surface with a small texture sample. Note, however, that blur does not work across the seam when mirror = TRUE, and seams will appear between tiles if the texture is blurred.

For high quality seamless wrapping of textures, use the standalone “Fixwrap” on the source pix file instead of mirror. Fixwrap is included with alias_gifts. Type “fixwrap” without arguments for help information.

offset

Syntax:

uoffset = <scalar>,

voffset = <scalar>,

Range:

-infinity to infinity

Default:

0

Purpose:

uoffset and voffset determine the positioning of a texture within the coverage area.

Example:

uoffset = 0.989796, voffset = -0.3453,

repeat

Syntax:

urepeat = <scalar>,

vrepeat = <scalar>,

Range:

-infinity to 5

Default:

1

Purpose:

urepeat and vrepeat determine how many copies of the texture there are within the coverage area.

Example:

urepeat = -2.360882, vrepeat = 98.614067,

rotate

Syntax:

rotate = <scalar>,

Range:

-360 to 360

Default:

0

Purpose:

rotate is used to set the rotation (in degrees) of a texture on a shader.

Example:

rotate = 143.265305,

rgbmult

Syntax:

rgbmult = <triple>

Range:

Generally, a useful range for each component of the triple is from 0.0 to 1.0.

Default:

(1.0, 1.0, 1.0)

Purpose:

Provides a scaling factor for the value.

Comments:

This component may be animated.

The red, green, and blue components of the texture are multiplied by the numbers specified in the rgbmult triplet. The default of (1.0, 1.0, 1.0) means that all values are multiplied by 1, and are not changed. To darken the red component of a texture, reduce the first number. Using (0.5, 1.0, 1.0) results in the range for the red component being reduced to 0-128, and leaves the green and blue components at their full values. To increase the range of a component, use a number greater than 1. Be aware that you can’t get any brighter than 255 for each component.

Example:

rgbmult = ( sqrt(2), 1.0, 0.0 )

rgboffset

Syntax:

rgboffset = <triple>

Range:

A generally useful range for each component of the triple is from 0.0 to 255.0.

Default:

( 0.0, 0.0, 0.0 )

Purpose:

Offset for value. This is added to each value in the texture.

Comments:

This component may be animated.

Example:

rgboffset = ( 0.0, -128.0, 0.0 )

rgbout

Syntax:

rgbout = <triple>

Range:

Generally, a useful range for each component of the triple is 0.0 to 255.0.

Default:

( 0.0, 0.0, 0.0 )

Purpose:

Defines the value outside of the area influenced by the texture.

Comments:

This component may be animated.

Example:

rgbout = ( 255.0, 255.0, 255.0 )

scale

Syntax:

uscale = <scalar>

vscale = <scalar>

sx= <scalar>

sy= <scalar>

Range:

Non-negative.

Default:

1

Purpose:

The value assigned to uscale and vscale indicates the relative size of the texture map on the object 1 gives a full copy of the texture map. A scale of 0.5 means that the size of the texture map is double that of a scale of one: that is, only half of the texture map fits on the object. Scale is assigned in both u and v directions.

Sx and sy are only relevant to the Camera Type in Solid Projection. They store the scaling factors from the filmback space to image plane space.

translate

Syntax:

utranslate= <scalar>,

vtranslate = <scalar>,

tx= <scalar>,

ty= <scalar>,

Range:

-infinity to infinity

Default:

0

Purpose:

utranslate and vtranslate determine the placement of the area of coverage on a texture.

tx and ty are only relevant to the Camera Type in Solid Projection. They store the translation factors from the filmback space to image plane space.

Example:

 utranslate = -3.511901, vtranslate = 1.0,

wrap

Syntax:

uwrap = <scalar>

vwrap = <scalar>

Range:

0 or 1

Default:

1 (ON = FALSE)

Purpose:

The value assigned to wrap indicates whether the texture will replicate itself over the entire surface in the either the u or v direction, or have only one copy of the texture mapped. To have a single copy in one direction on the surface, use 0 (off).

Comments:

This component may be animated.

Example:

wrap = FALSE

worldspace

Syntax:

worldspace = <scalar>,

Range:

0 or 1

Default:

1 (ON = TRUE)

Purpose:

worldspace sets a flag indicating whether a texture is to be rendered on a surface using worldspace texture mapping techniques.