From the course: 3ds Max 2019: Advanced Lighting

Image-based lighting with an environment map - 3ds Max Tutorial

From the course: 3ds Max 2019: Advanced Lighting

Start my 1-month free trial

Image-based lighting with an environment map

- [Instructor] In this chapter, we'll explore environmental lighting with Bitmaps or image based lighting. We'll use high dynamic range images to provide scene illumination and sometimes a renderable backdrop. Let's start with image based lighting in ART because it is simple and has very few options. Let's open up the environment and effects dialogue with the 8 key on the keyboard. Anything we drop into the environment slot here will illuminate the scene in ART. Also whatever's in the environment slot will render as the scene background in ART. Let's take a look, we've got ART set up in ActiveShade already, so click on ActiveShade on the mail toolbar, here's the ART render of the 3DS Max sun and sky environment and we do have an image in the background here but it is transparent to alpha so if we turn on the alpha channel here we can see that it's black meaning that in the transparency here we could substitute some other background in compositing. But I do want to warn you, I want you to beware of math fringe around the border pixels here. Because we cannot turn off the backdrop in ART these edge pixels here are anti-alised with the background color here instead of black and as a result in compositing you may have some issues here and if I zoom in very close you can sort of see how these pixels here are blending with the background. Alright I'll zoom back out with the mouse wheel. Let's make a copy of this, clone that rendered frame window out so we've got something to compare later. Let's open up the material editor, click on material editor on the main toolbar and we've got our physical sun and sky environment here. Let's replace what's in the environment map so let's create a new node, right click, and choose Maps, General, and for ART we want to choose Bitmap and we're taken to our current project, scene assets, images and we've got a couple here. Env_sky and env_sky_sun. Let's choose env_sky_sun because that's got more strong direct illumination, and it's of the type EXR and it's a high resolution, high dynamic range panorama of some clouds in a sky. Click the Open button, and we get another window popping up open EXR configuration, and we don't need to change anything here, we just want to click through, click OK. Now we created that Bitmap node, let's rename it. Double click it and rename it to clouds, in that Bitmap node's parameters under coordinates choose Environ, and the mapping type should be spherical environment, and assign that to the environment map. Click on the output, drag over to the environment and effects window and drop onto the environment map. In the pop-up that comes up choose Instance and click OK, and our ActiveShade and our view port both update, and we can see that it's kind of dim. Now we could actually increase the brightness here in the parameters for the Bitmap node, under output if we increase the output amount to 20 for example, now we're getting our image based lighting, it's at the correct intensity for our exposure which is currently at an EV of 12.5 in the environment and effects dialogue. Well we don't see the brightened background in the view port here and if we want to do that we just need to supply another node in our network. Set the Bitmap output amount back down to one, and let's create a color map node. Right click and choose Maps, General, Color Map. Double click it and rename it gain. We want to connect the output of the Bitmap to the input of the Color Map. We can expand these by double clicking on their little icons, and we can see what color transform is being performed. In that node let's change the options, turn off Reversed Gamma, and set Gamma to one and now we're just passing the Bitmap values through without altering them. Now we can turn the gain up, let's set the gain to 20 and finally we need to assign this gain node to be the current environment map. Click on the output of the Color Map node and drag over to the environment map slot in the environment and effects dialogue and once again choose Instance and click OK and now we've got a gain control that affects both the view port and the ActiveShade rendering. If we want to play with this, we can go back to our map coordinates, double click on the Bitmap node and we can adjust the V offset here and that's going to shift our clouds up and down. Set the V back to zero, or more usefully we can change the U offset, and if we turn it to a value of let's say .25, we'll have the sun coming from another direction in the sky. Let's try .75, and now we've got strong direct illumination with very little shadows because the sun in this image based lighting solution is now behind the camera. We could try to color correct the environment map so that we could match the previous rendering as you can see they're quite different. But unfortunately we're only able to shift the whole image toward one color, and because the lighting is baked into an image we can't do things like control the direct sunlight and the ambient sky light separately. ART has no method for rendering direct exterior daylight except for the 3DS Max physical sun and sky environment map. Unfortunately 3DS Max photometric lights can't reproduce sunlight correctly and ART doesn't support the standard direct light. Since the 3DS Max physical sun and sky doesn't have a background image feature like the old Mental Ray did this leaves us with very few options for controlling image based lighting in ART. However, none of those limitations exist in Arnold so let's move on to environment mapping in Arnold.

Contents