Tutorial Physics/XML Smoke..... ideas and concept for physics!

Paolo

No Bam no Play
Chat Moderator
Site Supporters
Joined
Mar 16, 2013
Messages
1,383
Solutions
3
Reaction score
646
Points
131
Favorite Pinball Machine
Batman(Data East)
I decided to insert the whole @smoke thread dedicated to physics, here in PN, I don't know how long GoPinball.com will last .... and unfortunately with the risk of losing several threads.

For the moment, one of my topics recently covered is a greater understanding of physics, I have my convictions, one of which is; that to have optimal gameplay for a table is to find a balance between the forces that make up a table, I'm talking about it Here

About Smoke, we almost all know who he is ... and what tables he created. He asked himself questions about physics, he tried to find a physics better than that of standard FP, he made comparisons with the real one, and despite the fact that at that time Bam had just arrived, and not having a Bam available like now .. .. he tried to create better physics, the thread is only 3 pages, he talked more here, than in other threads, and unfortunately he didn't have many followers, at that time we were many of us amateurs, in comparison to him
that's what he proposed........
 
Last edited:
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 ....
 
Autor @smoke Posted: Wed Nov 20, 2013 8:22 pm

one more thing i have already do some test on table like LOTR,BTTF,IRONMAN and the result is very good if setting the table slope between 6,5->7.0. and maybe changing the flipper strength.

LOTR need some tweacking on the right wirered ramp because of a collision bug with a ball flying protection on the ramp that lead to the sword.
 
Autor @bigsilverhotdog Posted: Wed Nov 20, 2013 8:41 pm

The physics system is all interconnected. You change one value and it directly affects most other values, sometimes radically so. Alter primary material elasticity coefficients and all of a sudden your gravity, ball weight, flipper strength, etc, and all wrong. Even a change of 0.1 can sometimes drastically alter the balance you're trying to find. You have to take into account literally every single thing the ball touches during play, including all surfaces.

Also, this balance you're looking for can still be achieved with almost any table slope by altering gravity, ball weight, etc, within the xml. For example, in 2.7 I've taken to low (4~) table slope with high gravity and ball weight. This gives several advantages, the most obvious of which is an immediate decrease in unwanted vertical motion: the ball stops leaving the playing field during extreme power moments or glitches. Of course that's a simplification; there's actually several other additional factors that influence these values and the end result, and these unorthodox settings have to be counteracted with other variables to achieve balance.

I'm going to write a detailed post about FP's Newton limitations and the necessary compromises later, but I just don't have time right now. Play Taxi 2.7 or Centaur 2.7 to see what I'm talking about. If you use the editor to look at what I'm doing (and contrast it directly with the xml) you might start to figure it out, but I doubt it. You have to fundamentally understand how Newton's FP settings work together before you can improve the physics of FP or even work out what's going wrong. Otherwise you're just stabbing in the dark.
 
Autor @smoke Posted: Sun Nov 24, 2013 2:47 pm

I've done some more adjustement to the values after playing for real a spiderman pinball.
Essentially to the rubber elasticCoef.
And i'm very happy of the result.

I'will soon post the XML physics file with the updated values.
i have really good result by only changing the table slope to a more real value (6,1 degrees), lowering the flipper power. And adjusting the plunger power.
And i feel that the flipper aiming/targeting is more accurate without changing the flipper model.

So far i've verified the following tables with my physics :

lord of the ring (some bug in the script and some collision glitch with the right ramp that explain why sometime the ball stucks). i've done some fix to my version but i have to contact the author.

jhonny mnemonic
jurassic park
star war empire dition
ironman
spiderman

and more to come

i will post soon the slope+flipper power setting for each pinball tables
 
Autor @smoke Posted: Thu Nov 28, 2013 4:56 pm

just to say i'm still testing my tables.
the ball move with a natural ways (no weird hyper fast lightning ball effect)
I have good result so far for:

AddamsFamily
atack from mars
aliens
appollo13
back to the future (my modded slamtilt version)
big bang bar
black night 2k
f14 tomcat dmd edition
jurassic park
indianna jones
ironman
jonny mnemonic
lord of the ring (heavy modifications done, the table has many flaws)
master of univers
spiderman (my reference table because i can play it for real every day after lunch)
star wars imperial edition
tron legacy (with playfield change when in game battle)


As reminder the philosophy of my physics is to be as close as possible to real world values (gravity, table slope, ball mass). And these values are the same for every table.
Except for 4 tables all share the same value for flipper power, plunger power, slingshot power.

Because in the real life, a ball on spiderman react the same as a ball on demolition man, ironman, black knight 2k ....



i'm keeping validating my physics. You will get the file and instructions soon.
 
Autor @smoke Posted: Sat Nov 30, 2013 7:50 am

Here a link to my physic for future pinball :

http://www.filedropper.com/testphys



You must have BAM (ravarcade you are a genius for this tool !!!) installed.
In this archive you will have the default.xml file that contains the modified physics.
Just copy the default.xml file into the BAM folder.
make sure that your tables haven't a special xml file with them or you will not load my physics.


The first time you will have some difficuties to perform ramps.
It's normal because you have taken the bad habit with the over future pinball physics that you could perform ramps easily with a no velocity ball.
Now, like in real life, you will have to have some velocity to perform the ramps.


you will notice some test table in my archive:

perfect_plunguer_guide
----------------------
show how to make a perfect plunguer guide for the ball (they are painted red and yellow you can't miss them).
These guides resolve a nasty thing when some time the ball have low speed or lightning speed with the same power applied to the plunguer.
The reasons is that the ball is not perfectly aligned with the plunguer, so the plunguer doesn't hit the ball on the center but a little off.
If you played snooker game you see what I mean.


phys3
----------------------
only show how the spinner react this my physics with the 3 possible setting (a counter show how many rotation are performed for each spinner).
You will see that the stuck spinner position is a thing of the past.
You may think that sometime the spinners seems to be stuck but wait 1-2 seconds an you will see that it slowy return to a vertical position.
That the best I can do because other spinBack values on the physics file could result in an infinite balancing motion of the spinner (like there is no friction applied on the rotating axe)


flipper & plunger & bumper strength
======================================
0=minimum=cursor to all left
8=maximum=cursor to all right

general values for all tables (special setting on some table explained at the end)
====================================================================================

rubber for slingshot & flipper is: soft
table slope : 6.1 degrees
flipper power is: 4
slingshot power is: 6
manual plunger power : 1 with ball guide or 7 without
auto plunger power : 7

recommended (for best experience but you can pass it) bumper power:
===================================================================

bumpers in triangular pattern
--------------------
......5.....5........5..5........5..5
.........8.............8..........8


bumpers in diamond pattern
---------------------------
.........5......
......5.....5...
.........8......



special TABLES settings
=================

B2k
=====================
left flipper =4
right flipper =5
upper right flipper =5
autoplunguer =3


f14 tomcat
=====================
the vertical kicker TopRightKicker strength need to be set to 8


masters of universe
=====================
upper left flipper =4
left flipper =4
right flipper =5

medieval madness
=====================
left flipper =5 or 6 ( the right ramp has some design flaws, i've modifed my table version and i could use a strength of 4)
right flipper =4

the vertical kicker named "catapkicker" strength need to be lowered to 6 or 7.
Don't try to set to 8 because the ball will have to much velocity and hit with too much force the invisible wired ramp and will go back to the kicker.


reel it in
=====================
you need to move away of the table the invisible surface named "slower1" at the end of the fish ramp. If you choose to delete it, don't forget to remove all reference to "slower1" in the script.
left flipper =4 I recommend to set the swing to -55
right flipper =4 I recommend to set the swing to 55

simpson pinball party
=====================
left flipper =4
right flipper =4
the 2 upper left flippers =4
upper right flipper =4

the vertical kicker named "Kicker4" strength need to be lowered to 5.
Don't try to set to 7 or 8 because the ball will have to much velocity and hit with too much force the scoop above and will go back to the kicker.


spiderman
=====================
left flipper =4
right flipper =4
upper right flipper =6 I recommend to set the swing to 48

star trek
=====================
left flipper =4
right flipper =4
upper right flipper =5 I recommend to set the swing to 40
set the left kickback autoplunger strength to 3 or 4 or the ball will go lightning speed



more special settings to come if necessary



 
Autor @promise2die4 Posted: Mon Dec 02, 2013 6:09 am

DAMMM!!!!!

this is great news, tnx for the explanation of some things, cause i didn't knew how to change them and now i do
:)
:)
:)


