Autor
@smoke Posted: Wed Nov 20, 2013 8:18 pm
Sorry for my poor english
IN the real life:
===================
ball: Standard carbon steel 1-1/16 inch (27mm)diameter, 80 gram
recommended pinball table slope is 6.5 to 7.0 degrees.
below 6.5 the game is easy and boring. up to 7.0 the game is more chalenging. More than 7 is a money rip off.
IN FUTURE pinball
====================
future pinbal use Newton Game Dynamics library.
An Open-source zlib-licensed integrated solution for real time simulation of physics environments.
Newton engine don't use SI units. Is up to the user to do the some conversion.
The International System of Units (abbreviated SI from French: Le Système international d'unités) is the modern form of the metric system and is the world's most widely used system of measurement, used in both everyday commerce and science.
Unit name Unit symbol Quantity name
metre m length
kilogram kg mass
second s time
gravity : 9.810 m/s2
My goal is to try to do the most accurate physics with using the most real world values.
In the following i assume that we use a table slope of 6.5 degree.
THE BALL
=========
First let's discover if future pinbal use SI units.
So let's try <ball mass="0.80" gravity="9.810" damping="0.80"></ball>
what's going on? it's like playing pinball in the international space station. The ball is floating !!!
Maybe the author of future pinbal doesn't use kg and m units?
let's try to change the mass value to gram and length to millimeter. That's could make sense as future pinball editor use millimeters for placing objects.
let try <ball mass="80.0" gravity="9810.0" damping="0.80"></ball>
Hmmmmmm much better no ?
You may find that the flipper may move when hitted by the ball. To correct that you must rise the flipper mass value.
Why? Because immovables components (that must not move when collided by a ball like plunger, flipper, diverter and emkicker) must have an enormous mass value compared to the ball mass.
So we could try to use this values:
<flipper mass="99999.0" omega="40.0" moeMethod="0"
leftXoff="0" leftYoff="1500" leftZoff="0"
rightXoff="0" rightYoff="1500" rightZoff="0"></flipper>
<autoplunger mass="99999.0" force="60000.0"></autoplunger>
<diverter mass="99999.0" omega="33.0"></diverter>
<plunger mass="99999.0" force="60000.0"></plunger>
<spindisk mass="99999.0" angularDamp="0.33" linearDamp="0.25"></spindisk>
<emkicker mass="99999.0" omega="100.0"></emkicker>
THE SPINNER
===========
Spinner mass has no effect on the ball. Yes it's weird!
It's just used in the spin effect only. To try to reset the spinner to its original vertical position.
We could think it's a good idea to put a low value like 10 grams.
But a low mass value will raise the risk to have a spinner in a stuck position.
I think because the spinner mass model is badly designed
That's why in some table like back to the future or star trek, the spinner was replaced by a toy and the spinning is simulated with 2 triggers (one before and one after the fake spinner).
It was done to be sure to reset the spinner to a vertical position.
So we couldn't use real world values for the spinners, that a fact!
After some trial an error the following seems to be ok:
<spinner mass="99999.0" gravity="9810.0" angularDamp="0.5" angularAccel="5.25"
spinDampLoose="0.30" spinBackLoose="0.65"
spinDampNorm="0.40" spinBackNorm="0.65"
spinDampTight="0.70" spinBackTight="0.65"></spinner>
Your ball may sometime be stopped by a spinner.
It's normal if the spinner has a specific angle with the ball at the imapct point.
......###..................impact point with a spinner angle that could stop the ball
............###..........|
spinner.-->.O.........|
..axe...........###....\/..+++++
......................###.+..........+
...........................+....ball.....+
............................+...........+
..............................++++++
One last thing, the suggested spinner height is 28 millimeters. Less is bug, more and the spinner may not spin!
Check the top height of the used surface for spinners!
THE GATE
========
Some weird things happens when sometime the ball couldn't pass the gate even in the good direction.
Unlike spinners, the gate mass affect the ball. So we put a low value compared to ball mass
After some trials and error i found this values:
<gate mass="0.50" gravity="3000.0" damping="1.0"></gate>
THE MATERIALS
==============
THE BIG PART!!!!!
there is two thing to deal with:
REBOUND and FRICTION
all material except rubber have 1.0 in softnessCoef (very hard).
a softnessCoef lower than 0.3 is for jelly...
REBOUND aka coefficient of restitution
=======================================
ressources on internet
http://hypertextbook.com/facts/2006/restitution.shtml (Coefficients of Restitution - The Physics Factbook)
http://en.allexperts.com/q/Rubber-2470/bounce.htm
In real life, a steel ball could perfectly rebound when hitting a very hard surface.
as you see nobody is agreed on values. we have to take them as starting values and do some fine tunning....
FRICTION
=========
ressources on internet
http://www.tribology-abc.com/abc/cof.htm (Coefficient of friction, Rolling resistance, Air resistance, Aerodynamics)
http://www.engineeringtoolbox.com/frict ... d_778.html
Again as you see nobody is agreed on values. so again we have to take them as starting values and do some fine tunning....
in future pinball, all friction value are for a ball (a steel ball) on:
wood
plastic
rubber (default rubber material use the rubberIntMat value)
metal (steel)
A ball can slide on a playfield (very well if waxed). But also ROLLS!!!
An a spinning ball can "curve" it's movement.
So we have to find out the good friction value for having a rolling ball without changing a steel ball to a very grippy rubber ball!!!
Or changing the playfield to an ice field....
after many tries here some good values
<!-- Default Materal Settings to act as defaults incase we forget to set an object during development.
There shouldn't be any objects set to this material so these are just a fail safe values -->
<defaultMat softnessCoef="1.0" elasticCoef="0.1" staticFriction="0.92" kineticFriction="0.92"></defaultMat>
<!-- Material Settings for surfaces marked as playfields -->
<playfieldMat softnessCoef="1.0" elasticCoef="0.25" staticFriction="0.02" kineticFriction="0.02"></playfieldMat>
<!-- Primary Material Types -->
<metalMat softnessCoef="1.0" elasticCoef="0.20" staticFriction="0.02" kineticFriction="0.01"></metalMat>
<plasticMat softnessCoef="1.0" elasticCoef="0.20" staticFriction="0.02" kineticFriction="0.01"></plasticMat>
<woodMat softnessCoef="1.0" elasticCoef="0.20" staticFriction="0.02" kineticFriction="0.01"></woodMat>
<rubberHardMat softnessCoef="0.90" elasticCoef="0.42" staticFriction="0.13" kineticFriction="0.10"></rubberHardMat>
<rubberIntMat softnessCoef="0.90" elasticCoef="0.47" staticFriction="0.13" kineticFriction="0.10"></rubberIntMat>
<rubberSoftMat softnessCoef="0.90" elasticCoef="0.55" staticFriction="0.13" kineticFriction="0.10"></rubberSoftMat>
<!-- Object Specific Material Settings -->
<gateMat softnessCoef="1.0" elasticCoef="0.24" staticFriction="0.00001" kineticFriction="0.00001"></gateMat>
<kickerMat softnessCoef="1.0" elasticCoef="0.24" staticFriction="1.0" kineticFriction="0.80"></kickerMat>
<rampMat softnessCoef="1.0" elasticCoef="0.05" staticFriction="0.02" kineticFriction="0.01"></rampMat>
<plungerMat softnessCoef="1.0" elasticCoef="0.55" staticFriction="0.15" kineticFriction="0.10"></plungerMat>
<spindiskMat softnessCoef="1.0" elasticCoef="0.50" staticFriction="1.50" kineticFriction="2.00"></spindiskMat>
that's all for now
I'll give a link to zip which contains some basic tables to test rebound, friction ans spinners with a full physics XML.
For know i need some rest ....