3D Lingo Dictionary > T-Z > texture

 

texture

Syntax

member(whichCastmember).texture(whichTexture)
member(whichCastmember).texture[index]
member(whichCastmember).shader(whichShader).texture
member(whichCastmember).model(whichModel).shader.texture
member(whichCastmember).model(whichModel).shaderList.texture
member(whichCastmember).model(whichModel).shaderList[index].texture
member(whichCastmember).modelResource(whichParticleSystemModelResource).texture

Description

3D element and shader property; an image object used by a shader to define the appearance of the surface of a model. The image is wrapped onto the geometry of the model by the shader.

The visible component of a shader is created with up to eight layers of textures. These eight texture layers are either created from bitmap cast members or image objects within Director or imported with models from 3D modeling programs.

Create and delete textures with the newTexture() and deleteTexture() commands.

Textures are stored in the texture palette of the 3D cast member. They can be referenced by name (whichTexture) or palette index (textureIndex). A texture can be used by any number of shaders. Changes to a texture will appear in all shaders which use that texture.

There are three types of textures:

#fromCastmember; the texture is created from a bitmap cast member using the newTexture() command.

#fromImageObject; the texture is created from a lingo image object using the newTexture() command.

#importedFromFile; the texture is imported with a model from a 3D modeling program.

See the 3D Lingo by Feature section for a complete list of texture properties.

The texture of a particle system is a property of the model resource, whose type is #particle.

Example

This statement sets the texture property of the shader named WallSurface to the texture named BluePaint.

member("Room").shader("WallSurface").texture = member("Room").texture("BluePaint")

See also

newTexture, deleteTexture