Emiting particles from geo on the frame just before its visibilty is turned off

Become a member of the CGSociety

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

Thread Tools Display Modes
  03 March 2013
Emiting particles from geo on the frame just before its visibilty is turned off

I am not good with mel. BUt this must be very simple for the mel guys.

I have hundreds of geometries. now i wanna emit particles from it when the geometry visibility is turned off. emission should be only on that frame.

suppose visibility of geometry is "turned off" on 10th frame than i want particles to be emitted on 10th frame. and than there should be no emision

how can i do this with mel?

I have about 400 geo so i cannot manually do that for each and every emitter.:(

any help would be appreciated

  03 March 2013
You had to mention how are you emitting from your geo, but if you have one emitter per object you can use this script in your creation, to get the emitter -> geometry -> visibility stuff, and use that to control the particles lifespanPP:

$emitter = stringArrayToString(`listConnections -d 0 -s 1 ("nParticleShape1.newParticles["+nParticleShape1.emitterId+"]")`, "");
 $geoConn = stringArrayToString(`listConnections -d 0 -s 1 ($emitter + ".sweptGeometry")`, "");
 $geoShape = stringArrayToString(`listConnections -d 0 -s 1 ($geoConn+".localGeometry")`, "");
 $thisFrame = `getAttr ($geoShape + ".visibility")`;
 $nextFrame = `getAttr -t (frame + 1) ($geoShape + ".visibility")`;
 nParticleShape1.lifespanPP = ( ($thisFrame - $nextFrame) != 0) ? 2 : 0;

this could be a little heavy, depending on the size of your sim, but that's what I came up for now.
..aut inveniam viam aut faciam..
::Copy SOP 4 Maya::
  03 March 2013
I have sent you a private message can you please check that..

  03 March 2013
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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
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
Society of Digital Artists

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

All times are GMT. The time now is 08:06 AM.

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