Jump to content
  • Advertisement
Sign in to follow this  
paic

Toroidal addressing in terrain rendering

This topic is 4954 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, Some days ago, I found a paper from Hugues Hoppe (Geometry clipmaps: Terrain rendering using nested regular grids) But I got stuck with something my brain don't want to understand : "Toroidal Adressing" ... I understand the idea (modulo addressing) but in this paper and the other related ones found in the reference, I didn't find any usefull information on a practical implementation. So, if someone has an idea on how this thing works, he(she) would be nice to explain it to me ^__^ .:: Paic Citron ::.

Share this post


Link to post
Share on other sites
Advertisement
He actually explains it right where he defines it (though it took me a few times reading his paper to notice):

"...with 2D wraparound addressing using mod operations on x and y"

So, basically, you take the size of your clipmap buffer (sizeOfClipmap), and enter coordinates into the clipmap as such:


xClip = xWorld % sizeOfClipmap
yClip = yWorld % sizeOfClipmap


It's really as simple as that :)

Share this post


Link to post
Share on other sites
I understand now : I'm just dumb ^^ I tried to understand starting from a wrong example, but now I understand well. I think I also need to store the coordinates of the clipmap's center to now where the clip region is, because of the modulo.

Thx again ^^

.:: Paic Citron ::.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!