Rendering Tutorials Archive

Linear workflow (LWF) the easy way

Even after a few years since linear workflow (also known as gamma 2.2 method) first “appeared”, there still is quite a lot of confusion around the subject.

This is caused by the fact that there are several methods to achieve the same result and several tutorials on the internet most of them explaining different workarounds.

In this tutorial I will try to show all the steps that I use for linear workflow (working with 3ds max and vray) and keep things as simple as possible.

Bellow there are 2 images; the first one is rendered without linear workflow while the other one is rendered using this method. Although the second one looks much more natural, due to the even illumination and without color bleed, both of the scenes have exactly the same number of lights with the same light multipliers.

Click on the image to view a higher resolution rendering

Step 1
Go to “Customize”, “Preferences” and click the “gamma and lut” tab.
Check “Enable gamma /lut correction”, type 2.2 in the field next to “Gamma”.
Under “Materials and Colors” check both “Affect Color Selectors” and “Affect Material Editor”.

Step 2
In the material editor, select one of the materials and click on the texture in the diffuse channel. In the Bitmap Parameters rollout, click on the path of the bitmap and in the pop up window, under “Gamma” check override and type 2.2


If you haven’t started the scene from scratch and you are using an older scene, you must repeat the step above for all the textures that you have used.
This is what most people forget to do and as a result they end up with washed out textures.

Step 3
Believe it or not, you are now ready to render :)
The only thing that you need to do when the rendering process is ready, is to save the file as an .exr format (you need a 32 bit image, not an 8 image).
If you need to convert it to a jpg, open the exr file in photoshop, click on “image”, “mode” and choose 8bits/channel.

Just out of curiosity, you can try to save the image as a jpg directly from the render. You will end up with a dark rendering. This is because the gamma is not burnt in the image, but with the settings shown in the previous steps, you have set 3ds max to display it correctly.

If for some reason you need to burn the gamma into the image, you need to activate the Vray frame buffer, and under the color mapping options change the gamma from 1 to 2.2
I really don’t recommend doing this tough, because of the loss of quality.

The advantages of working with gamma 2.2 are obvious… less lights are needed to setup a lighting rig for an interior scene, less color bleed, faster rendering times, etc.
I use this for almost every daylight interior scenes; for interiors with night illumination I tend not use it since I find it easier to get more “drama” in the renderings, the old fashion way.

How to make the walls and ceiling whiter in 3d renderings

This short tutorial has been written for 3ds max and vray users, but most probably you can easily “translate” the workflow in your favorite 3d software programs.

Everybody knows that when using indirect illumination (GI), the color of the materials in a scene affects other objects as well, due to the light that “borrows” color information from a surface after having “bounced” from it.
Although it is normal and happens in real life as well, sometimes the bounced light is affecting the scene too much and it doesn’t look right.
The most common situations when this happens is when you have a wooden floor and the color ceiling and the walls becomes too red/orange (like in the example bellow).

If you use “linear workflow” that is less likely to happen, but if the deadline is knocking on your door, you need a quick way to adjust it and not lose time trying to find ways to do it directly from the render ( and completely change your workflow).

Here is a quick solution that can prove useful in situations when time is a major factor:
Make the material of the wall and ceiling a vraymtl wrapper, keeping the base material as it was.
Under “alpha contribution” type “-1”, hit render and save the resulting rendering as a tiff with alpha channel.

Open the rendering in photoshop, click on “select”, choose “load selection” and choose “alpha 1”. Now invert the selection, and you will end up with the selection of the walls and ceiling (which are the elements that are affected too much by the light bounced from the wooden floor).

With the selection active, use the hue/saturation slider from “image”, “adjustments” drop down menu until you obtain a desirable result. You can also use brightness and contrasts or level adjustments if you feel necessary.

Bellow is the result I achieved following the steps shown above.

Although this tutorial is aimed particularly at de-saturating colors on some elements of the scene, the same method can be applied in order to color correction adjustments on any particular materials you need, by making separate alpha channels for those specific materials and adjust the color and saturation from photoshop.

How to add depth of field using a zdepth pass

Brief introduction
Depth of field can prove to be a very effective way to add a “special” touch to an architectural rendering, or simply to focus the composition on a specific element.

Technically speaking, there are several possibilities to add dof to an image.
One way to do this is to add it from the vray camera rollout (if you are using vray), but keep in mind that the rendering times can go through the roof, so unless you have a render farm you may not want to consider this option.

Another way to achieve this type of effect is by adding it from the “effects” tab in 3d max. Even if this is way faster (being just a post-processing effect) I always feel the need to have more control over it regardless of the camera position or direction.

