Page 1 of 1

Issue with btOptimizedBvh serialize/deserialize.

Posted: Wed Sep 10, 2008 9:15 pm
by reltham
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?

Re: Issue with btOptimizedBvh serialize/deserialize.

Posted: Wed Sep 10, 2008 9:20 pm
by Erwin Coumans
Is there something I am missing? Or can I make a patch to fix this and submit it to the google issue tracker?
This hasn't been brought up yet.

What do you suggest? Clearing those pointers with zeros?
Thanks for the feedback,
Erwin

Re: Issue with btOptimizedBvh serialize/deserialize.

Posted: Wed Sep 10, 2008 9:38 pm
by reltham
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?

Re: Issue with btOptimizedBvh serialize/deserialize.

Posted: Wed Sep 10, 2008 9:41 pm
by Erwin Coumans
reltham wrote:I will try and get a patch worked up soon. Unless you are going to just go fix it?
A patch would be welcome indeed. Please take multi-platform issues and different pointer sizes into account (32bit/64bit platforms etc).
Thanks,
Erwin

Re: Issue with btOptimizedBvh serialize/deserialize.

Posted: Fri Sep 12, 2008 1:20 am
by reltham
I got this sorted out and submitted issue 94 in the tracker on google.

Roy

Re: Issue with btOptimizedBvh serialize/deserialize.

Posted: Mon Sep 29, 2008 9:19 pm
by John McCutchan
Roy,

Thanks for your fixes. They have been committed and will be present in the next release of Bullet.

Thanks,
John

Re: Issue with btOptimizedBvh serialize/deserialize.

Posted: Mon Sep 29, 2008 10:21 pm
by reltham
Awesome, thanks John!