• Welcome to World Machine Community. Please login or sign up.
July 24, 2019, 12:45:13 am


Read the Development Diary for an inside look at World Machine's progress!

Compressed output format

Started by BenS1, January 14, 2011, 01:02:25 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


In the terrain generator I created myself for my game I compressed my heightmap data as follows:
1. I'd generate and store the heightmap data as raw 16bit height values (So, for a 1024*1024 title that'd be 2097152 (2Mb)).
2. I'd then calculate the average height of tile and make all the other values as deltas from this average.
3. If you look at the frequency of the deltas you will see that some numbers occur much more often than others. This makes it the perfect candidate for huffman encoding.

The net result is a big saving in disk space.

Also, for a game like mine where the terrain is so large that it has to be loaded in real time as needed, the smaller files sizes mean quiker load times (Even with the time it takes to decompress this in memory, its still much quicker than loading the original file).

Do you support anything like this now, or is this a prime candidate for a user add-on?



World Machine supports hf2/hfz terrain. You can read more details about that on the L3DT website. The terrain spec was created between a number of developers. It's supported by L3DT, World Machine, Global Mapper and Wilbur I think

You can read in detail here:


Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S save/post or ALT+P preview