VFX Tips #2 

NoEmotionHDRs by Peter Sanitra is licensed under a Creative Commons Attribution-NoDerivatives 4.0 International License . Based on a work at http://noemotionhdrs.net.

Quick HDRI Setup in 3ds Max with V-Ray 3.6

Still Using V-Ray 2?

Learn how to quickly setup Image Based Lighting in 3ds Max using V-Ray. This tutorial is intended for anyone looking to implement IBL into their workflow and covers setting up an HDRI environment in 3ds Max with V-Ray 3.6.

STEP 1

Open an existing scene, import a model or build something from scratch. I'm going to make this as simple as possible and just use a sphere and a plane.

 

Once you have something to work with, Assign V-Ray as your renderer by hitting F10 or go to Rendering > Render Setup. Expand the drop-down menu next to Renderer and select V-Ray.

 

In this case, I'm using V-Ray 3.6, so I'll choose V-Ray Adv 3.60.04 from the list.

Now that V-Ray is set as the renderer we can start setting up the scene.

A Note on HDR Images

 

The next thing to do is to bring in the HDR image we want to use for lighting. There are numerous websites you can download free HDRI's from. Some are good, some are shit, but you'll want to look for ones with two basic parameters - a large image resolution and a .exr or .hdr file extension.

 

If the image is in an 8-Bit format like a Jpeg - don't waste your time. The values will be clamped and it's not going to give you good results. Always try to use a true 32-bit image whenever possible.

 

