Introduction to Maya - Modeling Fundamentals Vol 1
This course will look at the fundamentals of modeling in Maya with an emphasis on creating good topology. We'll look at what makes a good model in Maya and why objects are modeled in the way they are.
# 1 09-07-2008 , 07:35 PM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695

static to active particles

Hey all,

So here's what I'm trying to do. I want my particles to be static until a collision object activates them. Based on a great thread by ragecgi and RaginRob, I was able to do it with ease. However, there was one unintended side effect. The collision object is pushing around the particles when all I want is for it to activate them.

I was thinking that maybe some way of scripting a per particle attribute that only collides with that object once, but I can't find a mel command to do that. While it still might cause a little movement from that first collision, it likely would be negligible, and I could live with it.

Attached is a Maya 8.5 ascii file anyone can look at if you care to try and find a solution. Everything is set up except the part ignoring the collision after the first time.

Thanks in advance for your help.

Attached Files
File Type: ma statuscollide_001.ma (132.3 KB, 271 views)
# 2 10-07-2008 , 07:58 AM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709

Re: static to active particles

Originally posted by Dann
...However, there was one unintended side effect. The collision object is pushing around the particles when all I want is for it to activate them....

Just so I'm clear, what do you mean or intend, when you say "Activate"?

The reason I ask is because if you don't want particles to be affected by an object, just don't make it collide with it.

So, if you could explain what you mean by activate, then I can take a look, and see if I can help you outuser added image


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 3 10-07-2008 , 09:05 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Hmm. How to rephrase...

By "activate" I mean move... be active... not frozen.

Imagine an object suspended in mid-air and when a character touches it, the particles begin to swirl ab about, but only the particles he touches.

If you look at my example file, it might become clearer. I hope that helps, and thank you.

# 4 10-07-2008 , 02:01 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Oh ok, I get ituser added image

What situation are your particles starting in?

i.e. are they floating in space, or resting on a floor, etc.

I'll take a look at your file quick.


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 5 10-07-2008 , 02:32 PM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Ok, I took a look, and I was glad you are using 8.5, as I still am as welluser added image

Anyhoo, I also noticed that you didn't truly have a "Collision Event" setup, I believe you may have simply selected the animated plane + particleShape and chose "Make Collide" in the particle menu correct?

Sadly, this is not a "true" collision event.
Well, it is, but just not the type of collision you neededuser added image

Check my attached edited version of your file.

All I did was select the particleShape + the animated plane and in the same particle menu chose "Collision Event Editor" and created a collision event with the following settings:
-All Collisions (change this accordingly for further events)

EVENT TYPE:
-Spread: 0
-Target Particle: particleShape1 (your original particleShape)
- Inherit Velocity: 0

EVENT ACTIONS:
-Original Particle Dies: Checked ON.

Then wen I rewound the scene and played it back the animated plane hits a few particles in the original particle sphere you created, but those particles die, and in thier place, a new particle is born that react to your gravity and fall to your floor.

BUT, they are not affected (moved around) by the animated plane.

Is this closer to what you were looking for maybe?

Attached Files
File Type: ma statuscollide_001_ragecg.ma (133.8 KB, 284 views)

Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
# 6 10-07-2008 , 04:45 PM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695
Hey Rage,

I actually thought about doing that, but here's the problem. The particles in that scene control a soft body object (it's shape node is currently hidden, sorry). By deleting the particles, the soft body gets wrecked. I was really hoping to try and figure out a way to write something like this in the dynamics expression.

Creation:
statusPP = 0;

Before Dyn
int $index = pSphere1ParticleShape.collisionGeometryIndex;
if( $index != -1 )
{
string $geoC[] = `listConnections collisionGeometry[$index]`;
string $shape[] = `listConnections ( $geoC[0] + ".localGeometry" )`;
if ((statusPP == 1) && ($shape[0] == "pPlane2")){
DO NOT COLLIDE WITH $shape[0] ;
}
else if ($shape[0] == "pPlane2") {
statusPP = 1;
}
}

# 7 11-07-2008 , 02:48 AM
ragecgi's Avatar
Registered User
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Wow.

Just a side note, ironicly in my past instead of becoming a dynamics TD where I work, I became the Compositing Super years agouser added image

So, long story short, I usualy have another TD deal with any heavy coding work.
Your code looks sweet to me, but I have no concept of how to help you in that regard. Surprisingly enough.

Sorry manuser added image

I DO believe, however, that Danny, or another kind soul may be able to help you out in the MEL forum.


Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads