07.12.2012 Views

Adobe Director Basics

Adobe Director Basics

Adobe Director Basics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ADOBE DIRECTOR BASICS<br />

3D: Controlling appearance<br />

If you want the texture to appear to rotate around its center, you can set the textureTransform.position to vector(0.5,<br />

0.5, 0), to place the uv point [0.0, 0.0] in the center of the shader. You will probably have to cut the texture into four<br />

equal parts and swap the parts around to obtain the desired effect.<br />

Adjusting the wrapping<br />

If you set the textureMode of a given layer #planar, #spherical, or #cylindrical, then you can use the wrapTransform<br />

for that layer to rotate the texture so that it fits the geometry of the mesh correctly. Only modifying the rotation or<br />

axisAngle properties of the wrapTransform will have any effect. Altering the position or scale of a wrapTransform will<br />

make no difference to the appearance of the shader.<br />

Note: aShader.wrapTransformList[textureLayerIndex] has an effect only when<br />

aShader.textureModeList[textureLayerIndex] is set to #planar, #spherical, or #cylindrical.<br />

Layer property lists<br />

The values for all the texture layer properties are stored in linear lists as part of the shader object.<br />

blendFunctionList<br />

blendSourceList<br />

blendConstantList<br />

textureList<br />

textureModeList<br />

textureRepeatList<br />

textureTransformList<br />

wrapTransformList<br />

To get or set a given property for a particular layer, use: shader.layerPropertyList[n].<br />

For example:<br />

aShader.blendSourceList[3] = #alpha<br />

put aShader.textureRepeatList[4]<br />

The objects that store layer properties for a shader are not true Lingo lists. You cannot set the value of one of these lists<br />

to a Lingo list. This command gives a Lingo list as the output:<br />

put member("3D").shader(1).textureRepeatList -- [1, 1, 1, 1, 1, 1, 1, 1]<br />

However, the command below will lead to a “Wrong Type” script error:<br />

member("3D").shader(1).textureRepeatList = [1,1,1,1,1,1,1,1]<br />

To set the values in all 8 layers of the shader to a given value with one command, use:<br />

aShader.layerPropertyList = aValue<br />

For example:<br />

member("3D").shader(1).textureRepeatList = 1<br />

Painter shaders<br />

To explore the properties of the Painter shader, download and launch the movie ShaderTypes.dir.<br />

See “Shader types” on page 35for details on how Painter shaders interact with lights. See “Toon modifier” on page 138<br />

for a different way to achieve similar results.<br />

Last updated 8/26/2011<br />

135

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!