PDA

View Full Version : maya 2008 particles stick on surface and don't move


Strob
07-28-2010, 03:59 PM
hi,

I'm trying to do what seems to be simple but I just can't!

In maya 2008 (so classic particles) I want some snow particles to fall on an character's animated mesh and stick were they fall without sliding on the mesh.

The only result I can get is particles colliding, then staying in space where they hit wihout following the mesh or kind of sliding randomly on the mesh....

mandark1011
07-28-2010, 08:50 PM
You could use an event to call closestPointOnMesh in runtime using goals.
Been a long time for me using it so no help with an actual expression but thats the workflow i believe. Maybe one of the technically gifted fx artists here could help you get farther.

Strob
07-28-2010, 09:23 PM
thanks i will try to look into that "closestPointOnMesh".

mandark1011
07-28-2010, 09:31 PM
your welcome! Baby Ironman was amazing...loved it!

Strob
07-28-2010, 09:37 PM
Thanks a lot!

ctp
07-28-2010, 10:19 PM
There's some help here too:

http://forums.cgsociety.org/showthread.php?f=86&t=820118 (http://forums.cgsociety.org/showthread.php?f=86&t=820118)

Strob
07-28-2010, 10:51 PM
Yes thanks. I already tried that one, but with the goals, the particles still slide on the surface...

I'm starting to think it's just impossible to do this with Maya classic particles.

sdserbos
07-29-2010, 01:11 AM
I'm not in front of Maya right now but two things come to mind.
Create the collision event and if the collision has occurred set the particle velocity to <<0,0,0>>.
Or store the particle position when the collision occurs and reapply it.

Derek Wolfe
07-29-2010, 01:45 AM
Add:
collisionU, collisionV
goalU, goalV, goalPP
and a float PP attribute called switch.
and a float PP attribute called event.

creation expression:
particleShape1.goalPP = 0;
particleShape1.switch = 0;

runtime expression:
if(particleShape1.event == 1 && particleShape1.switch == 0)
{
particleShape1.goalPP = 1;
particleShape1.goalU = particleShape1.collisionU;
particleShape1.goalV = particleShape1.collisionV;
particleShape1.switch = 1;
}

Enjoy.

Strob
07-29-2010, 11:49 AM
@Derek Wolfe:
You're my man!!! That works like a charm! the switch was missing in my runtime expression!

If I understand correctly, without the switch, it's like if the particles keep generating new collisions and keep getting reassigned new UVs coordinates, hence the sliding.

ctp
07-29-2010, 12:30 PM
Actually the particles keep colliding, unless you use particleShape1.traceDepthPP=0;
which was mentioned in the other thread I referred to... look at reply #4 by TheRispo.

You can verify the collision count by choosing to display the particles as numeric and type "event" (without "") in the Attribute Name to be displayed numerically.

But anyway... whatever works :D

Strob
07-29-2010, 12:48 PM
Yes I know about traceDepthPP, but it was not working in my case... the particle kept sliding event with tradepthPP set to zero afterfirst collision... It's like they kept being reassigned to new UVs coordinates.

Good to know about the collision count display.

Derek Wolfe
07-29-2010, 04:32 PM
Glad to help.
It looks as though the frame during which the collision occurs is fine, and gives a useful UV value, but after the collision frame it will sometimes return a "-1" (since it was not colliding, but rather bouncing after the collision). This is my solution to ensure that the goalU and goalV are set only once, and will not change. It works, but I'm certain that there are other methods that will also work.

CGTalk Moderation
07-29-2010, 04:32 PM
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.