Jump to content
  • Advertisement
Sign in to follow this  
gtzpower

Library or advice for synchronizing heightmaps of different tessellations?

This topic is 2504 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 everyone. I am tasked with synchronizing 2 tesselations of heightmap data where the sample spacing of the second height map is dynamic (one set of data may have a 20 cm sample spacing where as another set of data may have a 1 meter sample spacing, and I need to be able to apply both to my height map as best as I can). I need something that will take height data (rows and columns of floats), a source sample spacing and a destination sample spacing, and have it return the best fit for representing the data with the new sample spacing. If that doesn't make sense, refer to the graphic below. I want to pass in the red data and get back the blue data as shown in the AFTER part:

tessellation.png

Alternatively, if this type of functionality is not readily available, are there any tips on how to mathematically do it?

Share this post


Link to post
Share on other sites
Advertisement
Let me rephrase your question to see if I understand it: If you have data at points of a particular grid, how do you infer the value at a different set of points?

This can be reduced to: If you have data at points of a particular grid, how do you infer the value at an arbitrary point?

The answer is "interpolation". Your plot suggests that you want linear interpolation of the data, which is fairly straight forward (in 2D there is bilinear interpolation), and it's even available in hardware on graphics cards. In general, there are many interpolation algorithms that can be used for geographic data. Some are quite sophisticated. I would say, if you are happy with the results of bilinear interpolation, go with it. But for some purposes it won't be enough.

Share this post


Link to post
Share on other sites
Thanks! Bilinear interpolation is the phrase I was looking for which will help me find something. A glance at wikipedia reveals an equation that I had independantly came up with, but I wasn't sure if ithe theory would hold up. So that answer is spot on! :) Thanks again!

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!