I'd recommend heading over to noemotionhdrs.net to download your HDR image(s). In my opinion, they are without a doubt the best out there and they're free to boot! (You could also hit up the SIBL Archive, but they're not nearly as good and have a much smaller image resolution. But hey, wherever floats your boat.) 

 

For this tutorial, I'm using "06-07_Day_G" which can be found under the Dayhdr section on noemotionhdrs.net. This is a 32-bit image with a resolution of 15000x7500, which is massive!

Here's a preview - it's beautiful!

STEP 2

To load our HDR image into 3ds Max we'll open up the material editor by pressing M or by hitting the Material Editor icon at the top of the Max UI. 

CLICK TO ENLARGE
Quick HDR Image Based Lighting Setup in 3ds Max with V-Ray 3.6 Ben Tate Tutorial VFX Tips CG 3D Brokenverts.com

Next, scroll down the Material/Map Browser list on the left until you find VRayHDRI. Then drag & drop it onto the active view, Double-click it to access its parameters.

 

Note:

If you're using the compact material editor, hit the Get Material button, scroll down and select VRayHDRI from the list - then Double-Click it to load it into the material slot. The parameters rollout will be the same as in the slate editor.

CLICK TO ENLARGE
IBL in 3ds Max with V-Ray 3 Ben Tate Tutorial VFX Tips CG 3D Brokenverts.com

Hit the Browse button and find your HDRI, pick it and hit Open.

CLICK TO ENLARGE
IBL in 3ds Max with V-Ray 3 Ben Tate Tutorial VFX Tips CG 3D Brokenverts.com

Once the image is loaded, close the material editor.

Technique

 

There are several ways we can light our scene using an HDRI. It can be done solely through V-Ray without using the HDR through a light source. And if you've watched any of my old tutorials from back in the day, you'll know this is typically the way I setup my HDR lighting. But over the past few years, I've kind of got into the habit of piping the HDRI through a V-Ray dome light, so that's what we'll do here.

STEP 3

Let's go to the Create panel and the Lighting tab, and change the pulldown menu from Photometric to VRay. Choose a standard VRayLight and drag it out in the viewport. Don't worry about the size or location, it doesn't matter.

CLICK TO ENLARGE
V-Ray Dome Lighting in 3ds Max with V-Ray 3 Ben Tate Tutorial VFX Tips CG 3D Brokenverts.com

With the VRay Light still selected,  go to the Modifier panel and change the light Type from Plane to Dome.

 

 

 

 

 

With the Dome selected, Right-Click on the Move tool and zero out the X, Y & Z values under Absolute:World. You can do this by Right-Clicking on each spinner or by entering a value of 0 for each input. This will center the V-Ray Dome to the world.

CLICK TO ENLARGE
V-Ray Dome Lighting in 3ds Max with V-Ray 3 Ben Tate Tutorial VFX Tips CG 3D Brokenverts.com

STEP 4

Now that we have light in the scene, we'll start setting up V-Ray. Hit F10 to open the Render Setup, or go to Rendering > Render Setup to bring up the dialog. First things first, let's change the render size. By default that's going to be set to 640x480. Now since it's not the mid-nineties anymore, we'll switch to something more suitable. 

 

Let's change the Output Size pulldown to HDTV (Video) and choose 1280x720 for the time being. 

If we do a render right now by hitting F9, all we're going to see is a completely white image.

CLICK TO ENLARGE
HDRI in 3ds Max with V-Ray Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

The reason we're seeing this is because the V-Ray light dome is filling the entire frame at the moment, and it's set to white by default. So basically we're just rendering the outside of the dome. We'll fix this a little later, but first, let's add our HDRI to the scene. Open the Material Editor (M) and select the VRay Dome Light. Go to the Modifier panel and find the Texture rollout under the General tab.

 

With the material editor open, click on the Output handle of the HDR map and drag & drop it onto the No Map button (under Texture) for the Dome Light. When prompted choose Instance

 

Note:

If you're using the Compact Material Editor, just drag & drop the material preview onto the button.

CLICK TO ENLARGE
HDRI in 3ds Max with V-Ray Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Once done, set the map's Resolution to something higher. In this case, I'm just going to go with 2048. You can also close the Material Editor for now.

CLICK TO ENLARGE
V-Ray HDRI Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

The color of the VRay light is now being over-written by the HDR image - changing it will no longer have an effect. The color is now generated solely by the color range of the HDRI.

STEP 5

Back to V-Ray

 

 

Let's head back to V-Ray by hitting F10. For this tutorial, I'm going to use the same settings I typically use in V-Ray 2.5.

 

Switch to the V-Ray tab and change the Type setting from Progressive to Bucket.

 

Next, go to the GI tab and make sure the Enable GI checkbox is checked (it should be on by default.) Let's change the Primary Engine pulldown to Irradiance Map. And the Secondary Engine to Brute Force.

 

Next, expand the Irradiance Map rollout and set the Current Preset to Low and reduce the Subdivs value to 20.  Finally, make sure the Show Calc. Phase option is checked. This will help you spot problems without having to wait for the final image to start rendering.

If we do a render now (F9) you can see - although it looks like total shit, we're starting to get somewhere. 

CLICK TO ENLARGE
V-Ray IBL Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

The reason it's so blown-out is because we're not rendering from a camera (just the Perspective view.) And V-Ray is very much designed to render through a camera lens. So let's add one.

STEP 6

With V-Ray 3, the Vray Physical Camera has been removed in favor of 3ds Max's new Physical Camera - which can be used in its place. Although this new option is available, I still prefer to use V-Ray's camera. So let's do that.

 

Although the Vray Physical Cam is no longer accessible through the Create Panel. It does still exist, we just need to access it in a different way.

 

Open the MaxScript Listener window by pressing F11 or by going to Scripting > MaxScript Listener. Make sure the MAXScript option is checked and paste the following code into the window. 

 

vrayCreateVRayPhysicalCamera()

 

CLICK TO ENLARGE
VRayCam in V-Ray 3 Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Once pasted, hit Enter on your keyboard to create the camera in the scene. (You may need to click in the viewport afterward to see it.)

CLICK TO ENLARGE
VRay 3 Camera Script Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Select the newly created VRayCam by clicking on it in the viewport or by hitting H and picking it from the list. Then go to the Modifier Panel and enable the Targeted option. 

Now select the Perspective viewport by clicking in the window. Change this to the camera view by left-clicking on the Perspective text (in the upper left corner of the viewport) and going to Camera > VRayCam001. We are now looking through the camera lens.

CLICK TO ENLARGE
VRay 3 Camera Script Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Now press H and select the VRayCam001.Target from the list.

With the target selected, center it to the world by Right-Clicking on the Move tool and entering a value of for X, Y & Z under Absolute::World.

CLICK TO ENLARGE
V-Ray Rendering Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Once done, use the Orbit Camera and Dolly Camera tools ( located in the bottom right corner of the Max UI ) to rotate and zoom the Camera until you find an angle you like.

CLICK TO ENLARGE
V-Ray Rendering Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Finally, press F9 to do a test render.

CLICK TO ENLARGE
V-Ray Rendering Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

As you can see the render is no longer blown-out. It's extremely dark and looks like total garbage, but we can clearly see the HDRI and Global Illumination are working. We just need to brighten things up and tweak a few settings.

REFINEMENTS

STEP 7

Now that we have our basic HDRI setup in place, we'll start making some tweaks and refining the lighting.

 

There's one more thing we need to do to the HDR map, so let's open the Material Editor by hitting MDouble-Click on the HDRI map thumbnail to get a bigger preview. As you can see the image looks distorted.

CLICK TO ENLARGE
Quick HDR Image Based Lighting Setup in 3ds Max with V-Ray 3 Ben Tate Tutorial VFX Tips CG 3D Brokenverts.com

To fix this and correctly orient our image, we need to change the Mapping Type pulldown to Spherical (rather than the default of 3ds Max Standard.) This will correct the image distortion and correctly wrap the image around our V-Ray dome.

CLICK TO ENLARGE
V-Ray 3ds Max Standard Mapping vs Spherical Mapping Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Now if we do another render - we can clearly see we get a much better result from the HDRI map. The light is more directional and we have better color distribution from the pixels of the image. We can also see the HDRI is correctly displayed in the background. This is again due to the Spherical mapping matching better with our spherical dome light. It's still very dark, but we'll fix that in a minute.

CLICK TO ENLARGE
V-Ray HDRI Multiplier Comparision Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max
CLICK TO ENLARGE
V-Ray HDRI Multiplier Comparision Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

LIGHT IT UP

STEP 8

To further improve the render, let's first increase the amount of light the HDRI is contributing to the scene. We can do this two main ways - Either increase the dome light's multiplier or increase the brightness of the HDRI map itself. Typically I do most of my main adjustments via the map, rather than through the light. So let's do that.

 

Open the Material Editor again (M) and Double-Click on the HDRI to access the parameters if they're not visible. Under the Processing rollout, you'll see two values - an Overall Mult: and a Render Mult: - both will be set to a value of 1.0 by default.

 

These two values can be used to directly control the overall brightness of the loaded HDR image. The Overall Mult: value will affect both rendering and the image preview in the Material Editor. While the Render Mult: value will only affect the image at render time.

 

Let's start by cranking the Overall Mult: amount to 3.0. You'll immediately see the HDRI's preview get brighter.

CLICK TO ENLARGE
HDRI Directional Lighting V-Ray IBL Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Now hit F9 to do a test render and you'll notice the brightness has increased.

CLICK TO ENLARGE
V-Ray HDRI Multiplier Comparision Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Let's take it a little further and increase the Overall Mult: amount to 5.0 and do another render (F9).

CLICK TO ENLARGE
V-Ray Overall Mult Example Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

With an amount of 5.0 for the multiplier, our render is essentially 5x as bright as it originally was. Let's leave it a value of 5.0 for now and move onto making some other adjustments.

DIRECTION

As you can see in the renders above, we're getting somewhat of a directional shadow cast from the sphere. This is directly caused by both the sun's position and intensity in our HDRI. Although the sun itself is fairly small in this particular image, it's still by far the brightest part. And because of this - it's acting almost like a direct light in our scene, giving us that directional shadow. We also have a large amount of clear sky, which is why the render has a predominantly blue tint to it.

 

It the sun was larger and more intense (as with other HDRIs) - the shadow would be much more apparent. This will very much depend on the HDR image you're using.

 

This is the main reason you'll want to use a 32-bit image for lighting. If we were using an 8-bit image instead, the hot spot's values would be clamped to a max of 255 for the RGB. Which is simply not bright enough to give us a good, or even decent result when rendering.

STEP 9

Let's change the direction of the light in our scene. Again, there are numerous ways to do this. Simply rotate your camera to another angle being the simplest. Or you could always rotate the VRay Dome manually. But there's an easier way.

Let's open the Material Editor again (M) and Double-Click the HDRI. Under the Mapping rollout, you'll notice two fields - Horiz. Rotation & Vert. Rotation. Much like the Overall Multiplier, we looked at earlier, these two settings control the orientation of the HDRI.

 

Enter a value of 90.0 for Horiz. Rotation and hit F9 to render.

CLICK TO ENLARGE
HDRI Directional Lighting V-Ray IBL Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

As we can see below, the light direction has changed and the shadow has now moved 90 degrees clockwise around the sphere.

CLICK TO ENLARGE
GI Rendering with V-Ray Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Let's bring it around a little more by entering a value of 120.0 for the Horiz. Rotation, and increase the Render Mult. amount to 6.0 to increase the brightness.

 

Let's also get rid of the image in the background. Select the VRayLight and go to the Modifier panel. Expand the Options rollout and check the Invisible box. This will hide the light from the camera in the render, but not affect our ability to see its illumination or reflection in the scene.

CLICK TO ENLARGE
V-Ray Overall Mult Example Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Hit F9 to do another render.

CLICK TO ENLARGE
V-Ray Overall Mult Example Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

We'll leave it like this for now and move onto making some final tweaks. I'd recommend spending some time playing around with the HDRI settings to see what you get - Try changing the Vert. Rotation value (which will rotate the image vertically), or checking the Flip Horizontally & Flip Vertically boxes to see what happens. And of course, you can also experiment more with the brightness.

STEP 10

Let's create a couple of new materials for the scene, so open the Material Editor (M) and scroll down the Material/Map Browser until you find VRayMtl.  Drag & Drop two copies into the active view - Double-Click on the first one to show its parameters.

CLICK TO ENLARGE
V-Ray Material Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

We'll leave the first material at the defaults and just change the color slightly. Click the Color Swatch next to Diffuse and set the color to something like 100 for the RGB. This will give us a slightly darker material - which we'll use on the plane.

CLICK TO ENLARGE
V-Ray Material Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Next, select the Plane (or ground object if you're using something else) by clicking it in the viewport, or by pressing H and picking it from the list. Then Right-Click on the material in the editor and choose Assign Material to Selection.

CLICK TO ENLARGE
3ds Max Slate Editor V-Ray Material Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com

For the second material, we'll do something reflective. Double-Click on the second material in the Material Editor. Then Double-Click on the thumbnail to get a larger preview. Finally turn on the Material Background by Right-Clicking at the top and choosing Show Background In Preview. This will allow us to see reflections in the preview.

CLICK TO ENLARGE
3ds Max Slate Editor V-Ray Material Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com

Change the Diffuse Color to 15 for the RGB, and set the Reflect color to an almost pure white - let's do 230 for this one. This will give us a highly reflective material - almost a chrome. Also, uncheck the Fresnel option under the Reflect rollout.

CLICK TO ENLARGE
V-Ray Chrome Material Setup Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Next, select the Sphere by clicking on it in the viewport, or by pressing H and picking it from the list. Then Right-Click on the material and choose Assign Material to Selection. Finally hit F9 and do a test render.

CLICK TO ENLARGE
V-Ray Environment Lighting Reflections Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

As you can see the Sphere has basically a mirror-like reflection. You can clearly see the HDRI's refection, as well as the ground plane's. If you see a dark reflection through the center of the Sphere, it's a reflection of the 3ds Max environment - which is set to black by default. This will happen if the V-Ray dome light is set to a half-dome, rather than a full-dome.

 

 

To fix this, re-select the VRayDome Light and go to the Modifier panel and scroll down to the Dome Light rollout. Make sure the box is checked for Spherical (full dome) and hit F9 to re-render. Any environment reflection should now be blocked by the Dome Light/HDRI's reflection.

CLICK TO ENLARGE
V-Ray Environment Lighting Reflections Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max
CLICK TO ENLARGE
V-Ray Environment Lighting Reflections Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

The final thing we'll do for this tutorial is look at cleaning up the render to get rid of the noise. In previous versions of V-Ray, this would typically involve increasing the sampling amount for the lights, as well as most materials - especially reflective materials, such as chrome.

 

In V-Ray 3 this isn't usually necessary, as removing noise is much easier using just a few overall settings.

STEP 11

Let's open up V-Ray by hitting F10. The first thing we'll do is increase the quality of the Irradiance Map. Go to the GI tab and expand the Irradiance Map rollout, change the Current Preset pulldown from Low to Medium. Next, increase the Subdivs amount from 20 to 90.

If we do another render (F9). You can see the difference is not even noticeable - the change to Medium did little to affect the render. The reason for this is because with the scene geometry being so simple - an Irradiance Map setting of Low provided enough bounces to calculate the GI for our scene. If we had a more detailed model, the difference would have been more apparent between a Low and Medium setting.

We'll leave it at Medium anyway, as the additional pre-pass and subdivs only added 1.3 seconds to the render time @ 1280x720 on my machine.

CLICK TO ENLARGE
3ds Max V-Ray 3 Noise Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Let's switch over to the V-Ray tab and expand the Bucket Image Sampler rollout. The next thing we'll do is reduce the Noise Threshold setting by half - from the default of 0.01 to 0.005. In most cases, this is the main setting you'll want to adjust when trying to remove noise from a render.

Hit F9 to do another render.

CLICK TO ENLARGE
How to Remove Noise in V-Ray Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

OK, so a value of 0.005 gave us a significant reduction in overall noise. We still have some in there - but it's minor. And depending on what you're doing, it may be fine to leave it like this. 

 

However, if we really want a high quality, noise-free render. We're going to need to increase the samples further. Let's head back to the V-Ray tab and the Bucket Image Sampler rollout. Here we'll increase the Max Subdivs value. Now there's no reason to go crazy with this setting if a minor increase will work. So let's just double the value from 24 to 48 and do another render.

CLICK TO ENLARGE
How to Remove Noise in V-Ray Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

At this point, the noise is virtually gone. But if you still see some, try increasing the Max Subdivs value again to say 64 or 96, and drop the Noise Threshold to 0.003 - which is an ultra high setting, but it should remove any remaining noise. 

 

Also keep in mind that if you choose to add additional lights to the scene, the amount of noise will likely be reduced - as the new light's rays will help even out sampling. So it's best to finalize your lighting setup before dialing in your final 'High-Quality' render settings.

CLICK TO ENLARGE
V-Ray Sampling Subdivs Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max
CLICK TO ENLARGE
V-Ray Chrome Ball Tutorial Ben Tate VFX Tips CG 3D Brokenverts.com 3ds Max

Your render should now be virtually noise free with nice crisp reflections. Of course, this was just a very basic look at setting up an HDRI in 3ds Max. And like I mentioned at the beginning, there are many different ways to do this. This is just my own personal workflow that I've worked out over the many years I've been using Max and V-Ray.

This setup should work for any HDR image. Just be aware that if you do change to another image, you might need to either increase or decrease the HDRI multiplier values in the material editor, depending on that image's brightness.

OVERALL MULT: 6.0
OVERALL MULT: 3.0
OVERALL MULT: 5.0

FINAL THOUGHTS

For the most part, this tutorial is just a decent starting point. You'll want to continue to refine and fine-tune your scene/render further by adding additional lights. One thing to keep in mind is. As you add new lights, things will of course, get brighter. And you'll no doubt start to lose some of the directional shadows from the HDRI. You'll need to compensate for this, and each new light by adjusting the HDRI's brightness values to get what you want.

 

Again, keep in mind, changing the HDR image will completely change the look of the render (not just the reflections you see.) As I mentioned earlier, both the color and brightness values are coming directly from the image. Meaning each pixel of the HDRI is contributing not only it's color, but it's brightness value to the scene. Changing it to another image will completely replace this information, yielding a vastly different look - As you can see in the three examples above.

 

So yeah, I guess that's it. Thanks for checking out this mini tutorial. I hope you found it useful and learned something new in the process. Keep an eye out for new tips, as I plan to do more of these in the future. 

 

Cheers!

Ben

SHARE THIS TUTORIAL

MASTERING UV MAPPING IN 3DS MAX

NEW 32-HOUR COURSE
AVAILABLE NOW!