What's New in Director 8.5 > Working with Models and Model Resources > Shaders > Properties of the standard shader

 

Properties of the standard shader

The standard shader makes the surface of a model appear in a photorealistic style. Use these properties to work with the standard shader:

Property Name

Access

Description

Default

name

Get

The string name of this shader.

None

ambient

Get and set

A Lingo color object describing the surface's reaction to ambient light.

rgb(63,63,63)

diffuse

Get and set

A Lingo color object describing the surface's reaction to diffuse light. Ambient and diffuse color objects together describe a model resource's base color.

rgb(255,255,255)

specular

Get and set

A Lingo color object describing the surface's specular highlight color. This setting has an effect only if there are lights in the scene whose specular property is TRUE (1).

rgb(255,255,255)

shininess

Get and set

An integer between 0 and 100 indicating how shiny a surface is.

30.0

emissive

Get and set

A Lingo color object describing the color of light this object seems to give off. This does not turn the surface using this shader into a light source; it just gives it the appearance of being one.

rgb(0,0,0)

blend

Get and set

An integer between 0 and 100 indicating how transparent (0) or opaque (100) this surfaces is. Unlike with a texture that includes alpha information, this setting affects the entire surface uniformly.

100

transparent

Get and set

This property controls whether or not the model is blended using alpha values or rendered as opaque. The default is TRUE (1) (alpha blended). The functionality of shader.blend is dependent on shader.transparent.

TRUE (1)

renderStyle

Get and set

This property can take the following values:#fill#wire#point

When shader.renderStyle = #fill, the polygons of the mesh are filled. When shader.renderStyle = #wire, the polygon edges of the mesh are rendered. When shader.renderStyle = #point, the vertices of the mesh are rendered, provided that #Fill is supported by the #software renderer.

#fill

flat

Get and set

When shader.flat = TRUE (1), the mesh should be rendered with flat shading instead of gouraud shading, which shades each polygon separately. Flat shading shades the mesh as a whole.

FALSE (0)

textureList

Get and set

A shader can use up to eight layers of textures. This eight-element list defines which texture is used for which layer. Get: Returns a list of texture objects, one per layer. Set: Specifies a texture object to be applied to all layers. An argument of void disables texturing for all layers.

void

textureList[index]

Get and set

A shader can use up to eight layers of textures. This property gives access to the texture at the indicated index position.

void

texture

Get and set

This property allows access to the texture for the first layer. It is equivalent to textureList[1].

An argument of void can be used to disable texturing for the first layer.

void

reflectionMap

Get and set

Get: Returns the texture associated with the third layer. Set: Specifies a texture to be used in the third layer and applies the following values:

textureModeList[3] = #reflection

blendFunctionList[3] = #blend

blendSourceList[3] = #constant

blendConstantList[3] = 50.0

void

diffuseLightMap

Get and set

Get: Returns the texture associated with the second layer.

Set: Specifies a texture to be used in the second layer and applies the following values:

textureModeList[2] = #diffuse

blendFunctionList[2] = #multiply

blendFunctionList[1] = #replace

void

specularLightMap

Get and set

Get: Returns the texture associated with the fifth layer.

Set: Specifies a texture to be used in the fifth layer and applies the following values:

textureModeList[5] = #specular

blendFunctionList[5] = #add

blendFunctionList[1] = #replace

void

glossMap

Get and set

Get: Returns the texture associated with the fourth layer.

Set: Specifies a texture to be used in the fourth layer and applies the following values:

textureModeList[4] = #none

blendFunctionList[4] = #multiply

void

textureModeList[index]

Get and set

This property allows access to the texture coordinate generation function used for a texture at the texture level and then to allows you to change how textures are applied to a model's surface. The property can take the following values:

#none#wrapPlanar#wrapCylindrical#wrapSpherical#reflection#diffuseLight#specularLight

#none

textureModeList

Get and set

Get: Returns a list of texture coordinate generation functions, one per layer.

Set: Specifies texture coordinate generation modes to be applied to all layers.

Possible values are as follows:

#none#wrapPlanar#wrapCylindrical#wrapSpherical#reflection#diffuseLight#specularLight

#none

textureMode

Get and set

Access to the texture coordinate generation function for the first layer.

Possible values are as follows:

#none#wrapPlanar#wrapCylindrical#wrapSpherical#reflection#diffuseLight#specularLight

#none

wrapTransformList[index]

Get and set

Access to the texture coordinate generation transform associated with a specified layer. This transformation has effect only if the textureModeList[index] is #wrapPlanar, #wrapSpherical, or #wrapCylindrical.Controls the orientation of texture coordinate generation in model-relative space.

Use this property to change the orientation, offset, and scale of how the wrapTransformList[index] is applied on the model.

transform(50.0000,0.0000,0.0000,0.0000, 0.0000,50.0000,0.0000,0.0000, 0.0000,0.0000,50.0000,0.0000, 0.0000,0.0000,0.0000,1.0000)

