Jump to content
  • Advertisement
Sign in to follow this  

Explination for qualitative different interpolation

This topic is 2829 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

Dear Forum,

I've come across a curious issue that I hope someone with more experience can help me understand properly. I've been visualizing some volume data (on two nvidia 280m cards) and lately I decided to change the on-board representation of the data with some (at least to me) surprising results.

I originally represented the data in shorts (16 Bits), which was re-scaled to fit the GPU's architecture of traditional 0-1 range. Rendering the data using simple ray casting and hardware based trilinear interpolation yielded the image "short trilinear.jpg" (on the left (or top)). Kind of blocky, but expected.

Then, I got my hand on some more data, and certain inconsistencies between the new and old data caused me to look for a way to avoid rescaling. 16-bit floats to the rescue. After a little fisticuffs with my engine, it saw the error of its ways and voila "float trilinear.jpg" (on the right (or bottom)) is the result.

Notice anything different? I sure do... In fact, I'm kind of astonished and puzzled as to what is the cause of it. I have a few guesses as to what Could be the cause, but I'd love for some feedback on the issue. Here are my thoughts:

The data is obviously more detailed and better interpolated when visualizing the 16-bit floating point data. Causes could be...

  • Possible loss of precision due to re-scaling between 0 and 32767. Potentially, not all bits are being used since I upload the values with signed precision in both cases, and the original values span from about -3012 to 4012. But they are scaled to fit the entire range of 0 to 32767. So I fail to see how the loss of precision would be so high as to produce such a visually different result?
  • Interpolation precision changes due to data representation? The data on the GPU is represented as integers in one case, and in floats as the other. Perhaps graphics hardware just interpolates and approximates to the same kind of value? I would think that the same floating point registers are used for trilinear interpolation, regardless of the original type of data.
  • 16 bit floats have higher precision surrounding 0 and a more sparse precision the further out the values go. Perhaps that has an effect in this case? I'd say my value concentration is the densest from -350 to 800 (when looking at the original data).

    If anyone has any input or can say "that one idea is definately out", then I'd much appreciate it! Even more so if you have a source stating 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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!