Elastic Slippery 0vals

EtK
Posts: 7
Joined: Fri May 31, 2013 10:02 am

Elastic Slippery 0vals

Post by EtK »

Hello,

Perhaps this post should be in the 'Career Opportunities' section but I'm only looking to find a solution to one particular problem, anyway ...

I'm a Bullet-user in Blender, and I would like to simulate a collision between two 0val particles that are 100% elastic (Coefficient of Restitution = 1), perfectly smooth and round (Friction = 0), and deflect each other when they meet.

Here's an animation I made of 3 deflections that I'm hoping this setup would generate:
http://youtu.be/l8AR0SOXzHY (39 sec.)

Image

When these particles meet, they deviate to follow the path of least resistance; so they: Hit - Push each other -Tilt each other over (slide) - Balance each other out again - and continue to move straight forward again, along their central axis, here's a rough sketch:

Image

Simply put, they softly deflect (of) each other, and don't bounce or lose any energy because internally they don't absorb energy, there's also no friction between them, they are 100% slippery.

What they give and lose of kinetic energy to each other during a collision, is what they get back it in equal amounts ... So, they just keep on going forward at their given velocity.

The YouTube animation above was with 3D 0val bodies, but for testing the concept a 2D simulation is good enough. Below are some clearer drawings, where it would be similar to an 0val falling on a slope and sliding forward.

I'm curious if anyone could help me with tackling this idea,

kind regards,

m.


Image

... and 3 different collisions:

Image

--

These Bullets would be a cross-over between 'normal' soapbubbles, that stick and slide along each-other:

Image

... and Billiard balls:

Image

... what I'm wondering about is what's in the middle: fast, hard and super slippery.
laadams85
Posts: 18
Joined: Wed May 22, 2013 1:45 pm

Re: Elastic Slippery 0vals

Post by laadams85 »

What exactly is the question, what do you need help with? Have you tried to implement your idea at all, i.e, you have created the mesh and used it in bullet but haven't gotten satisfactory results, or are you at square one.
EtK
Posts: 7
Joined: Fri May 31, 2013 10:02 am

Re: Elastic Slippery 0vals

Post by EtK »

laadams85 wrote:What exactly is the question, what do you need help with? Have you tried to implement your idea at all, i.e, you have created the mesh and used it in bullet but haven't gotten satisfactory results, or are you at square one.
You could say that I'm at square one. I have done some collisions in Blender, but the ultimate goal is to create a gas with this kind of Deflecting-0val-partilcles, either with a Physics-engine or a Boids-engine. So I'm more or less sticking my toe here in the water.

Here's an example of 2D Boids-gas simulation with point particles:

http://www.openprocessing.org/sketch/8676

The top of the image shows the settings to have them interact like a 'bouncy' gas:

Image

--

The bigger picture is an aquarium full of these particles, to get a simulation like this one:

http://www.youtube.com/watch?v=GSZRXsXSm9k (29 sec.)

Image

--

Note, in Blender there are a whole list of presets from air to timber; and the Bullet engine incorporates lots of physical elements: mass, acceleration, gravity, friction, ... but most of it seems to be not necessary, because the only thing that's needs to be going on is a short deflection-interaction, so a stripped down version of Bullet is what I'm looking for.
laadams85
Posts: 18
Joined: Wed May 22, 2013 1:45 pm

Re: Elastic Slippery 0vals

Post by laadams85 »

Well you can start with just making a 3D mesh of your oblate spheroid and playing around with that inside bullet. Then you have to make a list of the other features you are trying to implement. Will you be following the rules of the boid simulator you posted?
- Cohesion. Try to approach other boids.
- Avoidance. Try to keep a minimum distance with things.
- Imitation. Try to move in the same way than other boids.
Additionnal rules :
- Stay in square, by sides avoidance or closed space.
- Limit speed, except in case of imminent danger. (See below)
- Escape to mouse. Boids try to avoid the mouse-predator (medium repulsion).
- Avoid obstacles.
- Avoid it before the bang. (small but widespread repulsion)
- Too late. (big repulsion on contact)
- Eat.
- Green is good. (medium attraction).
- Do not put your hands in the soup. (big repulsion at contact)
These would all certainly be possible but you'll need to be creative. You can setup ghost spheres around your objects for the different types of interaction you are interested it. A sphere for object to object interaction, when you get a collision between these two add some kind of velocity constraint. Remove the constraint when there is no longer a collision. You could set up several different sphere diameters for each type of interaction. To help clarify your goals make a list of specific rules.

1) When object A and object B are withing X distance then velocity of A and B are (A + B) / 2
...

If you just want to due pure collisions then your job is much easier. Set the restitution for all bodies to 1, and be on your way. You could even add some code the the Sequential Impulse Solver to ensure that for each collision the kinetic energy is conserved.
EtK
Posts: 7
Joined: Fri May 31, 2013 10:02 am

Re: Elastic Slippery 0vals

Post by EtK »

laadams85 wrote:If you just want to due pure collisions then your job is much easier. Set the restitution for all bodies to 1, and be on your way. You could even add some code the the Sequential Impulse Solver to ensure that for each collision the kinetic energy is conserved.
Almost none of the Boid-rules are needed, only a 'deflection' rule. Velocity, the shape of the 0val and the number of 0vals within one volume could also be adjustable.

The problem seems to be that there's still an amount of bumpiness that's going on, and never 100% pure deflection (see animated .gif).

Image

With the soap-bubbles, its always slippery. Mass should be kind of irrelevant, because even if they would weigh a ton, or be empty ... they should each time deflect the moment they touch; and follow the path of least resistance. Although this would conflict with inertia, but still it's only a deflection so they keep moving fairly straight forward. Keep in mind that this is a bit of Sci-fi idea :mrgreen:
laadams85
Posts: 18
Joined: Wed May 22, 2013 1:45 pm

Re: Elastic Slippery 0vals

Post by laadams85 »

It looks like you are trying to get some kind of cohesion? What you can try to do is use a restitution of 0 and ensure that the kinetic energy stays constant. I think this would get you were you are trying to go. Try the simulation with a restitution of 0. If the velocity vectors look correct, but have the wrong magnitude then you are headed in the right direction. If the velocity vectors don't look correct, then another approach may be necessary.
laadams85
Posts: 18
Joined: Wed May 22, 2013 1:45 pm

Re: Elastic Slippery 0vals

Post by laadams85 »

You may also try making both bodies dynamic and see how well they interact.
EtK
Posts: 7
Joined: Fri May 31, 2013 10:02 am

Re: Elastic Slippery 0vals

Post by EtK »

laadams85 wrote:It looks like you are trying to get some kind of cohesion?
Yes, but in a natural way. Check out this sketch, and imagine a Newton's Cradle with two 0val particles instead of spherical balls. Now instead of having them fly against each-other and hit each-other hard (BAM!) as depicted in the left column; you just have them rest against each other and they would just slide next to each other (Swoofff). That's how they would deflect, without slowing down.

Image