For most of my rendering work, I use 3ds max 8 and V-Ray 1.5. Although Mental Ray, Brazil, and finalRender all support rendering with HDRIs, I have found V-Ray to be the most intuitive and manageable. However, I will be writing tutorials in the future regarding the use of HDRIs with all the major rendering engines.
So let's get started. First, create or import the model that you would like to render. In our case we went to www.turbosquid.com
and downloaded a free model of an F-5E Tiger II (a model from the www.meshfactory.com
collection - a great resource). The next thing we need to do is create an invisible ground plane onto which our object's shadows can be cast, and from which our object can receive additional reflected light. The "VRayPlane" is the perfect primitive for this job. It will stretch to infinity when rendered, while only taking up a small amount of space in the viewport.
Under the Create tab's Geometry section, choose VRay from the drop-down list. Select the Object Type called VRayPlane. Click near the origin in your viewport and you will see a small square plane with a vertical arrow at its center. This visible object actually represents a plane that extends in all directions to infinity. The plane resizes as you zoom in and out of the view, and always appears to be the same size. Right-click on the VRay Plane and select V-Ray Properties. In order to make this primitive work for us, we will need to change a few settings:
I occasionally reduce the Generate GI setting if the VRayPlane is reflecting too much light on the underside of my model. Do this if you need to, and then close the dialog. Although this object is invisible in your renderings, it will still reflect light. For this reason, it is a good idea to assign a material to the VRayPlane that is similar in color and reflectivity to the ground above which your model "appears" to sit in relation to its environment map or background plate. In our case we used a dull grey to imitate the carrier flight deck.
Next, we need to go to the Render Scene dialog and make sure that the VRay renderer is selected under the Assign Renderer rollout. Then, under the Renderer tab in the Global Switches section, turn off "Default Lights". Then, change the GI settings as follows:
For test renders, you will want to set your Irrandiance Map preset to Medium and HSph. subdivs: to 20. The key here is to make sure that you have turned on your GI. Otherwise, the HDRI will not be able to contribute light.
Now that the scene is prepared and the basic lighting parameters are set, we will finally start to work the the HDR image. The first thing we need to do is assign our HDRI to the GI Environment and Reflection/Refraction Environment Override slots:
Turn on both the GI Environment override, and the Reflection/refraction Environment override. Click on None in the map slot for the GI Environment and select VRayHDRI as the map type. Drag an instance of this map to the Reflection/refraction map slot beneath it. Now, in order for us to be able to manipulate this map, we will need an instance of it in the Material Editor. Drag from one of these two map slots to an empty material slot in the material editor. Click on the Browse button for your new map, and navigate to the HDR image that you would like to use. Now you will see a thumbnail of your HDRI map, as well as a number of new parameters to work with.
The first thing you will need to do if using the Rectilinear/Spherical style HDRI map employed by HDR Mill is to select the Spherical environment map type. The next item to address is the Gamma setting. Depending on the method of image capture, some images will look fine at the default 1.0 gamma setting, while others will look dark and oversaturated. If your image appears incorrect, then its gamma has not been pre-adjusted for viewing on monitors. The setting of 2.2 is the typical correction used for viewing these images in monitor color space.
Now, if you do a quick test render you will see that your model is nicely lit, but that the background is still your default Max environment color. We could simply drag an instance of the HDR image from the material editor into the Environment Map slot of the Environment dialog. However, in order for the background map to look decent, you would need to use a very large hdr image. This would consume a large amount of your computer's resources, and slow down the rendering process. Instead, we can use a larger low dynamic range (ldr) image such as a .jpeg to fill this slot. This ldr image will usually be a tonemapped version of the hdr image, but with higher resolution.
Go to your Rendering > Environment dialog and click on "None" in the map slot. Choose Bitmap map type and navigate to the regular image that matches the scene in your hdr image. Then, drag an instance of this map from the Environment map slot to another empty material slot in your Material Editor (select "instance" when prompted). In this new material's Coordinates rollout, make sure and select Environ mapping, and Spherical Environment type.
Now, if you are using an hdr and ldr of the same scene, you would expect the two respective thumbnails to match. They do not, so go into the Parameters rollout for your VRayHDRI map and enter a horizontal rotation of 90 degrees. This rotation amount works nine times out of ten, however, if it does not, you may have to experiment a little.
If you do another render, you will see that the lighting on your model very closely matches the lighting of your background environment. You may find that your model appears to be unnaturally placed, such as having a car sitting in a treetop. You will need to rotate, pan, and tilt your camera around your model to get a good match between your background map and your model. The easiest way to do this is to go to the Views menu and select Viewport Background.
Using the settings above, the background of your perspective viewport will show the ldr environment map. In this way, you will be able to see your models relationship to the background in real time, and adjust camera position accordingly.
One issue with hdri lighting is that when using a background scene taken in full sun, the hdr lighting appears to be too dim. This is caused by the fact that the sun is up to seventeen stops brighter than the rest of the sky. It is extremely difficult to capture an hdri with such a broad range of light. Another issue is that hdr images do not cast hard shadows. Fortunately, there is a simple solution to both of these issues, if you don't mind cheating a little. The use of a direct light with a low multiplier and hard VRay shadows, positioned to match the sun in the hdr image, will solve both issues with little effect on the realism of the output. The hdr will still provide most of the direct light and all of the reflected color from the image, and the direct light will provide the hard shadows and the extra direct light for added realism. In addition, you can use the Multiplier in the VRayHDRI maps rollout to increase the level of light added by your hdr map to the scene. I hope this is helpful. If you have any usage tips that you think would add value to this tutorial, please email them to firstname.lastname@example.org.
If you would like to add this tutorial to your website, please give us proper credit and a link to www.hdrmill.com. Thank you.
The Staff at HDR Mill.