Jump to content

how to pre cache the assets during loading the scene


photo

Recommended Posts

Hi,

How to pre cache the assets/objects/material when loading the new scene?  T The goal is when play back the animation or so, it will improve the performance when loading the objects / play animation, it will have minimal impact on FPS.

Link to comment

is there similar mechanism in unigine like object pooling in unity or other engine? This way, we can pre-instantiate all the objects we’ll need at any specific moment before the scene is played/live.

Link to comment

You can write a small custom logic that will move the camera over your scene to load all the objects into the GPU memory. This will work only if you have meshes + textures + screen gbuffer size smaller that total amount of GPU VRAM available.

You can check an example of this logic implementation in Superposition demo (source/Warming.cpp).

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

what if we have some hidden node in the scene, will this work? In this case, we need to show "the hidden" node first, then hide it again to make sure this is pre cached?

Link to comment
  • 1 month later...

Hi Silent,

We are able to precache the node like objects, materials. 

What about the particles?For  some particle effects, do you have any suggestions to precache during the loading of the scene?

 

Link to comment

Hi silent, these proposed workarounds are impractical in most more complex real world scenarios.

Actually the key issue here is a missing feature of the Ressource streaming implementation: it should be possible for every Resourcen (materials/shaders/textures, meshes, skinned meshes/animations,....) to specify streaming behaviour via some per-instance attribute, supporting different resource loading modes like e g. streaming, pre-cache and locked.

Default value for all assets current streaming mode, but for special cases pre-cache (cache up to a certain memory limit, dynamic resource unload allowed) or even locked (always load on startup, never unload)

Code changes should be quite minmal, but would provide great flexibility for customization of engine resource loading.

  • Like 1
Link to comment

Ulf,

That's is something we are thinking to implement in the future. Right now async streaming allow us to minimize frame rate drop (it works much better than in the old SDKs).

Allowing more control on streaming and setting to many assets to pre-cached or locked state may increase the amount of crashes due to VRAM limitations, so you need to be very careful in assets selection.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...