Brian Sharpe, Senior Rendering Developer of SideFX based in New Zealand, has presented an overview of the architecture of Karma XPU, SideFX's new hybrid GPU/CPU renderer, on 24 March at NVIDIA’s 2022 GTC Conference and Training event. Currently under development and available as an alpha preview release, Karma XPU is an engine option for the Karma renderer that users can select to take advantage of GPU and hardware acceleration.
Digital Media World had a chance to ask Brian a few questions about Karma XPU. Like the CPU-only engine, XPU uses CPU resources but it can also tap into any compatible devices it detects, including more than one GPU. If a device fails during a render, for instance, when a GPU runs out of memory, the other devices including the CPU will redistribute the work and finish rendering the frame. In any case, the XPU engine should produce the exact same result regardless of the combination of devices in use.
Karma XPU currently only supports CPU and NVidia Optix devices, as Optix is the most optimised code path in XPU. Future versions are expected to have improved CPU performance and support more GPU hardware, including both AMD and Intel GPUs.
Because it uses hardware acceleration, Karma XPU is very fast compared to the CPU engine, making it possible for artists to rapidly generate high-quality preview renders, although it may have less functionality. Right now, Karma XPU is not meant to replace the CPU engine, but rather to serve as a high performance, limited set of features for accelerating iterations for artists. Users should also remember that XPU may generate different looking, or sometimes less correct, results compared to the CPU-only engine.
Karma XPU materials
In the GTC presentation Brian talks mainly about using devices and combinations of devices to produce the final image. He examines aspects like the different ray types and how to efficiently implement them on NVIDIA OptiX, and talks about volumes, transparency and shading.
Shading will feel somewhat different to artists when using Karma XPU. The new engine supports the built-in USD materials such as the USD Preview Surface, and MaterialX, which is expected to form the basis of shading for the Karma renderer, into the future. We asked about the fact that the new engine will not be supporting the traditional VEX-based shaders that Mantra and Karma CPU use now.
“There are a lot of features in the VEX language [Vector Expression Language used to write shaders] that don't transition well to GPUs,” Brian said. “While it would be possible to put in a lot of effort and get those features working, in the end the performance would not be good, defeating the purpose of the XPU renderer to start with. Instead, we've chosen to have two separate renderers – Karma CPU that supports all the Mantra-like capabilities that some people really need and love, and Karma XPU, designed to operate very efficiently on GPU but with a reduced feature set as a result.
“Because MaterialX is still very new and its features are growing quickly, we expect any limiting factor of MaterialX to resolve itself in the coming months and years. MaterialX also adds the flexibility of sharing data with other applications such as Substance Designer, which we consider to be a valuable feature.”
Rendered on XPU
SideFX hasn’t ruled out the possibility of Karma XPU having a shading language later on. For example, in a future release, something similar to OSL may become available, or perhaps a subset of VEX. However, he noted that the development for a new language would be a massive undertaking, and Brian’s team would rather focus on other tasks first, such as AMD support, subsurface-scattering, out-of-core rendering and so on.
Going back to the main driver of Karma XPU, which is speed, Brian said, “For our users, fast rendering is crucial. Having both fast interactive visualisation in the viewport and quick turnaround on final shots speeds up workflows significantly, which is especially important for simulation-type effects that usually need many iterations before they are considered complete. GPUs are essential for achieving that goal.”
At this stage, SideFX wants artists using Karma XPU to be able to achieve all looks and results they have been achieving up to now with Karma. They also aim to bring XPU up to par with Karma CPU in terms of functionality, and for the final results of both to match as closely as possible. Brian said, “We anticipate that there will be some differences in functionality between them in the future. One possibility is remote/network rendering, to which the XPU design is better suited than Karma CPU.” www.sidefx.com