Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   random instanced object... (https://simplymaya.com/forum/showthread.php?t=14076)

tinokl 24-10-2004 09:28 PM

random instanced object...
 
i'm back :p
so now to my question
i'd like the particle to choose one of my instancer objekts (i've got 3 ) and i tried some expressions but i'm very new to expressions

so it didn't worked...
:confused:

can anyone help me please :rolleyes:

thx...

tino

Alan 25-10-2004 10:38 AM

ok quickly here's how you do it:

create a particle system, add an attribute to it called index and make it a per particle float attribute.

Now create your objects to instance. E.g. a sphere, a cone and a cube.

select them and create a particle instance. In the instancer options there should be an option called "object index" change that to "index".

Now create the following expression in your particleShape "per particle (array) attributes" under the "index" entry (right click and create a creation expression)

particleShape1.index = rand(0, 2); (where particleShape1 is the name of your particleShape and the rand number is the number of objects you have to randomly choose from.

That's about it, and incidently this is roughly how i did the text effects in AVP earlier this year :D see you learn something new everyday

:ninja:
Alan

tinokl 25-10-2004 11:54 AM

thanks alot
 
ok now its much easier than before (maby because i know how to do it now...:p )

thx for help

tino


All times are GMT. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018