The GUI texture system will be changed in 0.981. I didn't make a tutorial yet, because it is too early for it. In short:
- Added a big font textures. There are 2 fonts now: old 256*256 pix (16*16 pix characters), and 512*512 pix (32*32 pix characters).
- The font config file don't uses character coordinates/width table anymore, it is being constructed by SE automatically. It uses two configuration tags for two font textures (Font 0 and Font 1):
Texture "win1251-font.*" // path to the font
Ascent 0 // glyph vertical offset
Approche 1 // glyph interval
SpaceWidth 8 // whitespace width
- The main menu texture was removed. Now text on buttons are typed with a new big font. The buttons images are added to the interface texture.
- The logo and crescent are moved into a separate textures, so can be easily modded.
- The skin config file has new parameters, which allows to mod all the mentioned above:
SkinTexture "interface_mod.*" // interface texture
BackTexture "menu2.*" // main menu background texture and cubemap (extended to menu2_pos_x.*, menu2_pos_y.*, and so on)
LogoTexture "logo.*" // "SpaceEngine" logo texture
HaloTexture "halo.*" // halo (planet crescent) texture
Force3Dbackground true // always use 3d background (cubemap), even in non-stereo/VR modes
DualFont false // don't use old small font, use only new big font with downscaling
So you now can easily make a main menu mod, by simply adding a new skin config file and required textures. The new skin can be selected in the player settings menu. The modded font will affect all skins thought, but I can change that too.
My current build uses static background texture for some skins. There must be provided a skybox texture, captured in the same location as the background texture, with 2048*2048 resolution. Then user switches to 3D stereo mode, VR mode or fisheye/cylindrical/cubemap projection, the background texture in all skins changed to that skybox texture (because flat background cannot be rendered in those modes, especially in VR). Some skins uses forced skybox even in 2D mode, with camera slowly wiggles across the skybox (sort of a dynamic effect).
I am not satisfied with this system, so it may be changed before release. The major drawbacks:
- Skybox texture is encoded into 8-bit image format, which in SE causes huge banding artefact on a part with a smooth gradients on the image (dawn, atmosphere top, milky way). Almost no scenes in SE has no smooth gradients.
- Skybox textures are large, very large. One single 2048*2048 uncompressed skybox took 128 Mb of video memory. Compressing it into DDS reduces it to 32 Mb, but artefacts became even more worse.
- Skybox must be at least 2048*2048 to make stars more or less "point" on 1080p screen. On a 4k screen, stars may start look blurry.
So I will probably change the static skybox texture to a full dynamic scene rendered by the engine. But this solution has also drawbacks, major of them is loading time. Each time you exit to the main menu, you will see nothing for at least few seconds (or maybe a blurred skybox?).