instance Particles


#1

Hi Friends.

I wish to ask this through MEL .I needs to know what mel script we can use to assign particles on to the 3D geometry.

suppose I kept 10 cubes in a row and 10 cubes in column , I needs to assign particles to them but to the center :wip: of the geometry or pivot.

So what should be the best set up for this.

I dont want first to create particles and then simply instance them.


#2

easiest way to get particles on objects is to use softbdies. So simply create a polyplane with 10x10 subdivisons, select the geo, convert to softbody and you get your particleobject with a particle on each cv.
In the case you need a particle on each pivot point of the cubes, you have to create either a new geo or query the center of each cube and place particles wirh the “particle” - command.


#3

You could use the following bit of mel to create a particle at the translate location of all selected items ( substitute your particle name )

string $s[] = ls -sl;
for( $sel in $s ){

float $t[] = getAttr( $sel + ".t");
emit -position ($t[0]) ($t[1]) ($t[2]) -o nParticleShape1;

}
saveInitialState nParticleShape1;


#4

Thanks a lot Sir because of You only we could able to learn maya from Its Core.

I always request you sir when ever we stuck I need yours true support and knowledge to enhance maya learning . :wavey:


#5

Respected Sir,

What if we are also required to move and orient according to the motion and velocity of particles.


#6

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.