- [George] Hi, I'm George Maestri, and today we're going to take a look at how to create environmental lighting in Arnold using Ai Skydome and Ai Sky. Now, Arnold is a little unique in that it actually uses two different modules or functions to create environmental lighting. One actually casts the light, and the other creates the background image that renders. Now, what you have to do is you have to make sure that those sync up, and I'm going to show you a good workflow for doing that.
So the first thing I'm going to do is just take my scene and do an IPR render of this viewport. And as you can see, there's really nothing there, and I have no lights in the scene. And so we're going to create the light in the scene using an image file. So we're going to do image-based lighting. So I'm going to go ahead and close IPR, and let's go ahead and create that using Ai Skydome. So I want to be in my Rendering menu set. I'm going over to Arnold, Lights, Skydome Light.
Okay, so this is an Ai Skydome Light. And this should bring you into the Attribute Editor, and we should have all the controls here for the light. We have the Color of the light, the Intensity, Resolution of the bitmap, so if we use a bitmap for the Color channel, which we will, we can change that here, and then a couple of other controls here. The most important one is Exposure and Samples. Now, Samples is the quality of the light. I'm actually going to bring this up from one to two, and then I'm going to leave everything else the same.
Now, what we're going to do is we're going to input something into this Color channel. So I'm just going to go ahead and click on this little checker box here and select File. And then the file that we're going to use is called Skylight_HDR.hdr. So it's an HDR file, which means it has a 32-bit depth as opposed to 16 or eight-bit for other files, and this'll give me a better gradation of lighting. And then this file itself has three main lights in the scene, and then the walls of this room are colored.
So I'm going to go ahead and open that up. And when I do, notice how that background kind of pops into view. So now that we have this, we can just do another render. So I'm going to do another IPR here. Now, the image that we created is a little overexposed. So the first thing I want to do is just go ahead and change the Exposure of the lighting so that way we can get a better quality image. So I'm going to just go ahead and close down IPR and make sure I have my Ai Skydome selected.
Now, if you can't select it, you always can go into the Outliner, and it does show up as an object. Now, the Skydome is an object. So if we want to, we could hop out to another viewport here. And if I zoom out, you could see that basically what it is is just a sphere that surrounds the world and projects the light from the bitmap. So all I have to do is select that sphere, either in the Outliner or in the viewport, and I should be able to get to the Skydome controls.
So the problem that we have here is that we have too much Exposure, so we need to turn down the lights. Now, we could do that in one of two places. We could do it in Intensity, but I'm not going to do it in Intensity, I'm actually going to do it in Exposure. Intensity is basically a linear control, so it's kind of the fine tuning control of the light. Exposure changes things geometrically according to the square. So each increment of Exposure is two times as big as the previous one.
So I'm going to dial down my Exposure to negative two. And then I'm going to do another render, and hopefully our lighting should be good. So the Exposure of the lighting is much better, and I think we can stick with this. But if you notice, the lighting is not really where you want it. You want those main lights to be in front of the scene. So as you can see, we've got, the light is kind of coming from the back of the scene.
So if you look at the image that we have, this file, you can see it here, you can see that we've got the lights are around the gray wall and then the green and the blue wall are kind of on the other side of the light. And basically what we're reflecting here is that green and blue wall. And if we close this down, you can see that that line between the red and the gray wall are here, so the lights are really up behind us to the left. So what I want to do is basically rotate this around so that the lights are in front.
Now, we can do that in one of two ways, and probably the easiest way and the most intuitive way is to basically hop out to another view. So I'm going to go ahead and select my Skydome and then go down into the Color channel. And when we do, we should have file1 and then place2dTexture1. So what we're going to do is we're just going to change the placement of the texture. So we can basically translate this frame around U and V.
So the first number here is U, and that's basically around the equator, which is what we want. The other one is basically up and down or your lines of latitude. So I'm going to go ahead and just type in a number here. I'm going to type in .5, and what that will do is it'll go ahead and rotate it a half of a unit. Notice what happens, it kind of flips around. And if we look at the file here, you notice how this light is on the other side. So what we've done is we've basically just shifted this over a half of an image.
And now we've got the blue and the green wall behind the sphere, and then we've got the red and the gray wall in front of it. So hopefully, the lighting itself will also be in front of it. So let's do another IPR and see what happens. So I'm going to go ahead and select IPR. Now our image is different. We now have the lights in front of the scene, and you can see that in the specular reflections.
And you also can see a little bit of that red wall. So now we've got the lights in the right place. Now, as you can see, this is what we had before, and this is what we have now. So basically, we moved the lights around basically 180 degrees by shifting the image. Now all we need to do is add in the background. So I'm going to go ahead and add in what's called an Ai Sky. Now, we do that through the Render Settings window. So I'm going to go into Render Settings.
Go over to the Arnold tab and under Environment, Background, this is where we select Sky Shader. So I'm going to go ahead and do a Create Sky Shader, and what this does is it creates an Ai Sky. And in the Color channel, we can add in another bitmap. Now, your first instinct is just to add in that same file, and that's what I'm going to do. But when we do that, what happens is is that this file has not been rotated.
So if we were to do a render, let's go ahead and do one more IPR, so what we have here is we have a disconnect. So as you can see, the lighting's kind of all messed up here. And also, in our image, in our Skydome, we have the green and the blue wall behind here, but now we have, in the background, the red and the gray wall. So my new image has not been rotated. So we're going to go ahead and fix that. So we can do that by going into the Hypershade.
So we're going to do a little bit of node work here. So first thing I want to do is go ahead and under Textures, you'll see we have two textures here, file1 and file2. File1 was the first one that we put in there. And as you can see, they're basically mirror images of each other, or they're basically rotated versions of each other. And this is the second one that I put in. But what I really want to do is just use one image for both.
So first thing I'm going to do is select file1, right-click over it and do Graph Network. Now what you see here is that this basically plugs into the Skydome. And here's the image, and here's the texture of that image. So this is a texture mapping with a .5 rotation. This is the image itself, and then that's plugged into the Color channel of the Skydome light. So what we need to do is take that and connect it into the Ai Sky.
So I'm going to go over to my Materials tab, go under Ai Sky, middle-click and drag, and what that does is it brings that in. And so under Ai Sky here, in the Color channel, I'm going to go ahead and take the Out Color of this one, which is plugged into the Skydome, and then plug that into the Color of Ai Sky. So now Ai Sky and the Skydome have the same texture.
So, if I do another render, you'll see that this render has the image in the right place, but it seems a little bit overexposed. And that's because Ai Sky is also contributing to things such as reflections, and we don't want that. So I'm going to go ahead and go into my Hypershade, select Ai Sky. And then here in the Render Stats, I'm going to turn off Casts Shadows, going to keep Primary Visibility on, that's what makes it the background image, but we're also going to turn off Diffuse and Glossy.
So all we want is Primary Visibility on. And then all we have to do is one more render, and it should come up. And here's the render. So as you can see, we've got our Exposure and our background are now correct. Now, if we wanted to change this, the way that we've set it up makes it much easier. So if I were to, say, select my Skydome, I can go over to my file here and change my place2dTexture, and it will change it for both.
So if I want to fine tune the placement of this texture, I can do it here, and it will affect both of them. And that way you have a proper environment.
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.