Rendering Parameters
The following parameters control basic rendering within the handler. Unless otherwise noted they can be set either via the render_loop_handler_parameters argument when calling render_loop_start or while rendering with the render_loop_set_parameter command.
Renderer
The renderer to use is specified using the renderer parameter. All supported Iray renderers are valid and the default is to use iray.
Property Key | Default | Description |
---|---|---|
renderer | default | Set to any valid renderer. |
Example:
{ "method": "render_loop_start", "params": { "render_loop_name": "my_render_loop", "scene_name": "my_scene", "timeout": 60, "render_loop_handler_name": "default", "render_loop_handler_parameters": [ "renderer", "irt" ] } }
Canvas Pixel Type
This controls the pixel type of the canvas used for rendering. Note that this is different to the pixel type of the returned image that is set in either the render_loop_get_last_render call or in the WebSocket. For efficiency you should usually use the same pixel type for the rendered and retrieved images. If using multiple canvases (by specifying canvas_content as an array) canvas_pixel_type may also be specified as an array. The array must contain pixel type strings for each canvas in the render target. Any pixel type that is not specified will use the default Color value.
Property Key | Default | Description |
---|---|---|
canvas_pixel_type | Color | Set to any valid pixel type or an array of pixel types. |
Example:
{ "method": "render_loop_start", "params": { "render_loop_name": "my_render_loop", "scene_name": "my_scene", "timeout": 60, "render_loop_handler_name": "default", "render_loop_handler_parameters": [ "renderer", "irt", "canvas_pixel_type", "Rgba"] } }
Canvas Content
This controls the content to render into the canvas. Additionally if an array of structures is specified then multiple canvases will be rendered. When rendering multiple canvases, each member of the array must be structure containing both 'type' and 'params' field.
Property Key | Default | Description |
---|---|---|
canvas_content | result | Set to any valid render content string, or a canvas parameters map containing 'type' and 'params' fields. |
{ "method": "render_loop_set_parameter", "params": { "render_loop_name": "my_render_loop", "key": "canvas_content", "value": "normal", } }, { "method": "render_loop_set_parameter", "params": { "render_loop_name": "my_other_render_loop", "key": "canvas_content", "value": { "type" : "post_toon", "params" : { "index" : 0 } } } }, { "method": "render_loop_set_parameter", "params": { "render_loop_name": "my_render_loop", "key": "canvas_pixel_type", "value": "Float32<3>", } }
Result Canvas Selection
This controls which canvas is returned by the renderloop and displayed by the client application. The default (-1) displays the last canvas when a multi canvas setup is used. The result_canvas index parameter is only used when canvas_content is specified as an array.
Property Key | Default | Description |
---|---|---|
result_canvas | -1 | Set to a valid canvas index or -1 for the last canvas in the render target. |
Example:
{ "method": "render_loop_set_parameter", "params": { "render_loop_name": "my_render_loop", "key": "result_canvas", "value": 1, } }
Update Scene
If the user sets a new camera instance or options block onto the scene being rendered the render loop needs to be informed of the change so it can start using the new instance/options. This is especially important if the old instance/options is deleted. Setting the update_scene parameter to any value will trigger an update of any required scene data.
Property Key | Default | Description |
---|---|---|
update_scene | N/A | Any value can be provided. |
Example:
{ "method": "scene_set_camera_instance", "params": { "scene_name": "my_scene", "camera_instance": "new_camera_instance" } }, { "method": "render_loop_set_parameter", "params": { "render_loop_name": "my_render_loop", "key": "update_scene", "value": "dummy" } }