PDA

View Full Version : Random Hue on Instanced Objects.


T-R
03-08-2005, 11:08 PM
Hi,

Well basically the thread title says it all.

I have some particles that are instanced to my leaf model which has a file texture. I would like to have these instances to have various hues/colours, something that will have a variation in the shading. I'm not too familiar with switches, but figured this might be the way. Unfortunatly all the examples/tutorials on switches I have found have included multiple objects and not a single object that has instances.

I also tried duplicating my leaf model, applying a 2nd texture to it and having 2 instances, but the render seems to combine both textures togeather and is obvious that its not working properly.

Any help would be appreciated.

amir jahanlou
03-09-2005, 06:34 AM
Well I don't want to disappoint you but as much as I have spent ( waisted ) hours doing this it is basically not possible, Since Maya doesn't let you to describe anything as Per Particle in an instance.

But there is an alternative:

Duplicate your leaves as many as different colors you need.
Assign different material to them.
Select them all.
Go to instancing window.
MAKE SURE you set CYCLE attribute to none.
Now in Attribute Editore add a custom attribute ( Integer one ) and assign it to
object index of instancer.


Have attached an example ( You got to unzip it )

Hope it works.

T-R
03-09-2005, 08:33 PM
Thanks amir!

This will be great for this situation. I was exploring multiple instances but would not have gotten this far. Only thing I found was that my custom attribute had to be a vector rather than an interger that you stated.

Thanks again

CGTalk Moderation
03-09-2005, 08:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.