Jump to content

[SOLVED] LODs vs streaming


photo

Recommended Posts

I have few questions regarding LODs and streaming. How does it exactly work? When exporting from MAX, I can export all LODs as one mesh, or as separate meshes. Is there any difference?

From my point of view, it would make more sense to export as separate meshes, because then I can stream each LOD separately and save some memory. Idea is simple you never need LOD0-LODn in memory at once, you actually need only last LOD and load lower LODs only in case, I am coming closer. If I have 500 objects visible in scene, It is total waste to load all LODs, because in reality I will need all LODs only for fragment of objects (objects I am going to). So I can have some small atlas for last LOD (so it costs nothing) and for LOD0 I can have lots of high-res textures/tiled textures, etc... In case everyhing is loaded at once it can be huge problem in for example some city area. Does Unigine work likes this, or it always streams whole node? Does Unigine needs all LODs to do for example some blending? Does Unigine loads always all LODs on first sight, or only when particular LOD is needed? Or it is better to have objects as two nodes, one for big distance with very low poly model and some texture atlas and second node for closer distance to stream it in two steps? Thanks.

Link to comment

Don't think there is a simple answer to these questions. In general exporting geometry as separate meshes will increase spatial tree complexity and processing overhead and also might introduce problems on LOD transitions. In this aspect usage of multi-LOD surface approach is more attractive.

 

Of couse loading high-poly mesh modells with all LOD's for just using lowest LOD most of the time introduces some memory overhead. As far as I know UNIGINE does not support partial loading of mesh geometry LOD's yet. Nevertheless material textures for high-quality LOD's will only be loaded on demand. As mesh geometry is most of the time much smaller than texture this should already save a huge parts of model memory.

 

In general complex urban scenes (or in general scenes with long view distances) require multi-level optimization including baking simplified individual model geometries into larger geometry chunks and texture atlases to reduce draw call counts and improve performance.

 

Neertheless smooth LOD transitions between different geometry instances and overall scene management still remains challenging. Therefore we already proposed such kind of complex urban scenario for next UNIGINE demo for scene-specific engine optimization and best-practice UNIGINE usage example for customers.

Link to comment

All geometry from a mesh file is indeed loaded at once - but that's a real trifle if compared to textures. Plus when meshes are no longer used, they are automatically removed from memory.

 

In any general case you can use LODs and then sit back and let the engine handle it for you. For urban scenes, for example, you can use occluders for additional optimization. So basically, before the scene geometry is too heavy to be handled despite all in-built features (i.e. 50% of memory is eaten up by geometry, which is not likely), it does not make much sense to implement any custom system for loading.

 

@Ulf: sure, after our city demo is released, we will consider this variant for demos-to-be.

Link to comment

Thanks to all for explanation. For me is key information, that textures are loaded on demand, not automatically for all LODs.

 

How such loading works? When there is demand for texture, is it streamed on background to not cause any lag? We have few heavy objects with for example 250MB of textures for LOD0 (huge castles made from many surfaces), in such case last LOD is indeed small atlas.

 

It would be good idea to put it into documentation. Maybe I am blind, but I was not able to find more detailed information about memory management vs streaming/LODs. It is quite important to know this to be able to design scene in optimal way.

 

Thanks.

Link to comment
×
×
  • Create New...