Creating more of an existing nParticle

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2013   #1
Creating more of an existing Particle

So I'm making a particle field, specifically an asteroid field. I'm using the particle tool to sketch my particles directly into the perspective viewport, which is working out great. I sketch my particles and render them, but I decide that there aren't enough. So, I grab my particle tool again, but it just wants to create new particles instead of making more of my existing particles.

All I want to know is how to create more particles using the node I've already created. I've tried re-naming the tool to match the old one before I create them, but Maya just adds a "1" at the end or something. If I can't figure this out I'll probably just save my particles as a preset and re-draw them - it's much better than having to re-create them each time.

And I'm using classic particles or what have you rather than nParticles. Thanks!

Last edited by astu11 : 01 January 2013 at 07:21 PM.
 
Old 01 January 2013   #2
Hey astu11,

the only thing that came to my mind was the emit mel command. You sketch your particles like you did before. To add the particles from your newly created particles to the old ones type the following:

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

string $myOldParticles = "nParticle1"; // insert your name old name here
string $myNewParticles = "nParticle2"; // insert your new name here

float $pPos[]= `getParticleAttr -at position -array true $myNewParticles `;
int $count = `getAttr ($myNewParticles + ".count")` * 3;
string $emitCmd = "emit -object " + $myOldParticles;

for ($i = 0; $i < $count; $i+=3){

$emitCmd += " -pos " + $pPos[$i] + " " + $pPos[$i+1] + " " + $pPos[$i+2];

}

eval $emitCmd;

/////////////////////////////////////////////////////////////////////////////

This should do the trick.

Cheers
Ray
 
Old 01 January 2013   #3
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:12 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.