HDRI Lighting

HDRI Lighting

HDRI Lighting

In this tutorial we are going to take a look at a method of creating some photorealistic effects using HDRI images.

You will need to download an HDRI image, they are all over the internet both as stock photos paid and free. You can download the one I am going to use here if you like:

animation.diclementi.com/kitchen2.hdr

In your top viewport, draw a plane which will serve as our ground plane. I made mine 500x500, and in the Scale field I have made it 100. This will make our plane stretch out practically forever in our renders, but keeps it smaller in our viewport.

groundplane jpg

Then create a teapot in the middle of our ground also in the top viewport. I made it rather large with a radius of 40 and 12 segments. Since the purpose is HDRI lighting and reflections, the teapot will serve as our test object.

teapot jpg

Now open up your material editor (M).

I added one of our default grey materials to the ground plane, it is only there to catch a shadow or two anyhow. In another empty materials slot, we will make the material for our teapot.

Assign one of the default grey spheres to your plane, just to give it a flat color. The settings don't much matter for it.

For our teapot however, give it whatever color you'd like in the diffuse color swatch, and adjust your specular level and glossiness numbers so that you get a nice shiny surface.

I have chosen Specular Level: 140

and Glossiness: 60

Then, go down and open up your Maps rollout in this material.

reflection1 jpg

Reduce the Amount of Reflection to about 20, and then click the Reflection Channel box (None Button)

Choose Raytrace from the list, so that our reflection will reflect the entire environment/scene in 3DS.

Once you have added the raytrace, simply click on the go to parent button to return to the top menu of our texture settings.

Go To Parent. Once you are back out of it, you can assign this material to your teapot.

teapot textured jpg

If we do a render right now, with the default lights only and our textures we see something like this.

render1 jpg

Our teapot is nice and shiny, and clearly reflecting the grey ground plane, and the default black of the background. We have no true reflections yet or shadows.

On your create tab, go to your lights and select Standard from the dropdown menu.

Click on the Skylight button, and then click anywhere in your top viewport to create a skylight, which is a nice ambient light source.

skylight jpg

Try another render to see what adding an ambient light source does for us.

We now have some soft ambient shadows inside our teapot near the lid, as well as beneath our teapot on the ground plane, the reflections and light are still flat colors

On the modify tab, we can adjust the settings for our skylight.

Instead of the default sky color which defaults at white, we are going to want the light to utilize the scene environment, which will be our HDRI image.

So instead of casting a soft white ambient light over everything, it will utilize the colors and lights and darks of the image itself to cast light. Replicating a real world light environment, where color and shadows and highlights bounce all around and light up the environment.

If you were to try and render now the skylight would be using the default black color of our scene environment, which means you won't see anything at all, as black means no light.

So in order to correct this, lets open up our Environment and Effects dialogue. (8)

In the Environment Common Parameters, click on the Channel Box (None Button)

Choose Bitmap from the menu, and navigate to wherever you saved the HDRI image you downloaded at the very beginning of the tutorial.

Select it and hit ok, a new dialogue box should appear with your HDRI Load Settings:

We are going to adjust the Log. numbers for the White Point and Black Point. By getting these close to the peak of our exposure curve, we can get a nice contrast of lights and darks in the image preview window.

Normally getting the white and black point lines close to the highest peak in the exposure chart has a good result. We just don't want the image to be too dark, or too bright as this image will end up being our ambient light source as well as the source of our reflections for any surface in our scene that has a raytrace.

Once you are happy with the exposure of the preview image, hit OK.

Then Open your material editor again (M) and click and drag the image from the environment map, over to an empty slot on in your Material Editor. Like this:

This is so we can adjust the image settings for the best result . If we tried to do a render as is without changing anything in the image settings, we would get more of a projection of the image instead of an overall ambient diffused lighting.

Not quite the photorealistic lighting we were hoping for eh?

So, in the image you just dragged over to the material editor, we want to change the Environment texture type to Spherical instead of Screen.

This will wrap the image all the way around 360 degrees of our environment, spreading out those colors shadows and highlights instead of projecting them all into the screen where you render.

It will also straighten the room out to look normal and natural, instead of warped.

Make sure it is set to Environ, and not Texture. And change the Mapping: dropdown to read Spherical Environment.

Then we can try another render.

The results here should be rather staggering. Even with minimal work in our render and indirect illumination settings HDRI changes everything. The color and intensity of the light source, the bleed of color onto the surfaces of our ground plane, etc.

The light is enriched by all the different lights and darks and colors from our HDRI image, not to mention the reflections in our ray traced teapot are now super realistic! Even the flat grey plane now shows all the colors that bled over from the image, so it is a richer color itself.

With a few of our basic changes in the Indirect illumination and Antialiasing settings we can get some more subtle changes as well.

In the Render Setup (F10) we can go to the Indirect Illumination tab and smooth out our final gather settings to make the light function even better.

If you are doing this tutorial you should probably already be familiar with these settings, so I won't go into a lot of detail here.

On your Render tab we can adjust the antialiasing for an even smooth result.

Same should go for the antialiasing settings. You can bump up the min and max numbers just a little to smooth over any pixelated edges, and I prefer the Mitchell Filter type to the default Box filter.

Adding things like an extra direct light source to your scene, and perhaps caustics for the reflective teapot and you can really kick this image up a notch but all that is another tutorial and you should be familiar with these things already as well.

Hope you learned something! now get to work! ;) I'll leave you with a comparison of the first through last images:

Render 1 -

Render 2 -

Render 3 -

Render 4 -

Final Render -

Much more realistic!