also tnx for the file i have tested the file with some tables and soem of them plays much better..

Hope that there is some one that can make a program of file that alle tables are working as they should be in real life
;)


Keep up the good work smoke, love it..

CHEERS!!
 
Autor @smoke Posted: Mon Dec 02, 2013 2:33 pm

thanks that you find this new physic more enjoyable.

I found that some tables require a table slope of 5.8 instead of 6.1.
This way you can keep the other parameters to the recommended one and it will be a little more easier.

The following table are good with a slope of 5.8 (and set the other parameters to the recommended ones):

reel it in
3 angels
TutenKham
dead hunter (even if I personnally let it to 6.1 for more challenge)
 
Autor @smoke Posted: Mon Dec 02, 2013 2:35 pm

If you have some recommendations on my physics or if you are happy, please reply on this topic.
Don't be shy :p
 
Autor @promise2die4 Posted: Mon Dec 09, 2013 3:10 am

well i have played it on a few tables, but on some tables i think the ball is to bouncy on the bumpers, it shoot very fast over the table so fast i cant even see it
;)


so the i have changed some things in de xml but i have screwd it up and it doesn't work properly anymore
;)


also the flippers are not strong enough on some tables cause i cant hit the ramp, i have changed the strenght and then they work..

for now im playing with the standard and de zedonius and hoping that there will be some xml that plays for all tables as it should be..

cheers.
 
Autor @smoke Posted: Mon Dec 09, 2013 7:40 am

promise2die4 wrote:
well i have played it on a few tables, but on some tables i think the ball is to bouncy on the bumpers, it shoot very fast over the table so fast i cant even see it
;)



so the i have changed some things in de xml but i have screwd it up and it doesn't work properly anymore
;)



also the flippers are not strong enough on some tables cause i cant hit the ramp, i have changed the strenght and then they work..

for now im playing with the standard and de zedonius and hoping that there will be some xml that plays for all tables as it should be..

cheers.

the too bouncy bumper may be explained by some trick of the table creator by adding EM kicker in the bumper. Because with the original physics the bumper were very weak. I've personnaly removed these em kicker en applied my recommendations for the bumpers strengh (triangular or diamond pattern). zedonius physic also recomend this.

on All my 32 tables the recommended flipper strengh is good (with 2-3 exception). Don't forget that you have to set the table slope to 6.1 or 5.8. It depend on your taste.
And yes ramps are a little bit harder to get but in real pinball its the same, the ball must have some velocity when hitting the flipper. Trying to get ramps with a standing ball is not real. There also another reason why you can do the ramps because of the ramp design itself (i don't want to offense the creator they done a perfect job). the ramps curve must be very well designed to guide the ball without losing it velocity. This is the case for spiderman pinball, lotr pinball, johnny mnemonic, indiana jones.


sorry to tell you that but you will never get a xml that will give you an accurate feeling on all table without some editing. Why? because the table where soo modified to compensate the poor original physic. like slope above 7 to give the ball some speed because the gravity value was wrong.

All you have is to test all the physics available and stick to the one that you prefer and try to correct the other table for it.

All i can say for my part to defend my physics is the philosophy behind my physics is to use the more real life value to get the more real life feeling.

As i can play the spiderman real pinbal almost every day i could say that i'm very accurate to the feeling.
 
Autor @smoke Posted: Mon Dec 09, 2013 7:42 am

oh and a last thing. If you (everyone) don't like this physics it's ok !
:)

the only purpose of this thread was to share (nothing else) the physic that i use in my own build virtual pinball.

but critisism are welcome :p
 
Autor @benucio Posted: Mon Dec 09, 2013 7:42 am

Hi Smoke, have you deleted your link? I wanted to upload your xml file but there is nothing to download when I click on your link.
:?
Thanx.
 
Autor @smoke Posted: Mon Dec 09, 2013 2:27 pm

hmm seem that the file host delete the file after some days, here is another link to the xml without the test table.

http://dl.free.fr/qDFn9e29E (DL.FREE.FR)

