Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

[Resolved] Serialization bug
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=15&t=360
Page 1 of 1

Author:  AndiNo [ Thu Apr 05, 2012 8:46 am ]
Post subject:  [Resolved] Serialization bug

I just found out that line 330 in PolyVoxUtil/Serialization.inl should be changed to
Code:
volume.resize(Region(Vector3DInt32(0,0,0), Vector3DInt32(volumeWidth-1, volumeHeight-1, volumeDepth-1)), 32);
The volume size gets correctly saved (64 for example) but after reading the values the volume gets resized to 0-64 which increases the size to 65. Is that right or did I miss something?

Author:  AndiNo [ Sun Apr 08, 2012 10:11 am ]
Post subject:  Re: Using Ambient Occlusion

Can I have some feedback on the error mentioned above? Is it really a bug or did I do something wrong? In case it's a bug it would be nice that it doesn't get forgotten :) BTW I was using the last stable GIT release from December of last year. Maybe this was already fixed in newer versions?

Author:  David Williams [ Sun Apr 08, 2012 3:25 pm ]
Post subject:  Re: Using Ambient Occlusion

Sorry, I mised your question because it was an edit on a previous post. There is indeed a problem here and to be honest the serialization code is a bit unmaintained. The idea of loading/saving the whole volume does not really make sense anymore since we have the LargeVolume, so I think the serialization functions need to take a 'Region' parameter to specify what will be serialized.

Anyway, I'm aware of this and it will get addressed at some point in the future (not sure how soon). You may wish to use your own serialization code in the meantime.

Author:  AndiNo [ Mon Apr 09, 2012 1:09 am ]
Post subject:  Re: Serialization bug

Thanks for the feedback. The fix above is a one-liner so it should be easy to implement it. The rest of the code seems to work fine. Well except for the decprecated save and load functions which function bodies I had to comment out in order to compile it. Anyway, if anyone else uses this he/she can fix this easily.

Author:  David Williams [ Mon Apr 09, 2012 9:02 am ]
Post subject:  Re: Serialization bug

Yep, ok, I have made this change and pushed it to Git. I haven't tested the new version but the old behaviour was clearly wrong.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/