Page 1 of 1
Apply physics to particles
Posted: Sat Jul 27, 2013 3:44 am
by spar9zedou
Hello all,
I searched everywhere for an answer without any success so your help would be very appreciated.
How do I apply physics to particles.
Ex:
I have a tube cross section (two curved parralel walls) as my non-moving object at the bottom of my group with physics.
I want bubbles to go through the tube and react to it so I am forced to create a particle layer within the group where I set up my physics (above my non-moving layer)
The problem is that a particle layer doesn't have a physics tab. When I play my particles, they ignore completely the non-moving object and don't react to it.
Heeelp!!!
Re: Apply physics to particles
Posted: Sat Jul 27, 2013 5:05 am
by heyvern
Yeah, sorry but particles don't interact with physics. You won't get particles bouncing off of other shapes.
A trick I've tried is to have two particle layers, one that "spits out" and one the "bounces off" of a shape or "ground". It's sort of a fake physics interaction. So you have a particle layer that spits out and falls like normal. It ends at a specific spot and another particle layer takes over at that point to simulate the "bounce" off. You would change the force direction and spread and force settings etc etc to sort of match as close as possible the end point of the other particle layer.
Another option, depending on what effect you are trying to achieve, you could possibly use physics and a bunch of vector layers that bounce and interact with other shapes. This would require a lot of effort and a ton of layers. You wouldn't be able to have an endless stream of particles. Basically you would need to create a whole pile of layers with one tiny shape on each layer in the physics folder and give them physics properties that would simulate the particles you need.
Re: Apply physics to particles
Posted: Sat Jul 27, 2013 5:55 am
by spar9zedou
That's too bad.
I'll have to go with option 2...
Thanks for the reply.
Re: Apply physics to particles
Posted: Sat Jul 27, 2013 6:53 am
by heyvern
There is a script you can use to make this easier.
It's under the scripts menu in: Layer Effects | RT: Break Apart Shapes
What you do is draw as many particle shapes you want on a vector layer. Each shape must be a separate shape so draw one and then use copy and paste to create a whole pile of shapes. Then position your shapes where you want them. They shouldn't overlap to work with physics.
Select all the points and run the script. You want to check the "Put each shape in its own layer and group them together" option. This will put split each shape into its own layer and put inside a group. You could move them out into another physics group layer or set the physics of that group layer.
The only problem with this script is that you can't preset the physics properties. If you want to change the properties of the particles you would have to change the settings for each layer created. This can take a while if you have a lot of layers.
I have my own script that does something similar but is intended specifically for creating piles and piles of physics shape layers and it copies the original layers physics settings when breaking it apart. This saves a lot of time. My script doesn't break apart connected shapes, it only works with single closed vector filled shapes.
I will track track down this menu script and put it online for download.
Re: Apply physics to particles
Posted: Sat Jul 27, 2013 9:03 am
by spar9zedou
Great idea.
And your script seems to be even better for what I need (I'm actually representing red cells flowing through blood vessels).
If you ever put in online, you'd make me a happy man.
Thanks again!
spar9zedou@hotmail.com
Re: Apply physics to particles
Posted: Sun Jul 28, 2013 1:05 pm
by jahnocli
spar9zedou wrote:...(I'm actually representing red cells flowing through blood vessels).
There was an idea by Lostmarble Himself (main developer, Mike Clifton) that appeared a while back. I'm talking years...It was a kind of mesh of bones that 'squezed' shapes through tight openings. May be exactly what you are looking for. I had a quick look through the forum back catalogue but I couldn't find it. Maybe somebody here knows what I am talking about?
Re: Apply physics to particles
Posted: Sun Jul 28, 2013 3:14 pm
by slowtiger
I had the exact same task some years ago and didn't use particles, but just objects on a path. Duplicated that, changed the timing, voila, instant blood stream.
Re: Apply physics to particles
Posted: Sun Jul 28, 2013 7:03 pm
by heyvern
jahnocli wrote:spar9zedou wrote:...(I'm actually representing red cells flowing through blood vessels).
There was an idea by Lostmarble Himself (main developer, Mike Clifton) that appeared a while back. I'm talking years...It was a kind of mesh of bones that 'squezed' shapes through tight openings. May be exactly what you are looking for. I had a quick look through the forum back catalogue but I couldn't find it. Maybe somebody here knows what I am talking about?
Yes, this was a trick using bones and translating the layers "past" the bones instead of moving the bones to move points. When you move a vector layer through or past the bones the points are influenced by the bone as they get near them. Not sure how this might work for pushing cells through veins but I suppose you could user flexible layer binding instead of point binding, and then the objects would move based on the bones.
This is so weird. I was actually trying this technique just yesterday. It popped into my head for something else I am working on.
I am with Slowtiger on this one. Using follow path or some other "by hand" technique is going to be way better and easier than trying to use physics. I did a quick test and it's such a pain trying to get things to "flow" with physics. You would spend as much or more time setting it up and testing it you could animate it by hand.

Re: Apply physics to particles
Posted: Sun Jul 28, 2013 7:19 pm
by slowtiger
It's even easier to do with that snake charming technique of having a straight bone chain on frame 0, then make this into whatever curls you like in frame 1 and just shift an entire layer of elements over it.
Re: Apply physics to particles
Posted: Sun Jul 28, 2013 7:57 pm
by neeters_guy
jahnocli wrote:spar9zedou wrote:...(I'm actually representing red cells flowing through blood vessels).
There was an idea by Lostmarble Himself (main developer, Mike Clifton) that appeared a while back. I'm talking years...It was a kind of mesh of bones that 'squezed' shapes through tight openings. May be exactly what you are looking for. I had a quick look through the forum back catalogue but I couldn't find it. Maybe somebody here knows what I am talking about?
Found it:
Object warping trick
Re: Apply physics to particles
Posted: Sun Jul 28, 2013 8:04 pm
by jahnocli
Great! (Sometimes you wonder whether you are dreaming stuff up sometimes...)
Re: Apply physics to particles
Posted: Wed Oct 30, 2013 3:18 am
by spar9zedou
Thanks everybody for such good replies.
I'll re-open that project, now that I have a decent solution (objects following paths, of course).
The object warping trick looks neat, i'll have to test it for myself to see its extent.
Physics is a a big mess to me so i'll stay away from it thanks to you