Jump to content

[SOLVED] find out if if unigine is done rendering grass etc.


photo

Recommended Posts

Is there any way to find out if unigine is done loading objects into the scene eg. grass. I am working on batch capture and being able to find out when the scene is good to go would be very useful.

Link to comment
  • 2 weeks later...

ObjectGrass and ObjectMeshClutter nodes will have getSpawnCount() method which will return the number of to be generated cells.

Everything will be ready when this function will return zero value.

Link to comment

It might be helpful to have another function e.g. getQueueCount() on the filesystem singleton to get an indication if there are any pending background resource loads e.g. after a scripted jump to a new location.

 

Maybe there is an even better place or mechanism to check end of background resource and node streaming ?

Link to comment

engine.world.getNumQueuedNodes() would complement available function set for getting pending background resource loads.

 

Another issue is that the number of queued files will "miss" any resource which is currently in the process of being loaded by the backgroud thread (processed_node in the source code).

 

Therefore getNumPendingData|Files|Images|Meshes|Resources|Nodes() returning sum of queued and currently processed files would be precise and a value of 0 would correctly indicate end of any background load. 

Link to comment
  • 2 weeks later...
×
×
  • Create New...