It is currently Sun Nov 17, 2019 1:02 pm


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [Resolved] Serialization bug
PostPosted: Thu Apr 05, 2012 8:46 am 

Joined: Sun Oct 03, 2010 10:13 pm
Posts: 73
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?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Using Ambient Occlusion
PostPosted: Sun Apr 08, 2012 10:11 am 

Joined: Sun Oct 03, 2010 10:13 pm
Posts: 73
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?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Using Ambient Occlusion
PostPosted: Sun Apr 08, 2012 3:25 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Serialization bug
PostPosted: Mon Apr 09, 2012 1:09 am 

Joined: Sun Oct 03, 2010 10:13 pm
Posts: 73
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Serialization bug
PostPosted: Mon Apr 09, 2012 9:02 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net