Understanding V-Ray Hybrid rendering


 

CUDA Rendering on CPUs

 

GPU code can be difficult to debug. When the code crashes, as it inevitably does, it may only return a kernel dump, with no information about which part of the code actually caused the crash. To uncover the cause, a developer will comment out each section of the code until the culprit is found. This process can be tedious and time consuming.

To make GPU debugging easier, our lead GPU developer Blago Taskov had the idea to port the CUDA code over to the CPU, where he could use better debugging tools. Once he had it working, Blago could identify exactly which line of code caused the crash. But this also led to a bigger discovery. Now that V-Ray CUDA was rendering on both CPUs and GPUs, and producing the exact same results, V-Ray Hybrid rendering was officially born.

 

V-Ray Hybrid Benchmarks

 

To find out the speed boost we get by adding CPUs to the GPU mix, we benchmarked two V-Ray CUDA scenes from our friends at Dabarti Studio.

For these scenes, the addition of CPUs helped reduce render times by 13% and 25%. It’s a welcome speed boost, rather than leaving these powerful CPUs idle.

Hardware

CPUs: 2 x Intel Xeon CPU E5-2687W v3 3.10 GHz, total of 40 logical CPU cores
RAM: 128 GB
GPUs: 2 x NVIDIA Quadro GP100 with 16GB each, total of 7,168 GPU cores

© Dabarti Studio
Mars Rover scene

Engine: V-Ray 3.6 CUDA
Resolution: 1920×1080
Noise threshold: 0.01

GPUs + CPUs
Time: 4:27 (267s)

GPUs only
Time: 5:03 (303s)
13% longer than GPU + CPU

CPUs only
Time: 26:25 (1585s)
520% longer than GPUs alone

Salt and Pepper scene

Engine: V-Ray 3.6 CUDA
Resolution: 1920×1080
Noise threshold: 0.01

GPUs + CPUs
Time: 9:11 (551s)

GPUs only
Time: 11:33 (693s)
25% longer than GPU+CPU.

CPUs only
Time: 40:52 (2452s)
354% longer than GPU alone.

Let’s consider a few use cases for V-Ray Hybrid

 

Maximize your computing power

If you have a powerful workstation, say 40 CPU cores and 4 GPUs, you can take advantage of all its computing power. Nothing is left idle.

 

Use all your render nodes

Many artists and studios have GPU & CPU workstations and CPU render nodes. With V-Ray Hybrid they can render using all the hardware they have.

 

CPU fallback

In case your scene won’t fit into your GPU RAM limits, you can still render on CPU.

 

Upgrade to GPUs as you go

As CPU machines are ready to be replaced, V-Ray Hybrid can help ease the transition to more GPU rendering, while continuing to take advantage of existing CPU resources. Additionally, if there is an empty PCIe slot on a workstation or render node, adding a GPU can give it a radical speed boost without replacing the whole machine.

 

A few things to note

 

V-Ray Hybrid and V-Ray Production renderer

It’s important to note that the V-Ray Hybrid (GPU–CPU CUDA) renderer is not the same as the V-Ray Production (CPU) renderer, and the two engines will continue to remain separate.

 

GPU cores vs. CPU cores

While V-Ray Hybrid can render on CPUs and GPUs simultaneously, CPU cores and GPU cores are not the same. For example, a GPU with 2560 cores is not simply 320 times faster than an 8 core CPU. To determine the actual speed difference, real-world benchmark tests are required.

About the author

Christopher Nichols

Chris is a CG industry veteran and Director of Chaos Group Labs. He can also be heard regularly as the host of the CG Garage podcast which attracts 20,000 weekly listeners. With a background in both VFX and Design, Chris has worked for Gensler, Digital Domain, Imageworks and Method Studios. His credits include Maleficent, Oblivion and Tron: Legacy.