Short guide to GPU rendering with V-Ray RT.

The aim of this guide is to help with switching to rendering on GPU with V-Ray and has all the basic information needed to better understand advantages and limitations of this approach. Everything below this point is based on our experience with using V-Ray GPU (RT) as our main production renderer.

1. Why GPU for rendering?

It all started around 18 months ago when we decided to do a hardware upgrade to get better 3ds Max viewport performance. So we installed new GPUs (it was GTX970 4GB) and decided to see how things improved with rendering on GPU with V-Ray RT. We loved it!… Well, to be honest not straight away. It took time to change the mindset, but the speed boost and interactivity were there to help and sooth any pain caused by some V-Ray Adv features missing.

It wasn’t the first time I tried rendering on graphic cards. But back when GPUs had 512-1024 MB of memory it wasn’t really a production ready solution (at least for us). It changed with launch of Nvidia’s maxwell cards that came with 4GB on board, did cost fraction of their Quadro brothers and were much faster and more energy-efficient than earlier generation. This alone made it possible to render 70-80% of our scenes.


tomasz-wyszolmirski-pomengrate-previz-v4-0-00-03-18

2. Why V-Ray engine?

We’ve chosen V-Ray RT as our main rendering engine at the end, but It took us some time be convinced.  One thing that I feel is a bit unfortunate is that for a very long time I did understand it’s true potential. I thought it’s just ‘real time’ addition to V-Ray Adv. At earlier stages there were some differences in renders from RT and ADV due to many missing features, but that changed a lot over time due to fast development. I’m extremely happy that Chaos Group didn’t dismiss GPU rendering as being ‘too hard’ and pushed hard with development. And I believe that now it’s the best time to start using it in production.

Looking at V-Ray RT as a completely different engine is the key to loving it. You need to go full throttle with it. Shade, light, render previews, finals with RT. Going back and forth to CPU (Adv) is not the best idea in the same way that jumping between Corona, Octane and V-Ray in the middle of production isn’t. That said, you can still use it for lighting preview and shading, but you have to expect that some features will be missing or may work in a different way.

Currently RT is at fully production ready state and to me it has proven to be best way to create amazing renders.

00023_jet_engine_cfm56_00000

3. What kind of hardware do you need ?

At this stage I recommend CUDA devices. V-Ray supports OpenCL, but I find that CUDA GPUs offer better performance for the same money. Here is a list of the worthy ones:

Pascal (current) Generation:

  • Nvidia GTX 1070 8GB – Probably the best choice at the moment if you don’t need 12 GB of memory. (We have those for our workstations on top of 970s for viewport)
  • Nvidia GTX 1080 8GB – Slightly faster, 50% more expensive than 1070.
  • Nvidia Titan X 12GB (Pascal) – If you have money go for it or wait for GTX 1080Ti rumored to come out with 12GB on board and may be just slightly slower.

Maxwel (previous) Generation:

  • Nvidia GTX 970 4GB – Cheap, great performance, enough memory for starting out.
  • Nvidia GTX 980 4GB – A bit more expensive, great performance.
  • Nvidia GTX 980ti 6GB – Best buy for the performance / memory / price ratio in Maxwell family.
  • Nvidia Titan X 12GB (Maxwell) – Slightly faster than 980Ti, double the memory. Great for production as it can handle very big scenes.

If you wish to upgrade, don’t sell or throw away your old GPU. Keep it for using it with your monitor(s) and add another GPU device for rendering. This makes working with viewport and rendering much smoother. If you wish to build real rendering monster check out this post: Building 4xGPU rack-mount rendering node

DSC00371

4. Rendering settings.

Overall V-Ray RT has the best kind of settings, there aren’t many of them and in many cases there’s no point in changing defaults. Personally I love playing with settings (and breaking things), but as supervisor and artist I believe that they shouldn’t get in the way of creation. Defaults are the fastest in most cases so just hit render and focus on the creation. Individual subdivision settings for lights, materials don’t matter, they won’t speed up or slow rendering so don’t waste your time playing with them. Just do nice pictures !

If you’re starting out with V-Ray RT there are 3 main settings to consider:

  • Engine type: Set this to CUDA
  • Max. noise. Default is 0.005. This is your main quality setting. Higher value = more noise, faster render. Lower value = less noise, slower render. V-Ray RT supports adaptive rendering and does it great. With new sampling it will produce very consistent noise over whole image. For animation you can go as high as 0.025-0.03 and it still will look very good. If you use denoiser you could potentially go as high as 0.06-0.08 and it will hold up.
  • If you use the same GPU for monitor and rendering it will feel sluggish, the best way is to add second GPU only for rendering but if that’s not possible, you can set Rays Per Pixel to 1-2. This will force V-Ray to use GPU in less consuming way and will improve responsiveness. In SP5 of RT there is low priority mode as well, but both solutions will make rendering significantly slower.

