Update 0.990.36.1665 (beta)
Todays build 0.990.36.1665 is released in the beta branch, so if you want to test this, feel free to join the beta. Changes:
These updates improve taking screenshots and capturing video. Writing screenshot/video frames to the disk is now multithreaded, i.e. using all cores of CPU. No more large delay on saving screenshot to png format (it previously could take seconds on 4k!). Capturing video as a set of lossless png frames is also much faster now (not as fast as saving to tga, but png reduces disk space requirements by a factor of 2-3).
Updated video saving tool:
The video capture tool there have an option to automatically run a specified script when you pressing the record button. Recording is stopped automatically once script is complete. There is also an option to exit SE or minimize SE window once recording is complete, to cool down CPU/GPU (SE in minimized state does not make any load on your system, just stays idle in memory). So you can launch long video capture task and go away without worrying what you PC will be molten when you return.
The good use case of script autorun is recording a complex animation. For example, I made this video of constellations by creating a script, running it and started video capture at the same time. Now this is possible by one button click.
This is optimization of video memory usage by terrain textures. As I explained in one of the previous posts, terrain engine in SE uses several texture arrays of different formats to store textures. In the release build I decided to use a separate texture array for every type of texture, not for every format. I.e. elevation maps, color maps, emission maps etc are all stored in their own arrays - total 10 types of textures (but only 4 formats). This was necessary because OpenGL have a limitation on the texture array size - 2048 layers. If all textures are packed by formats, this will limit terrain engine to 4096 textures, what is not enough even for LOD -1.
But the major drawback of this is huge video memory requirements - 1.9 GB for compressed textures and 3.7 GB for uncompressed ones (for 2048 layers). On a systems with smaller amount of VRAM, size of arrays is reduced, up to only 256 layers. This is enough only to complete loading of a planet on surface at LOD -1 and display resolution of 720p. This is why on low and medium graphics settings I was forced to limit LOD and "terrain resolution".
The main consumers of video memory are elevation and temperature map arrays - they take 340 MB each. By combining them into a single array I reduced VRAM requirements by 340 MB. It is still possible to load planet at LOD 0 at 1080p, but on higher LOD or resolution infinite loading may occur. Not all planets have thermal emission (active volcanoes or lava), so this is a good compromise. More testing is required. I also can make this feature optional, disabled on systems with large VRAM.
Similarly, I combined emission maps with surface color maps into a single array. Emission maps currently used only on Earth and Io (city lights and volcanoes), and compressed texture array for them was 170 MB, and uncompressed one was 680 MB! What a waste of memory, especially if you don't plan to visit Earth or Io! This optimization makes Earth reloading its textures a bit more often (city light map does not have very high resolution), but saves a lot of video memory, so I think it must be a default feature now.
As a result, on systems with small video memory SE can use more VRAM for other textures, which makes generation of terrain more steady and probably allows to use larger LOD. More testing is needed.
Other changes are visual:
Red giants now looks like on Doc's mod:
And some bugfixes, including fix of annoying issue with change of planet atmosphere color after restarting of SE:
Also I updated the creating planet textures manual and released the new version of the CubeMap tool (v1.15). It is now multithreaded, using up to six CPU cores to create six cube faces, and 64-bit, so can load the whole texture into RAM, which significantly improves performance. The link to download the tool is on the manual page.