Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
The mental ray Portal Light shader is a special shader that you can apply on lights to help improve the quality, decrease the render time when rendering effects like light coming through windows into a room, hence the name Portal Light. So in this scene here, I have my basic room set up and to keep things simple I have applied to a Lambert shader to the windows to make the windows opaque. So these windows won't allow any light coming through there. So we can just focus on the effect of the light coming through these skylights here.
I'm going to create a Physical Sun and Sky network to simulate sunlight coming in through this skylight here. So what I will do is I will go to the Render Settings window, and in the Indirect Lighting tab, I'm going to click on the Create Physical Sun and Sky button. This is going to automatically turn on Final Gathering. So I can close this window now. I will select my sunDirection node and use the Move tool just to position it in the scene, so I can see it a little bit better.
I am going to scale it up just so we can see the light. Now remember that the position of light is not going to affect how that the light looks when it comes through the window. It's just the rotation of the light. So I am just going to rotate it so that the sun is hitting the fireplace just a little bit as it comes through this window. So let's create a quick test render and see how this looks. I am rendering from the renderCam camera. So to solve these problems I am going to add the Portal Light shader into the scene.
The way I am going to do this is I'm going to create an area light. I am gong to click on the Area Light button here in the Rendering tab, and I'm going to pull it up so I can see it in the scene here, scale it up so it's a bit larger. And what I want to do is I want to position this just inside the skylight, just beneath it. So let me switch to my Perspective view so I could see this a bit better, and scale this up a little bit.
It doesn't have to be absolutely perfect, just enough to cover the area of the skylight. I will switch back to the renderCam camera.
I don't need to change very many settings on the area light itself. This is what we are going to apply the Portal Light shader to, but there is one very important thing that I need to set right away, and that is in the Area Light section. So I am in the areaLightShape1 tab of the Area Light here in the Attribute Editor, and I need to turn on Use Light Shape. Now that's on. That's very important. I don't have to turn on shadows or anything else. In fact, you will notice that both Depth Map Shadows and Raytrace Shadows are turned off.
But I do need to turn on Use Light Shape. This has to be done before you apply the Portal Light shader. So now that I have done that, I'm going to go down to the Custom Shaders section of the areaLightShape1 tab, and I am going to click on this checker box, and I am going to go to MentalRay Lights and click on portal_light, and this immediately goes to the portal_light1 tab. So the other thing you need to do is I am going to switch back to areaLight1, back to the Custom Shaders section, because I want this portal light to be connected to the light shader and the photon emitter.
So I am going to just Ctrl+C, copy this, and Ctrl+V, paste, hit Enter. There we go. Now it's connected to both of these sections. So I will switch over to Enable Sky Portal, so shadows and so forth are controlled here in these settings. So I am now going to go to the Render Settings and under Indirect Lighting, I am actually going to turn Final Gathering off, just to demonstrate. So I am going to turn that off and then open the Render view, save this render, and let's create another render to see how it looks.
So a few other things that the Portal Light shader is taking care of is it's actually adding some of this blue light here into the environment. So it's creating some of this indirect lighting for us, and that's going to help a lot when we turn on Final Gathering to help the efficiency of the render. So I am going to save this, and compare this with what we had before. It already looks pretty nice. It didn't take very long to render. So I am going to save this and minimize this.
I am going to go back to the Render Settings and activate Final Gathering and do another render and see how this improves the look. Adding the Portal Light shader did increase our render time without necessarily adding final gather points, but it also did increase the quality of the render somewhat. So we can see how blotchy this one looks and also how dim and dark.
Now that we've added the Portal Light shader, the scene is brighter. We get a boost to the ambient blue light bouncing around the room as well some of the amber light of sunlight here on the walls. We've still got some blotchiness, but it's much less significant than it was here in our initial render, and I haven't had to increase Final Gather points at all to just get this kind of improvement. So from here, there are a few things I can do to continue to improve the look of this render.
I can start to increase the Final Gather points, and I can also add Global Illumination to combine that. When we start to combine these techniques together, then we start to approach higher-quality renders. So it's really a matter of balancing these techniques to get the most out of your renders. If we take a look at some of the settings here, we have an Intensity Multiplier. So if I increase this, the effect of the Portal Light is going to get more and more intense. So I can use settings like the Intensity Multiplier and the Color Multiplier to start to adjust the overall intensity of the Portal Light effect.
If it was still too dim in this room, I can start to turn this up, and that will increase the intensity and make it look a bit brighter. So the point of the Portal Light shader, just to recap, is to boost any kind of indirect lighting that you have coming through windows, like these skylights here. If you are using the Physical Sun and Sky Shader, and you need to boost the light in order to smooth out Final Gathering points or Global Illumination points, you can use the Portal Light shader applied to an area light that is placed just inside the window in order to smooth out the effect, without having to necessarily increase the accuracy of the Final Gather to ridiculous levels.
One other thing to remember when using this shader is that the Portal Light shader should be applied to both the Light Shader and the Photon Emitter sections in the Custom Shaders sections of the Shape tab. It has to be applied to both of those.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.