PDA

View Full Version : Needing help about particle instance


fsnowzhguigui
10-20-2009, 02:26 AM
I'm trying to do some particle instance,but I don't know how to instance one particle source with several individial object,I just know instance one particle source with one object, I appreciate so much if someone could give some advice.

waiting

Thanks

stooch
10-20-2009, 02:38 AM
you have to add an ID attribute to your particle shape.
then you can use a random generator or index to set the instance index per particle
same way you do any other per particle attribute.

you just have to make sure you go into the instancer section and setup the connection between the index and your new attribute.

fsnowzhguigui
10-20-2009, 02:57 AM
you have to add an ID attribute to your particle shape.
then you can use a random generator or index to set the instance index per particle
same way you do any other per particle attribute.

you just have to make sure you go into the instancer section and setup the connection between the index and your new attribute.

thank you very much for your advice,but I still have some questions

1 how to add an ID attribute

2 how to set a random generator and could a random generator generates several objects that
I models at first

appreciating and waiting

fsnowzhguigui
10-20-2009, 03:14 AM
you have to add an ID attribute to your particle shape.
then you can use a random generator or index to set the instance index per particle
same way you do any other per particle attribute.

you just have to make sure you go into the instancer section and setup the connection between the index and your new attribute.

thank you very much but I still have some questions
1 how to add an ID attribute
2 how to set a random generator

appreciating

fsnowzhguigui
10-20-2009, 06:37 AM
you have to add an ID attribute to your particle shape.
then you can use a random generator or index to set the instance index per particle
same way you do any other per particle attribute.

you just have to make sure you go into the instancer section and setup the connection between the index and your new attribute.


thank you very much but I still have some questions
1 how to add an ID attribute
2 how to set a random generator

appreciating

mandark1011
10-20-2009, 08:12 AM
try this

grab all your objects and instance them to your particle
create a pp float att called objIndex on your particle

type this into creation
objIndex = int(rand(0,9)); (assuming you have ten objects)

now plug objIndex into the object index tab in your instance section of your particle.

what youve got here is a random number generator that will only choose whole numbers. when you grab all your objects and instance them maya will automatically attach a number to each piece. So ...at creation each particle gets a random whole number between 0 and 9 then using the instancer tab you assign that number to a number of a piece of geomtrey

if you have access to the gnomon dynamics tutorials they are great for beginning to learn expressions and connections for the instancer etc. as well as some great techniques for other particle types.

good luck

stooch
10-20-2009, 03:42 PM
instead of making it random(0,9) make it (-.49,9.49)

otherwise your chances of getting a 9 and 0 are half as likely as other numbers.


try this

grab all your objects and instance them to your particle
create a pp float att called objIndex on your particle

type this into creation
objIndex = int(rand(0,9)); (assuming you have ten objects)

now plug objIndex into the object index tab in your instance section of your particle.

what youve got here is a random number generator that will only choose whole numbers. when you grab all your objects and instance them maya will automatically attach a number to each piece. So ...at creation each particle gets a random whole number between 0 and 9 then using the instancer tab you assign that number to a number of a piece of geomtrey

if you have access to the gnomon dynamics tutorials they are great for beginning to learn expressions and connections for the instancer etc. as well as some great techniques for other particle types.

good luck

CGTalk Moderation
10-20-2009, 03:42 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.