Materialsystem

This is not a material in the sense of A:M materials. The Newton Game Dynamics library is using a materialsystem that's define the physical characteristics for a body. In the plugin I have build in to different way for using them .
The difference between this two way is , that the extended materialsystem is more close to reality , but you have more expenditure to use this , while it's needs a extra definition file.
For the simplified materialsystem the physical characteristics are set per body , but not in connection with other body . Mean, if you have two different grounds , a ball will bouncing on both grounds with the same elasticity as example.
If you use the extended materialsystem and have setup this two grounds with different elsaticity values , the same ball will bounce with a different high . This is more from interest for friction , so as example steel on steel have a higher
static friction as steel on ice . This behavior you can simulate with the extended materialsystem .
Now, the definition file .
It is a simply human readable textfile . Here as example the materialfile that I have used in the funnel project .

#Sphere//Comment
Sphere;Sphere;1;0.65;0.3;0.25
Sphere;Funnel;1;0.1;0.25;0.15
Sphere;Spiral;1;0.05;0.1;0.05
Sphere;Pot;1;0.5;1.0;0.5
Sphere;Ground;1;0.5;0.5;0.25
#Funnel
Funnel;Funnel;1;0.5;0.5;0.25
Funnel;Spiral;1;0.5;0.5;0.25
Funnel;Pot;1;0.5;0.5;0.25
Funnel;Ground;1;0.5;0.5;0.25
#Spiral
Spiral;Spiral;1;0.5;0.5;0.25
Spiral;Pot;1;0.5;0.5;0.25
Spiral;Ground;1;0.5;0.5;0.25
#Pot
Pot;Pot;1;0.5;0.5;0.25
Pot;Ground;1;0.5;0.5;0.25
#Ground
Ground;Ground;1;0.5;0.5;0.25

Line beginning with a # is the materialdefinition , at the end of this line you can add a comment after a double forward slash (//)
After this line are the physical characteristics between this material and all other materials, they are defined in this definition file .
They have the following format
Material;Targetmaterial;Softness;Elasticity;Static Friction;Dynamic Friction

Be sure, that you must define that each material is defined against each other , also if they will never colliding . And observe that you use realistic values , I don't clamp unnatural high values, other than the simplified materialsystem; so it is possible to use a value higher than 1 for elasticity as example , the result is -> you get a perpetuum mobile ....

Back