If you are familiar with editing in Photoshop, you might already know how important masks are. It provides you the ability to control what you want to have visible in your layer.
If you are for example making a product render, you might want to be able to select or edit specific parts of your product render separate from the background. To be able to do this easily and accurately, creating a custom mask in Keyshot is the perfect tool for the job.
Let’s consider the following render of a drone:
Now I would like to be able to edit the background of this render separately. To be able to do that, I would require a black and white image of the drone. Which I can then apply as a mask to the render in Photoshop. You can find out how to create such an image in Keyshot in the video below, or continue reading below:
1. Apply a random material
In the Keyshot scene with the drone model and the background objects (in this case a ground plane), I apply a random material from the library to the drone model, and a different random material to the background object. Simply by selecting the objects in the scene hierarchy and dragging the material from the library onto the selected objects in the scene hierarchy.
I end up with the following in Keyshot, because I choose to randomly assign a green and a blue plastic material from the library:
Assign a material to the background and assign a different material to the model
2. Change the materials to a Flat type
Now I double click on the background material, so the material becomes the active material in the material tab. In the type drop down menu of the material I choose the Flat material type. This material type has the property that it will display color information, but it does not catch any kind of lighting effects like shadows and reflections.
Change the materials to a Flat material type
3. Change the object color to black, and the background color to white
I can change the color property in the properties of the Flat material. In this case I will change the color to black for the model material.
Model Flat material color changed to Black
Now I will do the same things for the background material. I select the material by double clicking it in the viewport and changing the material type to Flat. But in this case I change the material color to white. I will end up with the following image, where the drone is now perfectly black, and the background perfectly white:
Black and white mask image from Keyshot
4. Render image as a jpeg with the basic image style.
The black and white image above, is the mask image that I will be rendering. But just as a warning, be sure that you do not change the image styles in Keyshot. Just use the default Basic image style. Other image style settings might change the white background color to not be perfectly white anymore. So just be aware of that. For the rest you can just render this image out in a basic jpeg format.
Basic image style settings
The comparison below shows what happens if you were to render the mask out with a Photographic Low Contrast image style:
5. Apply the rendered mask as an image to the Photoshop mask.
I would like to decrease the exposure of the background. To do that I will take the following steps:
1. I will load the rendered mask into Photoshop and copy it into the file with the drone render. This can be done by copy and pasting the rendered mask into a new layer. Or dragging the layer from the rendered mask file to the drone render file, while holding shift to position it perfectly in place.
2. I will create an exposure adjustment layer, and create a mask for this layer:
3. While having the created mask selected, I then go to Image>Apply image…
4. The Apply image window will show up. In there, I select in the Layer drop down menu the rendered mask I dragged into the drone render file. This will apply the rendered mask to the selected mask of the layer:
If I now change the settings for the exposure adjustment layer, it will only effect the background of the image. And just for effect, I will group this exposure adjustment layer, and apply a mask to this group with a white to black gradient from left to right:
In this way the darkening of the background will only happen on the left side of the image, where the key light is shining from onto the model. In this way it will increase the contrast between the white drone and the background, and make the model pop more from the background as follows:
The exposure change is only affecting the background, and not the drone model in the render. And that is how you can create and use a custom mask using Keyshot and Photoshop.