Jump to content
  • Advertisement
Sign in to follow this  
svnstrk

3D Data Compression

This topic is 2792 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi,

i have a 3D data that can be represented like this:

http://www.flickr.com/photos/42848335@N05/5182577408/

the x and y value on the bottom is the index, and the height is the quantity. i need to compress it, since the real data is much more massive than this. but im not very familiar with 3D compression.
im curious if there is a compression that can do any good to my data. its an image data that need to be rendered later, so the search on the compression should be fast.

can anyone help me? a hint or clue would be good.


thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Are the points spaced evenly on a 2d grid? Is it a heightmap? If so, you won't need the x and y coordinates, just the width and height of the grid, then the heights of those points. This can reduce the amount of data by a two thirds.

For even further compression, try looking at using a lossless compression library, such as zlib.

Share this post


Link to post
Share on other sites
Is the data in a fixed range? (ie your image looks like it goes from [0-256) ) You can store the height data in fixed point instead of floating point to get the most out of the bits in the range that you are looking for. (ie a height map with integer values [0-256) could be stored as 8bits per element instead of a full 32bits of float)

Share this post


Link to post
Share on other sites
hi,

its a color data, i already use 8 bit. the problem is i want to make a color compression that can be rendered in real time. basically this data is ssomething that i capture from the render scene. so what i want is to be able to capture this data in realtime. im currently able to compress it using a linear piecewise interpolation, so im picking samples from the raw data. then i draw it by using vertex/fragment shader. however this compression is not that ideal (half the size at best). can any1 give me any other compression that can work in real time in fragment shader?


thanks in advance

Share this post


Link to post
Share on other sites
Since color looks to be entirely a function of height, it can be removed from the equation. What you're left with is a single-channel 2D bitmap, mapping (x,y) coordinates to a scalar output ("height").

Since this is the same problem as that of compressing a monochrome image, there's a whoooole lot of existing ways to do it. JPEG, for instance, uses downsampling, quantization, frequency transform, and lossless Huffman encoding on blocks. Which of those are useful to you and which are not depends greatly on the nature of the data and your particular requirements for it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!