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

Homogenous blocks / future RLE encoding
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=2&t=126
Page 1 of 1

Author:  DefiniteIntegral [ Tue Jan 25, 2011 6:55 am ]
Post subject:  Homogenous blocks / future RLE encoding

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.

Author:  David Williams [ Tue Jan 25, 2011 6:39 pm ]
Post subject:  Re: Homogenous blocks / future RLE encoding

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.

Author:  DefiniteIntegral [ Wed Jan 26, 2011 2:37 am ]
Post subject:  Re: Homogenous blocks / future RLE encoding

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.

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