Hey sal2...
You really do seem to be all over the map you know!
There are a number of ways of doing this:
1. simple but cost a lot in ram, would be to create and group 18
duplicates.
Then assign each one a different texture. In the attribute editor under
xxxxShape is the Render Stats section. You could turn the Primary
Visibility
OFF(unchecked) for all your duplicates except one.
Look at the script editor when you check and uncheck the "primary
visibility"
checkbox. Copy and paste the code into the objects expression...
if (frame == 10) {
// turn off visibility for your other duplicates
setAttr "nurbsSphereShape1.primaryVisibility" 0;
setAttr "nurbsSphereShape3.primaryVisibility" 0;
// and turn on visibility for your selected duplicate
setAttr "nurbsSphereShape2.primaryVisibility" 1;
}
2. Use a cascade of color blend utility nodes:
Create 3 color nodes: CN1,2,3
CN2 - has 2 textures as input and outputs to CN1
CN3 - has 2 textures as input and outputs to CN1
CN1 - has CN2, and CN3 as input
and has the output connected to your shader
// extending this has both CN2 and CN3 each having 2 more blend modes
each,
creating CN4,5,6,7 (4 nodes with a total input of 8 textures).
// extend this one more level and you have 8 new nodes and 16 input
textures.
// next comes 16 nodes and a possibility of 32 input textures...
You control this switching by changing the blender between 0 or 1.
setAttr "blendColors1.blender" 0.0; or
setAttr "blendColors1.blender" 1.0;
This is a switching network- combinations of blender states select which
texture
is displayed.
if (frame == 10) { // Displays texture 3
setAttr "blendColors1.blender" 1.0;
setAttr "blendColors2.blender" 0.0;
setAttr "blendColors3.blender" 1.0;
}
3. This is the most efficient method, assuming no blended textures are
used.
Create a simple shader to file connection.
Go to load the file name, load it, and view the top of the script editor.
(a correct replay of the coding for loading a texture file texture is
displayed).
Copy and Save all 18 textures.
Then open you object's expression editor:
if (frame == 1){
AEassignTextureCB file1.fileTextureName
"D:/Maya_Projects/T/source_images/cobbleStone.jpg" "image";
}
if (frame == 10) {
AEassignTextureCB file1.fileTextureName
"D:/Maya_Projects/T/source_images/gravel_1.jpg" "image";
}
hths.. aen
>Greets All
>
>I have 18 different textures for the same object and I would like to
animate the object
>when it extrudes. The texture should change when the object extrudes at
a certain level.
>Can I have this many blend nodes?
>I only see that I can plug in two colors or textures can I increase this
to 18 some how?
>
>tia sal2


|