Description
Describe the problem
There are two closely related problems to solve:
- If a GPU render is submitted, a minimum of 1 GPU is not added to the host requirements (but it should be). This means the job could be assigned to the wrong fleet unless the user also selects a minimum of 1 GPU in the host requirements tab.
- When submitting from a CPU-only workstation, Keyshot only allows the user to select a CPU-only render. It does not allow GPU renders to be configured. We should make this configurable in submissions to AWS Deadline Cloud.
Proposed Solution
- Add a job-specific setting "Render Engine" with options "CPU" or "GPU" to the submitter GUI by adding another option like this
- By default, if no previous option has been selected, use the
lux.getRenderEngine()
setting (lux.RENDER_ENGINE_PRODUCT
andlux.RENDER_ENGINE_INTERIOR
are CPU,lux.RENDER_ENGINE_PRODUCT_GPU
andlux.RENDER_ENGINE_INTERIOR_GPU
are GPU). Set that here - Pass the CPU or GPU option selected in the submitter GUI via the parameter values (should be automatic)
- When receiving the parameter, if the scene has
lux.RENDER_ENGINE_PRODUCT
but the user has configured GPU, calllux.setRenderEngine(lux.RENDER_ENGINE_PRODUCT_GPU)
. Apply similar logic tolux.RENDER_ENGINE_INTERIOR
and vice versa. This logic would be in a new adaptor actionset_render_engine
added here - Investigate adding logic that if GPU is selected, add a requirement of minimum 1 GPU to the job's host requirements.
- Add error handling logic - if the worker machine does not have a GPU, ensure a clear error message is raised.
Scripting reference: https://media.keyshot.com/scripting/doc/2024.3/lux.html
More information about lighting in Keyshot: https://www.keyshot.com/blog/using-lighting-presets-in-keyshot/
Note that CPU and GPU rendering can give different results, and neither is strictly better than the other: https://www.keyshot.com/blog/rendering-in-keyshot-an-analysis-of-cpu-and-gpu-rendering-performance
The proposed solution should not be a breaking change because if the parameter value is not passed to the adaptor, it should use the existing, default behaviour (use the settings from the scene).
Example Use Cases
This will ensure that GPU renders are assigned to the correct workers and also allow users to submit a GPU render from a CPU-only workstation.