Quick DOF tip
This tutorial is mostly directed towards 3D Studio MAX users, but any 3D program should do it.
Most 3D artists have tried playing with GI (Global Illumination) and DOF (Depth Of Field) in their images. These tricks have been explored more widely with the inclusion of these in plugin-renderers such as Mental Ray, Vray and Brazil. common for all of these are that they are time-consuming. Re-creating realistic DOF and GI will impose a serious load on your CPU, and halt your work-flow. Global illumination adds the extra quality to your image, and DOF adds the little extra touch that can make a picture a whole lot more convincing.
I have a small trick though, that will make your life a whole lot easier.
Image generated with the Depth Of Field (DOF) trick (less than a minute)
In this tutorial I will go through the basics of a quick way of creating a DOF effect. Well, easy and quick once you get the hang of it. Remember, the emphasis doest not lie on creating a realistic DOF, but only to do show a quick way to create a production-ready method for fast scenes or the adding the little subtle detail that gives your scenes that million-dollar-look.
A close-up of the before-and-after Global Illumination generated in Photoshop.
My tools will be 3D Studio MAX 4 and Adobe Photoshop 5.5, but any 3D program and image-manipulation software will do. The trickery lies in the ability of the 3D software’s renderer to generate a depth-pass. There are ways to bypass a renderers lack of this ability, for instance by creating a material, which diffuse map is a gradient from white to black, based on the distance to the camera. If you have to do that, then this trick is beginning not to be worth the effort.
On with the trick.
Create a sample scene for you to work with. The most work in this tutorial lies in Photoshop, not the 3D program.
This is the unmapped model I started with. A lot of work is necessary, as you can see :-)
As I mentioned earlier, the model was found on www.turbosquid.com
Textured, and ready to go.
The leather is a simple standard material with a brown texture applied, a bit of noise in the bump slot, and then I played a bit around with the Specular Level and Glossiness.
The metal is also a standard material witha Metal shader with Specular at about 188 and Glossiness at 57. In the reflection slot I put a Swirl map with the two colors turned to grey values. Remember to set the reflection map to spherical environment, or the metal reflection will look kindda funny.
Step 2
Render out the different parts out we need for our next step, in Photoshop.
Remember to save alle of these images with their alpha-mask. You never know when you might need them. So, use .tga or .tiff formats. Dont attempt to use .jpg’s. They will not take up as much harddisk space, but you will reduce the quality too much.
| Diffuse pass | Standard rendering. It is up to you, but I recommend rendering it with out shadow casting lights. It is not necessary for creating this trick, but it does give you more freedom. |
| Z-depth pass | This little trick is where the key to our quick DOF lies. What we want is a depth map based on the environment’s distance to our camera. How we do it (in 3D Studio MAX is as follows): In the rendering settings (F10) go down to Render Elements. |
| Shadow pass | A seperate pass with alle the shadows in the scene. It is a lot easier if you keep the different elements seperated for as long as possible in any process. Tweaking and fine-tuning can be achieved much easier in a program that is made for it, such as an compositing program, or Photoshop for stills. |
| Sliced pass | This is a normal rendering (with an alpha-mask) of the bottom part of the model. This pass is used to create the fake GI later on in the compositing. |
Step 3 (Depth Of Field)
Time to open up Photoshop.
Start off with the actual rendering. Create a copy of the background-layer and apply a gaussian blur to it. Try to compare your scene to something real if you cant decide on how much blur to add.
Remember, we are trying to make a subtle effect, we dont want to overdo it, so people will focus on the strange blurring.
|
You now have a seperate layer with a DOF-effect, which you can fine-tune by changing the opacity of the layer.If you want to change the depth of field, you can tweak the layer mask, by marking it with your mouse, and then press CTRL-L, which opens up Photoshop’s Levels-dialogue.
1 comment:
Such a nice article! Will visit again.
Post a Comment