PDA

View Full Version : What's the best way to handle a planetary approach scenario



NoobCoder
02-24-2016, 04:32 AM
Here's the scenario: I want to simulate a planetary approach from far in space all the way to orbit, then entering the atmosphere then flying low level to approach a runway and landing. In my view this will require the following:


a mesh with "coarse" texture to represent the planet from far (this would probably just be a UV sphere)
a mesh with higher level texture to represent the planet from high orbit (100-200 miles altitude) in this case the sphere would really just be a "dome" because it would be pointless to render the whole planet since you would definitely see less than a quarter of it
as the orbit gets lower I would switch to a series of tiled meshes. I'm' thinking of rendering these meshes (pre-rendering and then caching as needed) from a height-map+texture. As the vehicle moves over the surface of the planet, the visible tiles (in terms of LOS) will activate or de-activate as appropriate so that only a handful of tiles are rendered and in memory at any given time.



Here are my questions:
1 - in general, does this approach make sense to you more experienced folks?
2 - what would be best way to consistently and seamlessly use a height-map and tiling system for a sphere so that as the plane moves over the surface of the planet I can activate and de-activate the appropriate tiles? In case of an ico-sphere for example most triangles are the same shape but a few of them are "warped". In the case of the UV sphere they are all warped and they get more and more so as you approach the poles. Texture "warping" is not that much of an issue for the polar regions from far away but down below close to the surface, it could make mountains and other terrain features look "funny".

The second question (which is the one that bugs me toe most right now) is: Is there a good way to approach tiling/mapping/texturing for low level regions of a planet for a flight simulator?

Thank you!!

NoobCoder
02-24-2016, 01:15 PM
Re-reading my question I realized I didn't pose it clearly at all ... so looking into how I could pose the question in a better way, I ran into the answer to the problem I was trying to solve:

http://www.cs.cmu.edu/~ajw/s2007/0251-SphericalWorlds.pdf

dealing with spherical surfaces from high to low altitudes, mapping textures and height maps is not an easy problem but it's not insurmountable.

The approach they took into the article is to use an icosphere with a cube mapping (for textures and height maps) and Jacobian conversion between spherical and cartesian coordinates to address the spherical distortion between a flat map and corresponding position on the surface.

This combination of techniques would allow to convert between coordinate systems AND have a precise mapping between position, tiles and terrain meshes which is pretty much what I was looking for.

So I found the answer. Sorry for the incongruent question ...