Rendering planets: Distortion free spheres

An icosphere breaks up naturally into panels which can be represented with data grids fairly easily (though the way the borders interact is very counter-intuitive.)

For my own game exploring and manipulating the planets is going to be important so keeping track of (and being able to alter) each vertex is key. Using panels also helps with creating a lod system when placing a LOD node at the center of each panel:

Realistic scales might not achievable. For myself I quickly abandoned the idea of realistic scales when I encountered fact that graphics engines only use single float precision for vertex coordinates which places an effective limit on the size of your world. Let’s say you choose 1 meter as your base unit, this means that as soon as you move beyond 65536 meters (65km which is nothing in space terms) from the origin (0, 0, 0) you lose an entire digit of precision, and then again when you move 10x further than this. The effect ends up being of a ship or character that no longer moves smoothly across the screen but one that jumps around from point to point. For a better explanation see this thread:

[url]precision of coordinates in Panda3D?]

For myself realism isn’t the most important aspect, but play-ability, so in the end I went with a size scale for planet bodies of 1000 to 1, which sounds really small but actually still leaves a lot of surface area (570km**2 for an Earth sized body). Though even at this scale I still had to come up with some elaborate mechanics to get past the precision limitation. Here’s a crude render of a fairly early version, the features are exaggerated and the ocean is simply a blue sphere but it shows the basic idea: