SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Maya Questions / Dynamics & Special Effects / Particle Death Question

Dynamics & Special Effects Maya Particles, nDynamics, Fluids, Rigid Bodies & General VFX

Join the conversation. Reply to post
 
Thread Tools
04-07-2009, 03:17 AM   #1
Calvin
Registered User
 
Join Date: Nov 2002
Location: Philippines
Posts: 135
Particle Death Question
Hello all.

I'm dabbling into nParticles now, and I was wondering if there was a good way to kill particles that leave a certain area? Sort of like that Daemon in ReelFlow, where particles only exist in a certain volume. The reason for this is to speed up calculations. If particles are spilling off screen then I don't really need them around much anymore.

I've been told to have the particles die upon collision, but how do you get particles to die only when colliding with a specific object?

Or To script it so that when the particles position goes beyond a locator's for example, it dies. But I don't know the script. I can possibly dissect some other script but if anyone knows how I'd much appreciate it.

Thanks in advance,

Calvin
  Reply with quote
04-07-2009, 05:18 AM   #2
ragecgi
Registered User
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Are you talking about killing your nParticles?

...or regular particles?

Sorry, I just want to clarify, and make sure i don't tell you the wrong methods
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
  Reply with quote
04-07-2009, 07:58 AM   #3
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
You can use fields to kill particles with a runtime before dynamics expression using the inpfut force of a volume axis field


if(inputForce[0]>0)
{
lifespanPP = 0;
}

think that this will work with both types of paticles.
__________________
"No pressure, no diamonds" Thomas Carlyle
  Reply with quote
04-07-2009, 08:10 AM   #4
Calvin
Registered User
 
Join Date: Nov 2002
Location: Philippines
Posts: 135
To RagecgI: I was asking for nParticles, but I don't think the procedure would be that different with legacy particles, would it?

To gester123: Thanks, will try that, and get back to you guys on how it goes.


Thanks
  Reply with quote
04-07-2009, 08:35 AM   #5
ragecgi
Registered User
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Yep, gster123's post should do you just fine
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
  Reply with quote
04-07-2009, 09:00 AM   #6
Calvin
Registered User
 
Join Date: Nov 2002
Location: Philippines
Posts: 135
Hmmm... not working for me.

ParticleDeath is the name of my cube volume axis field:

if (ParticleDeath.inputForce[0] >0)
{

nParticleShape1.lifespanPP = 0;
}

I've got a simple emitter emitting water particles, but they still live past the volume axis field.

Any idea what I'm doing wrong?


Thanks
  Reply with quote
04-07-2009, 09:31 AM   #7
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
hi calvin, make sure that thats the correct number for the field, uif you have more in the scene it changes the number, should have said that in my previous post as the example there is only the vol axis field there.

YOu alsn eed to set tup the particles lifespan to be Per particle. Its not the fields force wither its the particles

Full script without being lazy

if(particleShape1.inputForce[0]>0)
{
particleShape1.lifespanPP = 0;
}
__________________
"No pressure, no diamonds" Thomas Carlyle

Last edited by gster123; 04-07-2009 at 09:35 AM.
  Reply with quote
04-07-2009, 11:19 AM   #8
Calvin
Registered User
 
Join Date: Nov 2002
Location: Philippines
Posts: 135
Hey everyone,

This is fun I did forget to turn the particle lifespan to LifespanPP only. Its working now except that the particles die upon entering the volume axis field. What if I want the reverse? I want to emit particles and they can only live inside the field, and die when they exit.

Thanks
  Reply with quote
06-07-2009, 10:48 AM   #9
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
cant test it out at the moment but owuld changiong the input force not to it, so that when the input force is equall to 0 (I.e not being effected by the field) it kills em.
__________________
"No pressure, no diamonds" Thomas Carlyle
  Reply with quote
21-12-2011, 05:09 PM   #10
rhonedog
Registered User
 
Join Date: Jul 2004
Location: Vancouver
Posts: 1
I don't know if you ever got this technique working, but I have a quick tutorial I wrote up doing exactly what you wanted. Killing Maya particles via inputForce
  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
particle direction with animated characters Razor Blade Dynamics & Special Effects 0 19-05-2012 01:01 AM
Particle collision question kittykate Maya Basics & Newbie Lounge 0 12-06-2010 06:53 PM
Question about Particle Archange1 Maya Basics & Newbie Lounge 1 08-04-2007 10:10 AM
how to emit only one particle? fxfreak1 Dynamics & Special Effects 1 22-06-2006 07:45 PM
Texture or material on particles? dax3d Dynamics & Special Effects 6 24-04-2003 12:07 AM