mi::neuraylib::IQueue_manager_connection Class Reference
[Queue manager]
Description
Represents a connection to a queue manager server.
See also:
mi::neuraylib::IQueue_manager_api::connect()
Public Member Functions
- virtual const char* get_authentication_token() =0
- Returns an authentication token which has to be provided to the Bridge client to upload snapshots. More...
- virtual const char* get_compatible_snapshot_bridge_url() =0
- Looks for a compatible bridge application on the server-side which can be used to upload snapshots. More...
- virtual Sint32 submit_job( const char* project, const IArray* snapshots, const IArray* render_target, Uint32 resolution_x, Uint32 resolution_y, Uint32 max_samples, Uint32 max_time, Float32 quality, const char* image_format, Uint32 priority, const char* render_mode = "iray", Stereo_pairing_mode stereo_pairing_mode = STEREO_PAIRING_NONE, Float32 stereo_eye_separation_distance = 0) =0
- Submits a job to the queue manager server. More...
Member Functions
- virtual const char* mi::neuraylib::IQueue_manager_connection::get_authentication_token() [pure virtual]
-
Returns an authentication token which has to be provided to the Bridge client to upload snapshots.
Returns
- Authentication token
- virtual const char* mi::neuraylib::IQueue_manager_connection::get_compatible_snapshot_bridge_url() [pure virtual]
-
Looks for a compatible bridge application on the server-side which can be used to upload snapshots.
Returns
- Bridge URL or NULL if no compatible bridge is running
- virtual Sint32 mi::neuraylib::IQueue_manager_connection::submit_job( const char* project, const IArray* snapshots, const IArray* render_target, Uint32 resolution_x, Uint32 resolution_y, Uint32 max_samples, Uint32 max_time, Float32 quality, const char* image_format, Uint32 priority, const char* render_mode = "iray", Stereo_pairing_mode stereo_pairing_mode = STEREO_PAIRING_NONE, Float32 stereo_eye_separation_distance = 0) [pure virtual]
-
Submits a job to the queue manager server. In order to submit a job to the queue manager server the snapshot names specified in the snapshots parameter must have been uploaded to the server first. See the mi::bridge::IIray_bridge_snapshot_context for details.
Parameters
- project
- The name of the project this job belongs to. Rendering results are aggregated per project name. Later jobs of the same project might overwrite rendering results of earlier jobs of that project.
- snapshots
- A static or dynamic array of structures describing the snapshots of the job. These structures of type Snapshot_data have two string members, "snapshot_name" and "result_name", and an optional third boolean member "full_snapshot" that defaults to false. The "snapshot_name" describes the name of the snapshot file which has been uploaded to the server before with the mi::bridge::IIray_bridge_snapshot_context. The "result_name" member defines the name of the result file on the server. It must contain a placeholder "%B" which will be replaced by the buffer output name on the server. The buffer output name is defined in the render_target parameter. The "full_snapshot" member should normally not be set which means the snapshot is incremental. This is the preferred way of creating snapshots where only the first snapshot is full and the rest are incremental, i.e. contains only what has actually changed since the last snapshot. Setting this member to true means that the snapshot is full, and the server will make sure to clear any scene already loaded and load the snapshot as a new scene. Use this feature only if a snapshot contains changes that are not compatible with the previously created snapshots. The first snapshot must always be full and will be assumed to be full even if "full_snapshot" is left at it's default value of false.
- render_target
- A static or dynamic array of structures describing the render target to be used for rendering. These structures of type Canvas_type have three members that describe the type of the canvas, "pixel_type" of type String, "type" of type Uint32, and "params" of type Canvas_params. The first specify the pixel type of a canvas in the render target. The second maps to the Canvas_type enum, and the third in turn contains the parameters "color_lpe" of type String, "alpha_lpe" of type String, "index" of type Sint32, "edge_color" of type Float32<3>, and "scale" of type Float32<3>. See mi::neuraylib::IRender_target for details. The final member of Canvas_type is "output_name" which one is used to construct the name of the result file on the server.
- resolution_x
- The resolution of the camera in X direction.
- resolution_y
- The resolution of the camera in Y direction.
- max_samples
- The value of the attribute progressive_rendering_max_samples.
- max_time
- The value of the attribute progressive_rendering_max_time.
- quality
- The value of the attribute progressive_rendering_quality.
- image_format
- The image format to be used for saving the rendered images, e.g., "jpg". Note that support for a given image format requires an image plugin capable of handling that format.
- priority
- The priority of the job. The smaller the value the higher the priority. The highest priority is 0.
- render_mode
- The render mode to be used, for example, "iray". Possible values are documented in Section [:ipmlink rendering Render mode selection] of the Iray Programmer's Manual. Currently only Iray Photoreal and Iray Interactive are supported. The default value is to use Iray Photoreal.
- stereo_pairing_mode
- Pairing mode for the images of the left and right eye (see mi::neuraylib::Stereo_pairing_mode). Stereo rendering is disabled by default.
- stereo_eye_separation_distance
- Specifies the eye separation distance in scene units. This value should be set to the same value as the camera attribute "mip_lens_stereo_offset" (see [:ipmlink camera Lens]). The camera attribute will be overwritten by this value.
Returns
- 0: Success.
- -1: Invalid arguments (NULL pointer).
- -2: Invalid element type or NULL pointer in snapshots.
- -3: Invalid element type or NULL pointer in render_target.
- -4: Connection error.
- -5: Invalid server response.
- -6: The job was rejected by the server.
- -7: An invalid render mode was selected.