Jump to content

Optimizations for high number of models


photo

Recommended Posts

Hello,

Sorry if this was asked or present in documentation, but does Unigine has something to optimize for very large number of distinct models (distinct textures, geometry)? Something like creating atlas of textures and collapsing meshes (based on locality) into fewer chunks so I can reduce the number of draw calls? This to be done on the fly (can be done from code, in runtime, eventually multi-threading, based on distinct meshes).

Kind Regards,

Adrian

Link to comment

Hi and thank you for the response. I am already using clusters of objects for instancing shading the same model. What I also need is some sort of collapsing geometry/textures for distinct models (we are dealing with an application with data collected from real-world, where each building is unique).

Kind Regards,

Adrian

Link to comment

Adrian, are we talking about offline database optimization or do you have sone kind of online, on-the-fly optimization requirement?

If the latter than this will be difficult to achive as it requires quite data intensive segmentation, processing, sorting, merging, etc.

We encountered heavy perfomance issues with badly modelled OpenFlight databases and modells causing far too much draw calls and texture switches, killing the customer-requested frame rate.

The solution was a quite specific offline data post-processing tool for automatic geometry merging and texture-atlas-generation. But processing a 20x20km database quite took some time (more in the range of 20-40 min than seconds...)

 

Link to comment

BTW at least for older Unigine versions there was a script class ImageAtlas for texture atlas generation. Search for file image_atlas.h (was in data/core/scripts)

Link to comment

Hi Ulf,

Unfortunately all needs to be done online (due requirements). And the source data is indeed very fragmented. We will see what kind of performance we will obtain in the end, but probably the end result will suffer visually (we will not have time to load but the coarser LODs). Fortunately our camera is moving very slowly so this should help.

We currently have something like 20k-25k (yes, thousands!) draw calls due to data. So this is a big NO, from performance point of view. The only solution I can think right now is collapsing geometry and atlas of textures, all on the fly.

Regards,

Adrian

Link to comment

yep, that's the way to increase performance, but doing this as a post-process on-the fly for compensation of unoptimized data modelling/storage will be a challenge...

Link to comment
  • 2 months later...
On 8/8/2018 at 10:06 AM, adrian.licuriceanu said:

We currently have something like 20k-25k (yes, thousands!) draw calls due to data. So this is a big NO, from performance point of view. The only solution I can think right now is collapsing geometry and atlas of textures, all on the fly.

Maybe Vulcan helps with that. But if the models are unoptimized and you cant do offline optimization, well this is big issue as Ulf  told. In our project we did some on the fly atlas generation, for example for cca 10 objects it takes cca 1 second to generate 2048px altas, merge into one mesh and modify UV mapping, all in async thread. So doing this for bigger number of objects (or higher res textures) could be problem.

Other option could be implementing some mega texture/texture virtualization solution, so putting all textures into one huge texture (there was such solution for Unity3d, writen c++ and probably could be ported to Unigine (via render to texture), if you buy source licence, it was called Amplify - http://amplify.pt/unity/amplify-texture-2/ some specs: http://amplify.pt/unity/amplify-texture-2/specs/). This has huge advantage, becase you just define your memory budget and it automatically adjusts resolution of textures and streams it into engine, there is almost no texture loading time, 100GB+ of textures in one scene no problem. Also all textures are in one material, so there is no material change operation, you can merge all surfaces of any object into one (in most cases).... This could be huge performance boost, but it would require serious investigation. 

Maybe this could inspire Unigine team too ;)

 

 

Edited by demostenes
Link to comment
×
×
  • Create New...