I created small script lately that resets all the settings and sets up RT as production and active shade renderer. You can grab it here: ( https://www.dabarti.com/screens/Reset_settings_and_setup_RT.ms ). Drag and drop it to 3ds max or use it as startup script. I usually use it to reset all settings after opening some old V-Ray Adv scene.

003

5. Memory management.

With GPUs the main limitation is memory, so until we see GPUs with unlimited memory you have to be careful. But it’s not as bad as it may seem, especially with 8-12GB on board. You can render very heavy scenes if you work in a clever way.

Always use the latest version of RT as it’s constantly evolving, getting better and faster. For example newest version (currently upcoming SP5) has very good texture memory management. As opposed to older builds it can dynamically adjust the size of the texture depending on how small it is in the render.

Few things you should consider to save memory:

  • Don’t over-subdivide your geometry. If the object is quite small there is no point of subdividing it 2-3 times if once is enough.
  • Use instancing where you can. Adding another instance of the geometry is basically free.
  • Use smaller tiled textures if possible. Instead of creating 4k, 8k texture for diffuse, glossiness, bump try out mixing smaller maps together. For excavator scene we used many small maps tiled 10-20 times and mixed them together with masks for rust, dust, dirt in V-Ray Blend material. Use mix, color correction and  composite maps to reuse as much textures as you can, they work work well in V-Ray GPU.
  • Work with RT in mind. Check memory usage often to better understand how much space models / shaders / textures are taking.  You can do that with tools like GPU-Z or MSI afterburner or natively in V-Ray log or Statistics. Log will output how much memory is taken by shaders / textures, geometry and other things and newer versions of RT output also how much VRAM is left. If you will run out of memory V-Ray log will let you know
  • Knowing how to build leaner models and shaders will be useful not only in GPU rendering. The same principles apply in Adv CPU or other renderers. Learn this and ultimately you will be able to build  bigger and more detailed scenes. And with speed advantage you will be able to try out much more options and ultimately get better looking images.

 

  • 9c69b934685953.56d99b307174c

6. Shading and lighting.

Interactivity is the king! Fire up Active Shade (interactive) mode and all changes to your scene will be transferred to RT and rendered straight away. There is little to none delay and this allows quick look development as in matter of minutes you can try tens of different light or shading options. Remember: V-Ray GPU (RT) and V-Ray CPU (Adv) share a lot in common but they are different render engines. Things may look a bit different if you try to render final on CPU… So just render it on GPU and it will be faster.

Some shaders and maps don’t work on the GPU at the moment, but the number of those is getting smaller over time. When in doubt check this page: https://docs.chaosgroup.com/display/VRAY3MAX/V-Ray+RT+Supported+Features

For interactive lighting setup check out my tool called “Light Assistant”: https://dabarti.com/vfx/dabarti-light-assistant/

bee_watermarked

7. Rendering animations. 

It just work. With GPU you can get a lot more frames finished faster than on CPU. And if you go ahead and get as close to final look as possible straight from the render it will also speed up overall workflow. If there are any bugs to geometry or animation you will have more time for revisions.

Also if you plan to build render-farm it’s also cost efficient. Less space, less nodes, less licences to buy, better computing power/Watt.

Dabarti is small team, but after switching to RT we were able to output so many shots that we had to start using Shotgun and Deadline in order to keep track of it all. But this is good.

Check out some of the shots we were able to complete with it:

All images used for this post were rendered at Dabarti with V-Ray GPU (RT).

https://www.behance.net/Dabarti
https://www.instagram.com/dabarti_cgi/
https://www.facebook.com/DabartiCGI/

If there is something that you would like to know about rendering on GPU from the perspective of the artist ask in comments or through Facebook.

If you have a problem or a bug reports related to V-Ray RT, ask Chaos Group support via email or forums, they are there to help. By reporting bugs you actually help making the product better.

You might also enjoy!

Software

Dabarti Capture Released!

I’m very proud to announce that Dabarti Capture,  a new command line tool for creating normal, albedo and displacement maps from multiple photographs. Check it out https://dabarti.com/capture/

Read More »