PDA

View Full Version : Emit particle from collision.... again.


PerfectLine
03-04-2011, 10:40 PM
So, this tends to come up in maya often because it is still using the oldest method for creating particles on collision.

There are the endless posts of the gnomon tutorial that shows how to create a softbody copy of your object and then use the collision event editor to spawn particles.

My problem with this method is that it is really cumbersome for such a simple effect.

In XSi, 3dsmax, Lightwave, etc you can literally just tell the app to spawn particles on collisions. Then... drum roll... when ever an item that has colisions turned on touches another object..... it spawns particles. Now, I've saved my old school scene so I can break it back out every time I need this effect.

Yet, I don't understand why we just can't have a drop down item that says "omni, directional, surface, etc" that has a checkbox below the rate (particles/sec) that just says "emit on collision" and then give us a box that allows us to add/remove geometry to the list of objects it will emit particles upon collision with.

This single effect which is effortless in other apps is always a "make new object, copy object, create particle event, etc etc.".

Too many steps for a simple and commonly used effect. It should be a checkbox and an item list and that is it. In other apps its like flipping a light switch. In maya it always feels like I have to make hidden geometry and special lists and attributes.

Also, why I am at it.... why can't we emit particles from a projected texture yet?

Thanks. :)

Just some thoughts for future maya releases.

PerfectLine
03-05-2011, 12:33 AM
One of the main hangups I get into when creating this effect is that I want to emit particles from the colliding objects but do not want the particles themselves to be affected by the collision objects.

Often I can use a texture emit based on a UV ramp for the effect but then if I am in a situation where the UV's are already made and referenced into the scene then I need a way of creating particles emitting from a surface based on another object passing through the surface without the other object hitting the particles.

I'll post an example vid over the weekend showing the desired effect.

Aikiman
03-05-2011, 01:03 AM
I feel your pain, I think Mayas particle events could do with a massive overhaul.

There is a work around but it does involve creating a network of nodes and baking out a vertex map, probably not something people are keen to do as we all want it automated for ease of use.

PerfectLine
03-05-2011, 06:50 PM
I feel your pain, I think Mayas particle events could do with a massive overhaul.

There is a work around but it does involve creating a network of nodes and baking out a vertex map, probably not something people are keen to do as we all want it automated for ease of use.

Is the workaround on your site? I also know of a script that will look at the rigid bodycollision data and then emit particles from that data. I am trying to find it today so I can put it to work on monday.

Aikiman
03-05-2011, 07:16 PM
Sorry I dont have the workaround on my website but I can help you no worries if you decide to take this avenue. I guess you've seen SOuP by Peter Shipkov? If not heres his website so you can go and see what its all about... www.soup-dev.com and if you are really keen you can download his plugin, they are 64bit builds only so hopefully it will work for you.

Ive uploaded an example showing collisions and particles to see if I get the gist of what you are saying, these are MAyas old particle system so you dont have to worry about sticking nRigids on a different collision layer.


http://rapidshare.com/files/451093111/particles.mp4

Notice the blue particles collide with the torus but dont emit, then they collide with sphere and do emit and lastly they dont collide with the plane but still emit. All this with no code but there is a bit of node set up using SOuP and it can be hard if you are not used to a nodal workflow.

The way the emission works is not actually based on collisions but actually based on proximity of two objects - particles and mesh shape. As the particles come close to the second object the particle points transfer weight data over to the vertex points (actually you will need an expression at creation time "weightPP=1"). From here you can bake out the vertex map and then import as texture emission for your surface emitter.

So all you have to do now is decide whether you want the particles to collide with the surface or not. If not, then your particles will pass right through the surface and yet you will still see particle emission at those points.

The biggest hassle with this is that if you change the particle sim for any reason you have to rebake and reimport the vertex maps so make sure you are 100% happy with the sim before you do this if possible.

Like I said if you really want to go down this route, I will help you offline.

Aikiman
03-05-2011, 07:18 PM
Do you work at Digital Domain? Then you would know Peter right? ;)

PerfectLine
03-05-2011, 07:50 PM
AH, ok. This will work fine. Its a nice solution too. I mean, you have to plan it out before hand (vertex map) but its not too bad and will work for the effect.

I actually use MEL a lot so am ok with expressions and scripts, but this is even more simple then I was thinking. I was over thinking it. I am working on the commercials side at DD so I rarely see Peter. I was on the features side for Tron:Legacy but was with the lighting and shading / lookdev team.

Your tutorial on fluid emission directly from a surface is also on my list of things to test this weekend.

Aikiman
03-05-2011, 07:57 PM
AH, ok. This will work fine. Its a nice solution too. I mean, you have to plan it out before hand (vertex map) but its not too bad and will work for the effect.

I actually use MEL a lot so am ok with expressions and scripts, but this is even more simple then I was thinking. I was over thinking it. I am working on the commercials side at DD so I rarely see Peter. I was on the features side for Tron:Legacy but was with the lighting and shading / lookdev team.

Your tutorial on fluid emission directly from a surface is also on my list of things to test this weekend.

Yeah you're right it needs a little pre-planning, I was a little worried after I posted that I may have opened a can of worms especially if you have a pre-built scene things can get tricky to make it all work.

Have fun, the fluid emission is one of my favourites as it doesnt require baking out vertex maps which is nice and flexible. Im hinting to Peter to create a pointCloudParticle emitter just for this reason. ;)

PerfectLine
03-06-2011, 04:44 AM
One question before I move forward, can I compile the fluid emitter for linux with the proj file you have, or have you already compiled it for linux?

We run debian and centOS Maya here.

Aikiman
03-06-2011, 05:03 AM
Are you running Maya 2011? If so theres no need to compile as texture emission is built in with the fluid emitter.

If not I cant be sure but I cant see why it would not compile for linux.

PerfectLine
03-07-2011, 06:13 AM
I am using maya 2011 to test at home but will be running maya 2009 on the project at work.

I've been testing the fluid upres today in the Soup plug-ins. It looks great. Better then I thought it would do. My only problem is that when I render it, it doesn't work. I mean I can render any single frame but when I farm render it, it is just a mess.

I did cache the source fluid first. Then I figured I would cache the upres fluid too. For some reason the scene wont render correctly. If I go to any frame and render it renders fine but on the farm or in a local batch it wont render correctly at all. Fills the box with some noise.

Aikiman
03-07-2011, 06:48 AM
you'll need to go to soup-dev.com theres a thread there with details I believe. This is one node I havent been using based on my low spec system, sorry about that.

CGTalk Moderation
03-07-2011, 06:48 AM
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.