Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎮 Unity

Spherical terrain - Lutz implementation...

Started by ZealousEngine Sep 2, 2008 at 5:21 AM 0 replies 2.1k views
Original Post
ZealousEngine
ZealousEngine
I am trying to implement a spherical terrain system where a single geo clipmap sits ontop of a sphere, in its own arbitrary coordinate space. The basics are pretty simple... http://www.math.uni-bremen.de/~justen/Mich/planetrendering_gallery_e.html?lang=0&stylefile=Layout/default.css Ok, so I have my square clipmap sitting ontop of my sphere. For simplicity I start by placing the clipmap at the top of the sphere, so it has a identity matrix to begin with. My question is, now how should I move/update the clipmap? My clipmap class works on the assumption that everything is 2d. Shifts take place when the camera position goes beyond a certain point on the x/z axis. How should I adapt this to a 'Lutz style' spherical terrain? Should I be using the dot product of the camera position and the vectors of the 'clipmap coordinate space', which will give me a relative distance from the center of the clipmap. Or should I try and transform the camera position from world space into another space (one more relative to the clipmap?). I have been using the dotproduct approach, but what am I supposed to do when root level of the clipmap needs to shift? How do I tell where to rotate/position the clipmap based on this shifting? Thanks for any help!
Hello Kitty
Hello Kitty
A lot of your questions have to do with implementation choice, and you have to make those decisions. I have made a spherical clipmap engine loosely based on hoppes geometry clipmaps : http://research.microsoft.com/~hoppe/

I can post some images for you to look at while you design your code. My engine has 6 separate clipmaps each centered based on the cameras position.

As you can see, only the 2 closest matches actually line up, and the third(top) cant be correct for both left, and right. In this case, the camera is closest to the left face. And the next closest is the right face.

The red lines are clipped polygons. Everything is calculated when it is a cube, and then all positions are normalized, making it a sphere.

http://www.tanzanite.to/david/cubeclip001.jpg
http://www.tanzanite.to/david/cubeclip002.jpg

how do you imbed images?
-goodbye-

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.