don't forget to read my recommended settings. The most import is the table slope and flipper power

rubber for slingshot & flipper is: soft
table slope : 6.1 degrees
flipper power is: 4
slingshot power is: 6
manual plunger power : 1 with ball guide or 7 without
auto plunger power : 7
 
Autor @promise2die4 Posted: Mon Dec 16, 2013 9:28 am

well i understand that there is no perfect xml cause every table plays different
;)


but i have playd many tables in RL ok not all of them but i said many
;)
about 100,...

and i really dont know how they all play but i do know that there not all bouncy,.. and the slope style i have changed it to the ones you said.. i have playd with it also but again the ball looks like a skippyball
;)
it bounced around the table to much.

but its better then some other physics aspecially the ball mass is better now.
Cause sometimes the ball would like its floating, with your style its not..

Maybe its an idear to change the FP program like they did with VP 2.0,... cause in the 2.0 version you can change the ball mass and things like that.

anyway tnx for your xml and hope we get very close to the real thing!!

tnx!
 
Autor @smoke Posted: Mon Dec 16, 2013 12:38 pm

too bouncy? or a little bit bouncy?
have you also changed the flipper and slingshot strength?

Because i have made some test with a real pinball by letting the ball hit the rubber of a flipper in up position to see how much the rebound is and i thought that i've reproduced this very close to the real thing.

Maybe you should change the flipper and slingshot rubber to medium?
 
Autor @Zorgar Posted: Sat Oct 04, 2014 2:09 am

I tried the various ball physic this week and found the latest versions (2.6 and Zed) to be too fast. To reduce speed I reduced the flipper strength to about half and increased the slope slightly. For most of the (older) tables FP2.5 seems to be the best because it works out of the box. Bumpers are still too little active.
 
Autor @umpa Posted: Thu Nov 20, 2014 11:26 am

smoke wrote:
Because in the real life, a ball on spiderman react the same as a ball on demolition man, ironman, black knight 2k .

Hello,
I'm sorry but i disagree with your statement above. Different "real world" environment makes a table play differently. Example being humidity, age of balls, rubbers, etc. I appplaud you trying to get a better physics as I have just gone through all my tables and applied different physics.xml's for each one and some are still fast and unrealistic. I will follow this thread and give your physics a shot. Thank you for sharing! I will post back on what I find.
 
Autor @SLAMT1LT Posted: Sat Feb 02, 2019 10:51 am

Some great work here Smoke! The Spinners and Gates have been a pain in my arse for years now. I applied your settings to my latest games and (so far) they're behaving as they should.
 
Autor @smoke Posted: Sat Feb 02, 2019 12:43 pm

gates are still tricky....
even more if in a middle of a ramp, because the ball must perfectly hit the gate at the right angle (perpendicular) or it will loose too much velocity.

I also cheated on gates that are in the middle ramp (so the ball stil have veolicity)
Check the collision model, it is shorter that the visible 3d model to let the ball pass more easely (because gate can't open at more than 90 degree....)
 
Autor @SLAMT1LT Posted: Sat Feb 02, 2019 3:03 pm

If I can't get a satisfying impact then I'll always switch to fake spinners as a back up. I hate spinners on ramps!

FP still has its flaws but we can eliminate them all eventually I'm sure.
 
Autor @GeorgeH Posted: Sat Feb 02, 2019 3:38 pm

I have had many problems with gates myself. Sometimes the ball just bounces back when it is supposed to cross it. I endlessly had to adjust the angle of the gate on CFTBL in order to get it to release the ball onto the table.

George
 
Autor @SLAMT1LT Posted: Sat Feb 02, 2019 4:20 pm

The same thing is happening on my latest Star Trek release, but only because I fire the ball so hard and so quickly from the plunger lane. I have modified the gate's physics properties, as recommended by Smoke in this thread, and this issue is now reduced but not eliminated.

But we can fake anything in FP....gates can be faked, spinners faked, bumpers faked...as long as we can get the desired affect without it being noticed then that's fine.
 
Autor @Gimli Posted: Sat Feb 02, 2019 6:04 pm

You can change xbam speed limit temporarily
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      Chat Bot Mibs Chat Bot Mibs: dizzeee has left the room.
      Back
      Top