Since the last week i've resumed work on the planetary engine. Chances are, i'm going to be busy on it for the next 3 months, so this dev update is only the first of a long serie.
The planetary engine as it was, although certainly not bad technically / visually, suffered from a few design / quality problems. In those 3 months i'm going to fix those issues, improve it, and of course implement the missing features ( water, clouds, vegetation, to name a few.. ).
- cleaned up the interface and removed some of the hard-coded parameters for the surface / atmosphere
- renamed many classes whose names didn't fit. I was calling "flat terrain" a surface patch that wasn't deformed by a heightmap ( ex.: the clouds or the atmosphere ), and i was calling "curved terrain" a surface patch that was defomed by a heightmap. I'm now speaking of "surfaces" instead of "terrain" ( doesn't make sense to call "terrain" the atmosphere ), and of "spherical" the mapping from a cube to a sphere.
- experimented a new way to deforme the cube into a sphere, that has less deformations. Trading a bit of quality for a bit of performance, but i'm not sure yet i'll use it in the end.
- updated the vertex shaders for tangent space calculations. That was hardcore :) I'm still not sure if it'll behave correctly on a real heightmap, but for the global planetary shaders, i now have a per-pixel lit sphere ( planet ) instead of per-vertex lighting as it was before.
- added bump-mapping and the sun specular effect to planet seen from space. Looking rather nice, but the bump must not be over-done.
- started to rework the atmospheric scattering shaders: performance optimizations, more realistic sunsets quality, and later handling of HDRI.
- the planet isn't static anymore and can rotate / move, meaning that at surface level you can now see the sun move in the sky, and the atmosphere colors update in real-time.
- added some keys to make the planet rotation for or less fast, mostly for debugging purposes. But it's fun to see the planet spinning very quickly :)