favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

A dynamicsWorld serialized and then de-serialized should be identical to the original #476

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Configure a simulation so that it runs deterministically.
2. Run the simulation until the world settles (body activation states are all 
deactivated).  Serialize the state of the dynamics world into file A.
3. Run the simulation again but this time at the half way point serialize the 
dynamicsWorld, destroy the in-memory dynamicsWorld, de-serialize it back into 
memory and continue the simulation until the world settles.  Serialize the 
state of the dynamicsWorld into file B.
4. De-serialize both file A and file B back into memory and compare the 
positions and angles of their bodies.

What is the expected output? What do you see instead?
I would expect that the positions and angles of all bodies in A and B to be 
exactly the same.  I have observed that they are divergent.  

What version of the product are you using? On what operating system?
Subversion trunk r2272 on iOS 4.2.1

Please provide any additional information below.

Context for my situation and deeper investigation can be found here: 
http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=12&t=6231

Original issue reported on code.google.com by sniels...@gmail.com on 24 Jan 2011 at 1:49

GoogleCodeExporter commented 9 years ago
Indeed, serialization doesn't maintain all internal data and caches, so the 
simulation will produce different results.

Although your request would be possible, it will require a lot of work, and we 
cannot allocate resources for this right now. 

We will close the issue. If you have a patch that can do all of this, please 
open a new issue and constribute it back.

Thanks!
Erwin

Original comment by erwin.coumans on 27 Jan 2011 at 7:36

GoogleCodeExporter commented 9 years ago

Original comment by erwin.coumans on 9 Jun 2011 at 7:17

GoogleCodeExporter commented 9 years ago

Original comment by erwin.coumans on 9 Jun 2011 at 7:30