ENG New site

Site menu
Login form

Our poll
What would you most like to see in the next version of SpaceEngine?
Total answers: 60130

Now on site:
Total online: 1
Guests: 1
Users: 0

Today visited:


Main » 2012 » December » 5 » Ships model cache and other updates
Ships model cache and other updates
Latest updates:

  • The [End] button rotates camera horizontally
  • Importing ships models in the OBJ fromat with material 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 too - each copy of the ship will use the same model. Ships textures and models cache are now included into SE memory manager, so SE now automatically unloads unused models and textures when video memory is free and needed for loading new stuff (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 dozen 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), So 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 importing new code. That weird stuff with two spheres and boxes is a (single) test model too - it shows that smoothing of normals are working right (one sphere is smooth, while the second shows flat triangles).

  • Views: 813 | Added by: SpaceEngineer | Rating: 5.0/1
    Total comments: 0
    Only registered users can add comments.
    [ Registration | Login ]