Welcome to part 2 of the HDRI tutorial. In this half, my goal is to show you how to easily use hdri image that you just made (assuming you just completed part 1 of the hdri tut) in a 3d scene using 3dsmax, the Splutterfish HDRI loading plugin (for older versions of Max) and Brazil/Rio.

Things you will need for this tutorial:

3dsmax (obviously). version 4 or 5 should be fine, but you will need to download the HDRI loader below. Max 6, 7 or 8 should already have an HDRI loader shipping with it, so you should be all set.

(For Max 3/4/5 users):HDRI loading plugin from Splutterfish. This will allow max to load and view .hdr files (as max only natively deals with floating point tiffs i believe). Also adds some other features such as adjusting the black and white points upon import of the .hdr.

Brazil Rio This is the free version of Brazil. It is fully functional renderer with the exception of being resolution locked at 512x384 and being unable to network render.

A refresher from part 1:

Basically what hdri does is not only contain color information for each pixel, but also contains the intensity for that pixel. This allows one to use the hdr image for lighting (because all the light intensity from the original environment is contained within the hdri) like so:

it is also possible to use the hdri for correct reflections (so that bright spots won't be clamped on objects that aren't very reflective and so that bright areas will be blown out on very reflective objects). this is shown in the below image of 3 spheres, one with a black, slightly reflective material, one with a slightly more reflective material, and one with a chrome very-reflective material.

Okay, now on with the show :)

1) install the hdri plugin (if needed) and Brazil Rio as per the readme's that come with them (basicaly just dump their files in the plugins folder in Max's dir, I believe).

2) Next, fire up Max and make yourself a nice simple little scene, maybe some teapots on a plane, a sphere or two, perhaps a nice torus knot. Now whip up some materials with varying reflective and diffuse properties, or you can download my max file, since the building of the scene isn't important. :) although note that you will need to provide your own hdri file, which you should have from part 1 of this tut. If for some reason you don't have an hdri to use here, check out my HDR section, as there are some ready-to-use HDR maps there. My Max File

3) Now before we forget, open up the render dialog, expand the 'current renderers' panel and hit the 'assign' button next to the production renderer slot. Select 'Brazil Rio' from the list (if it wasn't already set from opening my file) Leave the other two renderers the same. My image says 'Brazil Test V0.4.53' because this is an old tut ;)

4) Now if u give my max file a render you should get something like this:

Boring default lighting and the objects are only reflecting each other and the black background.

5) Let's start with hdri reflections, as they are easier to see with no lights on. First under the Rendering menu, choose 'Environment' to bring up the environment dialog box.

6) Click on the big button that says 'none' under the Background section and choose 'bitmap' from the dialog that pops up.

7) Navigate to your saved .HDR file (probably have to set file type to 'any' to see it), select the file and hit open, this should kick the hdri import plugin from splutterfish into action and bring up the hdri load dialog box. If for some reason no dialog box opens, repeat step 6 and then hit the setup button before hitting okay when u browse for your hdri.

8) Now before hitting okay on the load settings dialog, you'll want to adjust the white point to suit your image. This is basically telling max where you want to clamp the hdri to white. This can be usefull if u have some very bright spots on your image, which are making everything else come in too dark. A general rule of thumb is to set the white point high and then bring it down until there is just a little bit of pink on the preview image (the pink indicates areas that are being clamped down to the maximum luminance value).

9) Now hit okay on that dialog and then drag the map from the slot in the environment panel to an empty slot in the material editor and choose 'instance' from the box that pops up.

10) Now there is a few things to take care of before we have beautiful reflections. First off, our hdri is currentlt set to be screen mapped, but its a panorama, so it should really wrap all the way around our scene, so in the material editor, under the 'coordinates' rollout, be sure 'environment' is checked and select 'spherical environment' from the dropdown list nest to it.

10 and a half) Just a little speed tip here. since we won't actually see the hdri map directly like we would a texture on an onbject, we can disable the bitmap filtering, which will speed things up a bit :) so under the bitmap parameters rollout, just change the filtering from 'pyramidal' to 'none' and that should speed thigs up later when rendering. the only time you might not want to do this is if you have a very low resolution hdri map, as then u might see the pixelation in the reflections.

11) Now the mapping should be correct, but the image is probably way too dark, so lets turn it up a bit. Scroll down a bit in the material editor to the 'Output' rollout and turn the 'RGB Level' up a bit. I find that settings between 6-15 generally work well for me. Since my hdri is fairly dark, i'm using 15 here.

12) If you give the scene a render now, you should see some reflections on things. If you havn't used Brazil before, then you need to know that in order to get any anti-aliasing on objects, you'll have to turn the image samples up (i suggest 0 min and 2 max). This can be found under the Brazil: Image Sampling rollout in the render dialog.

13) Now, for a better look at the reflections (since we are still using default lighting) you should turn off the default lighting. This will also allow us to see the hdri lighting here in a few minutes, since we won't be using any regular lights. In the render dialog, scroll down to the 'Brazil: Luma Server' rollout and simply uncheck the 'allow default lights' checkbox. If you render now it should look like the image above on the right.

14) Okay, now to light our scene with hdri-based lighting. First off, open the render dialog up (if you closed it since last step) and scroll down to the luma server. Check the box next to skylight under the Direct Illumination section. This is telling Brazil that you want the skylight to be a light source. If you render right now, everything will be lit by a diffuse blue light. Since we want the light to be based on our hdri map, drag the hdri that we used in the environment from the material editor over to the slot in the skylight section of the luma server, being sure to choose instance from the box that pops up:

15) Now give it a render again (will probably be fairly slow to render) and you will see that the object are now illuminated by light from our hdri map :) the default lighting samples are fairly low, resulting in an image that is pretty course, so lets turn up the samples a bit for a nice final image. Under the Global Illumination section of the Luma Rollout in the render dialog, change the View Rate from its default of 15 to something higher, like 30. Also set the Secondary Rate a bit higher to 15, this is the sampling used for objects reflected or refracted (should get rid of the grain in the glass and in reflections). Give this another render (it will be slow).

TADA! HDRI lighting and reflections :) Hopefully this will help you on your way to increased realism in your work. You should also go back and change settings here and there along the way to see how they change things. Like change the RGB level and see how reflections and lighting are both affected. Just play around and learn :)

If you are curious about how i set anything up, you can download my finished max file here:

My Max File Finished

here's what i did with my HDRI:

questions or comments on this or any other tutorial? just send me an e-mail!



All images, elements and content are property of nathan fariss and/or real media digital production. all rights reserved.