# Planetary Terrain Idea

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

## Recommended Posts

I was just thinking about how to implement a planetary terrain. (have not done one before, considering the options and have an idea that might be new) From what I have seen, most used techniques involve subdividing either a cube or icosahedron from global down to local scale, using ROAM variants... Now, what bothers me about this is that they are CPU intensive, and the resulting mesh does not immediatly stream to video card like a flat square heightmap would. Consider my idea then: On a local scale the world is flat, a heightmap is a good approximation. Unfortunatly a square heightmap does not map to a sphere without horrendous distortion. An icosahedron has 20 equal triangular faces. A square heightmap can easily be made triangular by offsetting row coordinates and discarding half of the square. Now we cannot simply make 20 triangle-heightmaps into an icosahedron and call it a world; because the subtriangles on each face need to be pushed out to match planetary radius. A problem here is that such an action distorts the triangles; they are not all equilateral or even in a flat regular grid spacing anymore if you do that. So, what if we 'cheat'; have 20 triangular Flat heightmaps. Where they truly are flat and regular; and have the edge of one link to the next and so on in a icosahedral graph. Then, to account for the curvature of the world, and the distortion of those triangles had they truly been on a curved surface; we 'nudge' the player's(and NPCs) velocity/path calculations to give the effects expected on a curved world - parralel lines will intersect, etc. So basically, the game physics calculations take place on a sphere, but the Rendering takes place on a truly flat local heightmap (for fast and easy rendering) This should work for a near-ground based player; for transitions between surface and orbit some intermediary graphic will be needed. What do you think of my proposal? Physics of a round world, with the rendering of a flat one. My only barrier is a lack of the formal mathematics. I dont know how to accomplish the velocity/path 'nudge' feature to induce sphere-like distortions. But perhaps some of you who know more can comment on the feasability. Thanks

##### Share on other sites
Quote:
 Original post by haphazardlynamedMy only barrier is a lack of the formal mathematics. I dont know how to accomplish the velocity/path 'nudge' feature to induce sphere-like distortions. But perhaps some of you who know more can comment on the feasability.

Mathematically speaking your talking about doing physics computations on a curved space, which has a non-Euclidean metric. For a constant radius of curvature this isn't too ugly mathematically, but computationally more expensive programming-wise, since you can't get away with many of the optimisation tricks we use for programming in Euclidean spaces.

1. 1
2. 2
Rutin
19
3. 3
khawk
18
4. 4
5. 5
A4L
11

• 9
• 12
• 16
• 26
• 10
• ### Forum Statistics

• Total Topics
633768
• Total Posts
3013753
×