Issue with btOptimizedBvh serialize/deserialize.

Post Reply
reltham
Posts: 66
Joined: Fri Oct 12, 2007 6:28 pm
Location: San Diego

Issue with btOptimizedBvh serialize/deserialize.

Post 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?
User avatar
Erwin Coumans
Site Admin
Posts: 4235
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Issue with btOptimizedBvh serialize/deserialize.

Post 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
reltham
Posts: 66
Joined: Fri Oct 12, 2007 6:28 pm
Location: San Diego

Re: Issue with btOptimizedBvh serialize/deserialize.

Post 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?
User avatar
Erwin Coumans
Site Admin
Posts: 4235
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: Issue with btOptimizedBvh serialize/deserialize.

Post 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
reltham
Posts: 66
Joined: Fri Oct 12, 2007 6:28 pm
Location: San Diego

Re: Issue with btOptimizedBvh serialize/deserialize.

Post by reltham »

I got this sorted out and submitted issue 94 in the tracker on google.

Roy
User avatar
John McCutchan
Posts: 133
Joined: Wed Jul 27, 2005 1:05 pm
Location: Berkeley, CA
Contact:

Re: Issue with btOptimizedBvh serialize/deserialize.

Post by John McCutchan »

Roy,

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

Thanks,
John
reltham
Posts: 66
Joined: Fri Oct 12, 2007 6:28 pm
Location: San Diego

Re: Issue with btOptimizedBvh serialize/deserialize.

Post by reltham »

Awesome, thanks John!
Post Reply