Latest updates:

  • The [End] button rotates camera horizontally in respect to planet surface
  • Importing ship models in OBJ fromat with materials and multiple textures
  • Cache for textures and models
  • So I finished the cache for (ships) textures and models. Now it is possible to use models that share the same textures, and each unique texture will be stored in the video memory only once. And unlike SE 0.96, now it is possible to use many copies of a single ship (i.e. making a fleet of shuttles or starships etc), and its model get stored in video memory only once as well - each copy of the ship will use the same model. Ship textures and models cache are now included into SE memory manager, so SE now automatically unloads unused models and textures when video memory space is needed for loading other things (planetary textures, galaxies, new ships, etc).

    These screenshots show a fleet of all models I use now with 4 copies of one very huge ship. Its model has almost 1 million triangles and uses 104 Mb of VRAM, however it is stored only once, so these 4 ships use only 104 Mb. All these ships uses 258 Mb for models and 152 Mb for textures - now we see how important it is to avoid multiple copies of textures in memory.

    The size of models will be significantly reduced when I implement the ship constructor. Now every fuel tank, every engine nozzle, every support beam is made of its own polygons. But in the constructor, ships will be made by a few dozens of main parts, and each part will have its own model, stored in the memory only once.

    The next step is making a possibility of dynamically adding and removing space ships. I'll make a simple interface with the buttons "create ship here" and "destroy ship".

    Good news for modders - now SE supports importing models from the OBJ format with the material library (MTL). And SE now supports multiple textures per model, and you don't need to make a single texture atlas. It is possible to even have no textures in some parts of the model, just the color materials, and still have a good looking model (one car in the screenshot uses no textures).

    Huge ships:

    Small ships. Cars are just a test for the new OBJ importing code. That weird stuff with two spheres and boxes is a (single) test model - it shows that smoothing of normals are working correctly (one sphere is smooth, while the second shows flat triangles).