Shader: "wrapped mask"

"wrapped mask"

ClassTransparency
Synopsis Wrapped image in which the red channel is interpreted as the transparency alpha value.
Arguments

"file name" Type: LtString
Default:""
Range:-
Hint:-
"image" Type: LtGenericPtr
Default:NULL
Range:-
Hint:-
"scale" Type: LtFloat
Default:1.0
Range:[ 1e-006, inf ]
Hint:[ 0.01, 1000 ]
"aspect ratio" Type: LtFloat
Default:1.0
Range:[ 1e-006, inf ]
Hint:[ 0.01, 1000 ]
"width" Type: LtFloat
Default:1.0
Range:[ 1e-006, inf ]
Hint:
"height" Type: LtFloat
Default:1.0
Range:[ 1e-006, inf ]
Hint:
"softness" Type: LtFloat
Default:1.0
Range:[ 0, inf ]
Hint:-
Locationlishlite
Description The image/texture file specified is used as an alpha transparency mask.

The image can be RGB or greyscale. If it is RGB, only the 'red' channel is used.

A value of 0.0 is transprent, and a value of 1.0 opaque. Values between 0.0 and 1.0 allow the background to be seen `through' the foreground (i.e., a translucent effect is generated).

The "wrapped mask" transparency shader would often be used as the transparency shader associated with a "decal" shader.

The name of the file containing the image data is provided as a string to parameter "file name". The file must contain image data in a format for which an appropriate image driver is currently installed.

Alternatively a pointer to a valid LtImage data structure may be given via parameter "image". If the value NULL is given then the image will be extracted from the file represented by "file name", otherwise the "image" parameter takes precedence. Note that the shader does not maintain a copy of the LtImage specified in this way, so it is the responsibility of the developer to ensure that this image data remains valid for as long as the shader references it.

The "scale" parameter defines how many times the image texture fits into each unit of the (s,t) texture-space coordinate system (in fact to be precise this parameter defines the number of times which the height of the image will fit into one unit of the t direction of texture-space).

The "aspect ratio" parameter allows the aspect ratio (the width divided by the height) of the texture to be altered. Note that by default LightWorks fits the image into a single square of (s,t) texture space (or the number of squares of texture space implied by the value given for the "scale" parameter). If your original image file is not square, therefore, you will need to set the "aspect ratio" paremeter as appropriate.

New! The "width" and "height" parameters are provided as an alternative to "scale" and "aspect ratio" which may be more suitable for many applications. Generally speaking you would want to expose either the "width" and { "height" method or the "scale" and "aspect ratio" method, but not both (it may make sense in some cases to expose the "scale" parameter in addition to "width" and "height", but certainly not { "aspect ratio" as well).

The parameter "softness" controls the degree of blurring on the image texture.

Previous page alphabetically (wrappedmaplefloor)
Next page alphabetically (wrappedmirror)
Index


Copyright © 1990-2005, 2006 LightWork Design Limited. All rights reserved