It is currently Sat Aug 22, 2020 4:15 am


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Homogenous blocks / future RLE encoding
PostPosted: Tue Jan 25, 2011 6:55 am 

Joined: Sun Jan 23, 2011 6:06 am
Posts: 92
Hi,

I have been reading a few of the threads of the forum and noted that you were planning to make changes to the volume structure including introducing RLE encoding. I am just wondering whether you will maintain or remove homogenous blocks?

I ask because presently if I want to free some memory I can set all the voxels in an area I am no longer using to the same value then call tidyUpMemory.

Of course this is not very efficient, so I was thinking of adding a function like:

template <typename VoxelType>
void Volume<VoxelType>::homogenizeBlockContainingVoxelAt(uint16_t x, uint16_t y, uint16_t z, VoxelType voxelData)

which would basically just find the matching block and call getHomogenousBlock(voxelData), which would be quicker than manually setting every voxel and then calling tidyUpMemory()

But if homogenous blocks are going away, then there's not much point in me doing this.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Homogenous blocks / future RLE encoding
PostPosted: Tue Jan 25, 2011 6:39 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
I'm pretty sure the block sharing will go away, when a block is homogenous it should compress down to just a few bytes anyway. If I were you I'd just keep your change locally, until the compression is implemented. But thanks anyway.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Homogenous blocks / future RLE encoding
PostPosted: Wed Jan 26, 2011 2:37 am 

Joined: Sun Jan 23, 2011 6:06 am
Posts: 92
OK thanks for that.

I wasn't intending to commit the change, just keep it local anyway.

Since I would still prefer to keep up to date with what's on the SVN, I will just wait until you implement RLE before worrying about it.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


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