Object Speeds, Velocities and Bounciness
Posted: Mon Jan 19, 2015 5:46 am
Hi, basically the question is how to create a lightweight object with required bounciness. I understand that there are properties like KineticFriction, StaticFriction and Bounciness for Material applied to an entity. I have played around these properties along with gravity, linear and angular velocities, but not able to achieve desired bounciness for different real-world materials like rubber, hollow rubber, plastic, hollow plastic, etc. Practically, objects of different materials dropped from same height will bounce back to different heights (for example hollow rubber will bounce more than solid rubber). Adjusting the Material.Bounciness property helps to achieve different bounce-back heights, but looks like this property is not directly proportional to the bounce-back height. For example, the typical expectation would be like Bounciness of 0.5 would make the object bounce back to 50% of the original height on first bounce, and 0.9 would make the object bounce back to 90% of the original height on first bounce (original height means the height the object is dropped from). But currently, even the bounciness of 0.99 has the bounce-back height of 70% to 80% only. Not sure whether I can achieve this "directly proportional" result by modifying the BEPUphysics code. Another problem with bounciness=0.99 is bounciness effect is not getting reduced or fading away fast enough when the object is moving at a speed (LinearVelocity in Z direction). LinearVelocity in Y direction also helps in adjusting the bounciness but applying this have adverse effects on distance traveled by the object; higher LinearVelocy-in-Y-direction drastically reduces the distance traveled in Z direction which means object bounces more number of times in less distance.
The typical gravity value of -9.81 makes the object move and bounce very slow in the world. Multiplying the gravity n times has good result in increasing the speeds and bounces, but wondering whether adjust gravity is the right solution to achieve this. Also, the Mass property doesn't seem to have any effect on bounce-back heights; object of mass=1 appears to behave similar to object of mass=100 or mass=1000.
My scene is very simple with all of them are static models except one dynamic model (MobileMesh). We know that static models have infinite mass and hence bounciness of all static models are set to 1. The dynamic model is a sphere which will be moving around the scene based on user inputs. All static and dynamic models are set to default KineticFriction (0.8f) and StaticFriction (1.0f) values. Properties like bounciness, gravity, linear velocities appear to have same effect on solid and hollow sphere models (solid rubber ball vs hollow rubber ball). This means the solidity/hollowness of objects also appears to have no effect on object speeding and bouncing behaviors.
Wondering whether camera speed matters here. Currently camera speed is set to 10 (the same Camera class from GettingStartedDemo).
Finally, the problem is we have a handful of properties to adjust the speeding and bouncing behaviors of objects, but getting them to achieve the desired real-world behaviors seems very tricky and not able to settle with a correct combination or correlation of all these properties. Also, some combinations of these values (especially that applies more downward force on the object) produces weird results like object missing the collision detection phase resulting in dynamic model passing thru the static model and escaping the scene altogether. Wondering whether I'm missing something basic or whether I'm not using some other important properties to achieve the desired behaviors.
The typical gravity value of -9.81 makes the object move and bounce very slow in the world. Multiplying the gravity n times has good result in increasing the speeds and bounces, but wondering whether adjust gravity is the right solution to achieve this. Also, the Mass property doesn't seem to have any effect on bounce-back heights; object of mass=1 appears to behave similar to object of mass=100 or mass=1000.
My scene is very simple with all of them are static models except one dynamic model (MobileMesh). We know that static models have infinite mass and hence bounciness of all static models are set to 1. The dynamic model is a sphere which will be moving around the scene based on user inputs. All static and dynamic models are set to default KineticFriction (0.8f) and StaticFriction (1.0f) values. Properties like bounciness, gravity, linear velocities appear to have same effect on solid and hollow sphere models (solid rubber ball vs hollow rubber ball). This means the solidity/hollowness of objects also appears to have no effect on object speeding and bouncing behaviors.
Wondering whether camera speed matters here. Currently camera speed is set to 10 (the same Camera class from GettingStartedDemo).
Finally, the problem is we have a handful of properties to adjust the speeding and bouncing behaviors of objects, but getting them to achieve the desired real-world behaviors seems very tricky and not able to settle with a correct combination or correlation of all these properties. Also, some combinations of these values (especially that applies more downward force on the object) produces weird results like object missing the collision detection phase resulting in dynamic model passing thru the static model and escaping the scene altogether. Wondering whether I'm missing something basic or whether I'm not using some other important properties to achieve the desired behaviors.