Announcement

Collapse
No announcement yet.

Introduction to GPU Rendering

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Introduction to GPU Rendering

    Overview and terminology:

    V-Ray provides two renderers - V-Ray and V-Ray GPU. The V-Ray GPU renderer is designed to provide you with the maximum rendering performance from your system. To do so, V-Ray GPU provides multiple engines to choose from that are native to the different types of processors:
    • just NVIDIA RTX GPUs (RTX)
    • all NVIDIA GPUs (CUDA)
    • Intel-compatible x86 CPUs (CUDA-x86).
    Which engine is best for your scene will vary as code executes differently on the three processor types. For example, using the same RTX-class GPU, a scene with heavily layered shading will most likely be fastest using the CUDA engine while a scene that has simple shading and a heavily instanced geometry will very likely be fastest using the RTX engine.

    GPUs were originally designed for just graphics, and have specific hardware and software (AKA drivers) to run graphics APIs standards such as DirectX, OpenGL, etc. While very fast, these standards do not support ray tracing and make it very difficult to run general programming. As a result, any renderer based on them is limited to what the standard supports and is the primary reason why you can easily identify a game image from a photorealistic rendering.
    In being a graphics processor, the GPU has many cores and efficiently processes parallel tasks (think of displaying all of your display pixels at once) whereas the CPU was designed for linear executions – one after another. NVIDIA’s CUDA programming language allows general processing code (similar to C) to run on the GPU, and is a perfect fit for tasks that are highly parallel. Ray tracing is often called “embarrassingly parallel” (as so many rays are being evaluated at once) and can execute quickly on GPUs with proper code such as what V-Ray GPU provides.

    Over time, CPUs have continually added more cores, making them more adept and handling parallel operations like ray tracing, and the V-Ray renderer takes full advantage of this. The V-Ray GPU renderer can also leverage CPU cores by running its CUDA engine on the CPU, in what is called CUDA-x86 mode. In also being CUDA, V-Ray GPU can run its CUDA engine on the GPU in conjunction with it running on the CPU, allowing every processor in the computer to speed rendering. The industry has nicknamed this “hybrid” or “XPU” rendering, and is also what is meant by “total system performance”. More about Hybrid rendering in V-Ray here

    In recent years, specific hardware was added to NVDIA GPUs for processing ray tracing in GPUs having “RTX” in their name. These GPUs have new “RT Cores” just for ray tracing, and require specific code to leverage them – such as with the V-Ray GPU RTX engine. This mode can be very fast if your scene matches what the RT Cores are good at. More about V-Ray GPU support for Nvidia RTX GPUs here

    V-Ray GPU explanation,

    Click image for larger version

Name:	ian-spriggs_jasper_art_vraygpu-2.jpg?1694456815.jpg
Views:	94
Size:	316.0 KB
ID:	1207568
    Photo Credit, Ian Spriggs

    ​The three rendering engines of V-Ray GPU are 100% compatible with one another, with each engine producing visually identical results to the others, enabling you to obtain flicker-free animations when network rendering across machines using different modes and hardware. With no risk or additional effort in switching V-Ray GPU rendering engines. the choice of which engine to use becomes straight forward:
    • If your machine has no NVIDIA GPU, use the CUDA-X86 engine to run on the CPUs.
    • ​If your machine has a non-RTX NVIDIA GPU, use the CUDA engine in conjunction with CUDA-X86 for total system performance.
    • ​If your machine has an RTX GPU, render a representative frame on RTX and also with CUDA & CUDA-x86 to see which is faster for your scene. You can use the Device Selector tool to select the rendering devices and to swap between the GPU engines.
    ​Note, You may not want to use all available GPU devices for rendering, especially if you have multiple GPUs and you want to leave one of them free for working on the user interface. Read more about GPU interactive rendering in this post

    Note, although the CUDA,CUDA-x86 and RTX engines share the same user interface as the standard V-Ray Renderer, V-Ray GPU differs from the regular V-Ray engine in the way it performs certain calculations. Comparing the results will never come to a one-to-one match, although it may look quite close. Furthermore, it is not the goal for them to be the same. This is why it is strongly recommended to not switch between renderers in the middle of your project. If you start setting up a scene with the V-Ray GPU renderer, the UI will only show the supported options and your scene will be optimized for GPU rendering.

    Why V-Ray GPU?


    Click image for larger version

Name:	52E12C9D-C0C3-4FFE-BAD3-4B2CD362C97B.jpg?ex=66322201&is=6630d081&hm=710da804596a91552a40919fa327a148e6927b223c96970d9e499723805965dd&=&format=webp&width=1023&height=1365.webp
Views:	90
Size:	101.7 KB
ID:	1207570

    V-Ray GPU has a number of advantages:
    • Graphics cards often outperform CPUs when it comes to compute. V-Ray GPU offers fast interactive feedback for look development and final rendering.
    • A single machine can host multiple GPU devices but in most cases a single CPU, more about Multi-GPU scaling here
    • Easy to expand or upgrade your hardware, it is as simple as swapping a GPU in your workstation.
    • If you have a powerful workstation you can take advantage of all its computing power. Nothing is left idle. CPUs with very high core counts (e.g., an AMD Threadripper) can often rival the speed of high-end GPUs.
    • V-Ray GPU has all the required features for production

    For full system requirements and recommended driver see this post

    Which Graphics card do you need for V-Ray GPU?

    If you are looking for a new graphics card you should try and aim for the best in performance along with maximizing memory to fit your projects.
    • Performance, V-Ray GPU performance scales nearly linearly across CUDA cores and core clock speed for a given GPU generation, more about generation scaling for Nvidia GPUs here
    • Memory, The entire scene being rendered (geometry, textures, buffers, etc.) must fully fit into GPU memory when using either CUDA or RTX mode. The more graphics card memory is available the more details, textures and models can be added to your scene.
    V-Ray Benchmark is a free utility to benchmark your hardware against other hardware when it comes to performance in V-Ray GPU. The Benchmark index is a reliable resource for comparing different GPUs and hardware configurations.

    Note, V-Ray GPU performance scales nearly linearly across multiple GPUs. While GPUs in a multi-GPU system can vary in their type, speed and generation, the highest efficiency is usually found when combining GPUs of the same generation and of similar performance.

    Note, When running in just CUDA-x86 mode, the system’s RAM is used(paging is supported). If your scene exceeds your GPU’s memory, you can often still render the scene using CUDA-x86 mode.

    Does V-Ray GPU support memory pooling between GPUs?

    Yes, V-Ray GPU can pool memory across pairs of GPUs that support NVLink and have a physical NVlink bridge installed. For example, two cards having 24GB each can support scenes requiring 48GB when using NVLink. NVLink support can be found on the larger GPUs previous to the Ada generation. Read more about NVLink setup here

    Best,
    Muhammed
    Attached Files
    Last edited by Muhammed_Hamed; 30-04-2024, 04:28 AM.
    Muhammed Hamed
    V-Ray GPU product specialist


    chaos.com
Working...
X