Rendering a separate zdepth pass
So here’s the way I do it.
Under “Render Elements” click “add” and choose “vrayZdepth” (if you not with vray you can chose Zdepth instead of vray z depth, or the equivalent of your rendering software).

After hitting “render” you will notice that you end up with 2 rendered images, the main image and another one in gray scale. If you look closer at the gray scale rendering you realize that objects that are close to the camera are light gray, and they get darker as the distance between them and the camera increases.


Post processing the zdepth pass
Open both renderings in photoshop.
Select the main rendering and duplicate the “background” layer. With the newly created layer active, click on “layer” drop down menu (at the top, between “select” and “image”), click “layer mask” and select “reveal all”.

Select the grayscale rendering and invert it (image>adjustments>invert). Now using the “rectangular marquee tool” drag a selection over the entire image than press “ctrl+c” in order to copy it to the clipboard.

Select the first image again and click the “channels” tab. Activate the previously created mask (under RGB, red, green and blue channels) and press “ctrl+v” in order to copy the zdepth mask.

Click the “layers” tab and select “background copy” layer to make sure you have the layer itself activated (and not the mask).

Go to “filters” and apply a lens blur filter.
As you will notice, thanks to the zdepth mask, the lens blur is affecting more the objects that are further away, and has less effect to the ones closer to the camera.

The big advantage of using this method is that you can control the depth of field anyway you want, simply by editing (painting) the zdepth rendered pass.
Here are 2 examples that show the flexibility of this method.
Click the renderings to view higher res ones:

Camera match tutorial

Photomontage renderings, if done right, can be a lot more appealing and realistic than standard architectural renderings.
The reason why this happens is that a real environment with dust, dirt, scratches and imperfections, by definition looks better than a computer generated one.

Furthermore, creating the entire scene in 3d can prove to be very time consuming, and if you are working in the architectural visualization business you know that deadlines are usually very tight and you can not afford to lose more time working on the environment than on the building.

Having said this, let’s start with the tutorial. Usually photomontages are used for exterior renderings, but in order to keep this tutorial as simple as it can be, I have chosen an interior environment.

Taking the photo
The most important thing when taking a photo that you will later use for camera match is to take as many accurate measurements as possible (you will need at least 5 reference points). Take a look at the photo below (click on it to view a higher resolution image)

As you can see, the dimensions are noted on all 3 axis (horizontal, longitudinal and vertical).

The next step is to bring the photo into 3ds max. Click on “views”, “viewport background”, or just click “alt+b” (shortcut for 3ds max 9).
Under background source, chose the image you need and select “match bitmap” under aspect ratio.

Tick “display background” and select “active only” (with the perspective viewport active).
Click the image to view a higher resolution one

Now it’s time to model some basic geometry that we will later match with the photo.
Make sure that under “units setup” in the preferences drop down menu the units are set to the same ones noted when you made the measurements (in this case, centimeters).

You don’t need to model anything fancy… just a set of planes with the same dimensions as some elements in your scene. You need a 90.5×45 cm plane for the table top, a 20×20.2 plane for the vase and another plane placed at a distance of 4.6 centimeters behind the table top for the wall.

At this point it’s time to match the points of our geometry with the ones from the photo.
With the perspective viewport activated go to “create”, “helpers”, “camera match”, “cam point”. With the snap toggle on, start creating cam points at the corners of the table top plane, and at the top corners of the plane for the vase.
Click the image to view a higher resolution one

Go to the “utilities tab” and click “camera match”. You will see the list with all the cam points you have created in the previous step.

Select cam point 01, and click “assign position”. Now click the top left corner of the table top on the background image. By doing this you will tell the software that the cam point 01 needs to be placed at the position you have indicated.
Repeat this step for all the cam points.
Click the image to view a higher resolution one

After having done this, click on “create camera”. If everything has been done correctly, this step will automatically generate a camera that matches the view of the photo.
If you place a 3d model on the 90.5×45 plane in your scene, it will appear to be on the table top when rendered.
Click the image to view a higher resolution one

General camera match advices
As I said at the beginning of the tutorial, camera match can help you create a photorealistic rendering in a shorter amount of time. However, it has a downside too; unlike a standard 3d rendering, you can not change the angle later, so it is better to take several photos of the environment and explain to the client that he needs to decide upon a view and he can not change his mind later.

Taking dimensions for an exterior photomontage can proof to be more difficult than in the example shown in this tutorial. Therefore it is good idea to have objects with standard dimensions in your photos (like lighting posts, traffic signs, etc.)

Bellow are 2 examples of photomontage renderings that I have done using this techniques (click on the images to view high resolution renderings).