wrapTransformList

Get and set

Controls the orientation of UV generation in model space.

Get: Returns a list of texture coordinate generation transforms, one per layer.

Set: Specifies a texture coordinate generation transform to be applied to all layers.

transform(50.0000,0.0000,0.0000,0.0000, 0.0000,50.0000,0.0000,0.0000, 0.0000,0.0000,50.0000,0.0000, 0.0000,0.0000,0.0000,1.0000)

wrapTransform

Get and set

Access to the texture coordinate generation transform for the first layer.

Controls the orientation of the UV generation in model space.

transform(50.0000,0.0000,0.0000,0.0000, 0.0000,50.0000,0.0000,0.0000, 0.0000,0.0000,50.0000,0.0000, 0.0000,0.0000,0.0000,1.0000)

textureTransformList

Get and set

Access to the list of texture coordinate modifier transforms, one per texturing layer.

The textureTransform is applied to all texture coordinates regardless of the textureMode property setting. This is the last modification of the texture coordinates before they are sent to the renderer. Allows you to manipulate the scale, orientation, and positional offsets of the source image before it's wrapped. WrapTransformList changes the projection of the transformed texture.

The textureTransform matrix operates on the texture in textureImage space, which is defined to exist only on the X,Y plane. Rotations about the Z axis are rotated around the (0,0) point, which maps to the upper left corner of the texture. Translating by integers when textureRepeat is TRUE (1) has no effect, because the width and height of the textures are defined to be 1.0 in textureImage space. Care must be taken not to scale any dimension (even Z) by 0.

Identity transform

textureTransformList[index]

Get and set

Access to the texture coordinate modifier transform associated with a specified layer.

Identity transform

textureTransform

Get and set

Access to the texture coordinate modifier transform for the first layer.

Identity transform

blendFunctionList[index]

Get and set

Access to the blending function associated with a texture layer at the position indicated by index, which must be a positive integer smaller than or equal to 8.

Possible values are as follows:

#replace

#multiply

#add

#blend

#alpha

#constant

For detailed information on all of these options, see blendFunctionList.

#multiply

blendFunction

Get and set

Access to the list of blending functions, #multiply, #replace, #blend, and #add, for the first layer.

#multiply

blendFunctionList

Get and set

Access to the list of blending functions, #multiply, #replace, #blend, and #add, for all layers.

#multiply

blendSourceList[index]

Get and set

Access to the blending source associated with a specified layer.

When the blendFunction property is set to #blend for the <index>th layer, this results in the <index>th texture being combined with the result of the previous layers for the entire texture using a single blending ratio. The blending ratio, in this case, is the value of blendConstant for layer <index>. For example, if the layer at that index position's blendConstant value is 0.9, the resultant texture will be 90% of the texture at that index position and 10% of the result of the previous texture layers

Possible values are #constant and #alpha.

#constant

blendSourceList

Get and set

Access to the blending sources for each layer, providing that the blend function is set to #blend.

Possible values are #constant and #alpha.

#constant

blendSource

Get and set

Access to the blending sources for the first layer, providing that the blend function is set to #blend.

Possible values are #constant and #alpha.

#constant

blendConstantList[index]

Get and set

The blending ratio used for a specific layer when the blend function is set to #blend and blendSourceList[index] is set to #constant. Returns a floating-point value from 0.0 to 100.0.

50.0

blendConstantList

Get and set

The blending ratio used for any layer when the blend function is set to #blend and blendSourceList[index] is set to #constant. Returns a floating-point value from 0.0 to 100.0.

50.0

blendConstant

Get and set

The blending ratio used for the first layer when the blend function is set to #blend and blendSourceList[index] is set to #constant. Returns a floating-point value from 0.0 to 100.0.

50.0

textureRepeatList[index]

Get and set

Allows you to get or set the texture clamping behavior associated with a specified layer. Texture clamping refers to how a texture "clamps" to its shader. If the ratio of the texture to the shader is less than 1 to 1 and textureRepeatList is set to TRUE (1), the texture tiles over the shader. If textureRepeatList is set to FALSE (0), the texture isn't repeated but appears only once in one part of the shader.

If the ratio of the texture to the shader is greater than 1 to 1 and textureRepeatList is set to FALSE (0), the border of the texture is extended past the unit UV coordinate range.

TRUE (1)

textureRepeatList

Get and set

Access to the list of texture clamping behaviors, one per layer.

When set to FALSE (0), the border of the texture is extended past the unit UV coordinate range.

Get: Returns a list of texture clamping behaviors, one per layer.

Set: Specifies a texture clamping behavior to be applied to all layers.

TRUE (1)

textureRepeat

Get and set

Access to the texture clamping behavior for the first layer.

When set to FALSE (0), the border of the texture is extended past the unit UV coordinate range.

TRUE (1)