The functions work just fine, that's not the issue.
The issue is that serializing a particular bvh from one run to the next does not produce identical output.
There are pointers in the serialized data that change from one run to the next. These pointers are not used during deserialization, and, in fact, are redone/fixed-up by the deserialize code.
This is causing me problems because our game is an online streaming game and when we re-export a zone every chunk is coming up as changed even if only one actually changed. And it's all because of the bvh serialize leaving those pointers in there.
Is there something I am missing? Or can I make a patch to fix this and submit it to the google issue tracker?
Issue with btOptimizedBvh serialize/deserialize.
-
- Posts: 66
- Joined: Fri Oct 12, 2007 6:28 pm
- Location: San Diego
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Issue with btOptimizedBvh serialize/deserialize.
This hasn't been brought up yet.Is there something I am missing? Or can I make a patch to fix this and submit it to the google issue tracker?
What do you suggest? Clearing those pointers with zeros?
Thanks for the feedback,
Erwin
-
- Posts: 66
- Joined: Fri Oct 12, 2007 6:28 pm
- Location: San Diego
Re: Issue with btOptimizedBvh serialize/deserialize.
Yeah zeros would work. The main thing is that serializing the same exact object each time should result in the same output even if the destination memory buffer is at a different location.
I will try and get a patch worked up soon. Unless you are going to just go fix it?
I will try and get a patch worked up soon. Unless you are going to just go fix it?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Issue with btOptimizedBvh serialize/deserialize.
A patch would be welcome indeed. Please take multi-platform issues and different pointer sizes into account (32bit/64bit platforms etc).reltham wrote:I will try and get a patch worked up soon. Unless you are going to just go fix it?
Thanks,
Erwin
-
- Posts: 66
- Joined: Fri Oct 12, 2007 6:28 pm
- Location: San Diego
Re: Issue with btOptimizedBvh serialize/deserialize.
I got this sorted out and submitted issue 94 in the tracker on google.
Roy
Roy
-
- Posts: 133
- Joined: Wed Jul 27, 2005 1:05 pm
- Location: Berkeley, CA
Re: Issue with btOptimizedBvh serialize/deserialize.
Roy,
Thanks for your fixes. They have been committed and will be present in the next release of Bullet.
Thanks,
John
Thanks for your fixes. They have been committed and will be present in the next release of Bullet.
Thanks,
John
-
- Posts: 66
- Joined: Fri Oct 12, 2007 6:28 pm
- Location: San Diego
Re: Issue with btOptimizedBvh serialize/deserialize.
Awesome, thanks John!