How to get a good explosion-type effect?

To be blunt: I'm working on a pool game (still!) and I'm having trouble getting a good break. When all the balls are packed together tightly, the balls don't really "explode" away when hit by the cue ball like you would expect from a good hard break. I tried increasing the speed of the cue ball, but that didn't really help, and it made the cue ball look supernaturally fast.

What should I try to vary? The spacing between the balls? Their elasticity? What else is there, really?
I just created a very nice looking break by using the following setup:
Ball radii of 0.28
Cue ball radius of 0.305
Approximate ball spacing of ~0.01 (they weren't perfectly consistent, I was drawing by hand and copy/pasting)
Cue ball initial speed of about 25 (which considering the scale is kind of a slow break)
All balls have restitution of 0.9.

It produces a pretty nice scattering result. My only concern is that I couldn't use "realistic" numbers because the Box2D engine isn't really meant to use objects quite that small. I had to scale everything up by a factor of ten so that collision detection and response could perform properly. Given this scale, the break speed should have been morel like 100 (m/s). A typical (good, actually) break is about 25 mph (roughly 12 m/s).
Other considerations you might want to think about are also that a 2D simulation won't really do the game of pool proper justice. Spin is really an important factor in the game and with Box2D, the only rotation is about the vertical axis, which is not the most useful spin for the game (usually backspin and forward spin are used). Another issue is that the balls are being approximated by circles rather than spheres. This doesn't sound like a problem but it is, to a degree. First off, your billiard balls won't be rolling; rather, they will slide across the table. This actually makes a pretty big difference in the motion and energy of the balls. The moment of inertia of a sphere about it's center is (3/5)*m*r^2. This means you will be ignoring quite a lot of energy needed to make a ball roll and stop rolling.

But seriously, you don't have to listen to my silly rants. Box2D can still provide an acceptable format for making a billiard game. Try using the configuration I used and see how it works for you.

Nathan
I have all of the balls the exact same size at a radius of 0.28575, so we're mostly in agreement there.

What did you use for a density for the balls? I have it set up so the pool balls should weigh 0.15 kg each, and the cue ball should weigh 0.17 kg.

I've tried playing with the restitution a lot, and I couldn't find much difference when using high numbers. I had a restitution of 1 and a linear damping of 0.5. I've decreased the restitution down to 0.9 to try your approach.

How did you set the initial velocity of the cue ball? I'm applying an impulse of somewhere between 5 and 6 to cause the ball to start rolling. This equates to an initial speed of about 33.

I've also scaled up everything by a factor of 10, so it's using decimeters instead of meters.
Quote:
What did you use for a density for the balls?

I believe I used something like 1.8 for the density of all balls.

Quote:
How did you set the initial velocity of the cue ball?

I use body.setLinearVelocity( Vec2 ... ) to set the initial velocity. I chose this mostly because it was the easiest way to do it and it allowed me to directly pick the speed rather than having to apply am impulse. I definitely didn't try hitting it with a mock-up cue stick or anything like that.
don't forget to set a right linear dumping to keep a real effect!

this is my explosion test:

http://www.youtube.com/watch?v=X4mTbTFi-v8

I made it just because I'm on holiday 🙂

I've used these parameters:
Code:
   float whiteRadius=0.0275f; //white ball radius {meters}
   float ballRadius=0.0285f; //standard ball radius {meters}
   
   float d = 1; //density
   float r = 0.90f;//restit of ball<->ball and ball<->wall
   float a = 0.01f; //friction of ball<->ball
   float wa = 0.01f; //friction of  ball<->wall
   float ld = 0.6f; //linear dumping of balls

with this ZOOM factor:
Code:
float zoom=10; //zoom factor to get better performans on JBox2D

you can view the source code here: http://codeviewer.org/view/code:120e

WOULD BE NICE if you (with your passion 4 explosions) find the right parameters to set for a billiard game so I'll set them in my TestBed so I become happy
What you're doing looks okay, but you aren't getting good breaks because you have the billiard balls too far apart. In a decent rack, the balls will almost all be touching or very close to touching. Also, you might try setting the cue ball off centered before the break. It isn't going to make a huge difference in the scattering dynamics, but most people don't hit a break straight on.

Original thread: https://box2d.org/forum/viewtopic.php?t=5633