Upload progress
The Iray Bridge render contexts automatically upload scene data as needed. Sometimes, especially when rendering the first frame of a new scene, this will upload a considerable amount of data which can take a long time. Provided a mi::neuraylib::IProgress_callback instance was passed to the render call, the Iray Bridge render contexts will issue progress callbacks while rendering to indicate that an upload is taking place and report the current progress of the upload.
The following progress areas will be issued:
Progress area | State |
---|---|
bridge_upload_state | 0 Detecting scene changes. Not yet known how many scene elements need updating. |
1 Calculating hashes. Calculating hashes for the data that needs updating. | |
2 Querying server side cache status. Not yet known how much data needs to be uploaded to the server. | |
3 Uploading. It is now known how much data needs to be uploaded. | |
4 Pending. Waiting for server to finish processing the uploaded elements. | |
5 Done. Upload is done. | |
bridge_total_bytes_to_upload | Total number of uncompressed bytes to upload. In state 0 to 2 the number indicates the amount of data for the cache misses reported by the server so far. |
bridge_bytes_uploaded | Total number of uncompressed bytes uploaded so far for this upload. |
bridge_updated_elements | The number of scene elements that are being updated. In state 0 the number indicates the number of changed elements detected so far. |
bridge_pending_hash_calculations | The number of pending hash calculations that needs to be done. |
bridge_pending_cache_status | The number of cache status requests sent to the server for which no answer has arrived yet. |
bridge_pending_data_serialization | The number of cache misses that still require the data to be serialized before it can be sent. |
bridge_uploaded_element | The name and size in bytes of the currently uploaded element. |
bridge_uploaded_element_bytes | The number of bytes uploaded for the currently uploaded element |
The most important area is the "bridge_upload_state" which will be fired as soon as rendering is stalled because of an upload. Iray Bridge will start by detecting what changes need to be uploaded since the last render. As soon as it has detected changes, it will start querying the server for cache status. If the server reports cache misses, then the client will start uploading the data. All this happens in parallel and the different states indicate when the client is done with a certain task, at which point some values will be final.
-
In state 0 changes are being detected, so it is not known yet how many elements or how much data will be uploaded.
-
In state 1 it is known how many elements needs to be updated and hashes for those elements are being calculated. The hashes are needed to be able to query the server for cache misses.
-
In state 2 hashes for all updated elements have been calculated, but the server has not yet responded to cache status for all elements so the total amount of data to upload is not yet known.
-
In state 3 it is known what needs to be uploaded
-
In state 4 the upload is done but the client is waiting for a confirmation that all changes have been persisted in the server side database
-
In state 5 the upload is completely done.
The rest of the areas give detailed information about the upload progress and give the values known so far or the final value depending on the upload state. The states are entered strictly in order 0-4, but states may be skipped if they are already done or if there was nothing to do in the state.