From the course: 3ds Max 2021 Essential Training

Separating environment from background - 3ds Max Tutorial

From the course: 3ds Max 2021 Essential Training

Start my 1-month free trial

Separating environment from background

- [Instructor] An environment map, generally provides scene lighting as well as a rendered backdrop or background. If we want to split the lighting from the background, we can use an OSL Node for that, called the Environment Background Switcher. Here's a version in which both of lighting and the background are coming from the same map. Let's make a clone of that rendered frame window for comparison later and just minimize that. Open up the material editor and here's the shading network we have so far. We've got an HDRI environment node. If we double click that and we will see its parameters, we've got a Blackbody Node to color correct it and we've got a Multiply Node to combine those two and the Multiply Node is the environment map currently. Now let's create a Switcher Node, right click in the view and choose maps, OSL, environment, Environment Background Switcher and double click on that and rename it we'll call it BG slash ENV switch and then wire up the connections. We can navigate in the view here with the middle mouse button. We'll take the output of this ENV balanced Multiply Node, connected to the environment input on the Switcher Node and we can duplicate some of our shading network here. Let's select ENV Kelvin, hold down control and select ENV balanced. Now we selected the black body and the Multiply Nodes and we can clone those, hold down the shift key and click and drag to duplicate them and we can see that we've preserved those connections. Click off of those to deselect them all. Let's rename them. Double click on the new Blackbody Node and rename it BG Kelvin. Double click on the new Multiply node and call it BG balanced and connect that to the background input on the Switcher Node. Okay, so now we've got a single file and two Blackbody Nodes. We're multiplying that file by each one of those Blackbody Nodes, one for the background and one for the environment. Now we need to assign this Switcher Node as our environment. Go to the rendering menu and choose environment to assign a map in some other panel, we'll want to click on the output of that map and hold the mouse button and we'll get a wire and drag over in this case to the environment map slot and release the mouse. We get the instance dialogue, we do want this to be an instance, so any changes we make in the material editor will apply to the environment. Choose instance and click okay that assignment's been made and it may take a moment for it to update, because the OSL network has to compile. We can close the environment and effects dialogue and we didn't see any change because these new nodes are duplicates of the old ones, so let's make some changes. First of all, let's check in on the color of our environment. Double click on the ENV Kelvin node and I've got a pretty blue color here with 9500 degrees Kelvin. We want to art direct the color of the background separately of the color of the lighting, so double click on the BG Kelvin Blackbody Node, and let's change its minimum and maximum Kelvin values to 5500 we need to make that quite a lot more orange and having done that and we can see that it's pretty dim as well, we can increase the intensity, click and drag on that spinner and bring that up and we're brightening up the background while not affecting the lighting. Let's set the intensity to evaluative six. Okay, I'll close the material editor and bring up my previously rendered image on the left. The lighting and background are both coming from the same map and on the right we've split them, using the OSL Background Environment Switcher so that we could color correct the background separately from the lighting and in this image, we've only changed the background relative to the other image. The lighting in the scene is actually identical between these two. That's how to use the OSL Environment Background Switcher.

Contents