Keep up-to-date with Free tutorials!!


Sign up to our twice-monthly newsletter today for the latest tutorials, interviews and product information.

Sign me up to receive third-party emails from 3dtotal's partners, too!

- Latest news
- Exclusive Shop Offers
- Preview early content
- Plus much more


Not Ready to take that step? OK, Why not just Subscribe to the RSS Feed

submit tutorial
DOF Tutorial Part I

| Your Rating:
rating star fullrating star fullrating star fullrating star nonerating star none
(Score 3 out of 5 after 2 Votes)
| Comments 0
Date Added: 9th December 2009
Software used:
The other day I was trying to render a scene. As a Max and Brazil rs user I know that make a render wich involves a nice AA, more than 3 light bounces, area shadows, DOF, and more that 2500x3500 px of resolution and even more than 800,000 poligons need a lot of patience and a lot of computer power, since I just got a nice new computer I inocently thought that this scene
will be a piece of cake for this computer, but I was wrong, 3 days later the render was just about the half way and I need
it for the next day at noon.

Well I just canceled the render start change some parmeters in a new test scene, then I just remembered that somewhere I read about some DOF (Z Depth) maps and start asking in the forums, but before I got an answer I start looking in Max help files and found the way to render this kind of things so here is what I learn.

First you need your scene here's a simple one you can download if you want.


Ok adjust the params as you wish, I turn the GI on 3 light bounces, 1 min and 2 max in the AA (I won't teach how to use brazil) and this is what you get.

This is a nice render which is called Beauty Render by some big companies let's call it Difuse render (wow how original
I am).

Now Aply a nice and neutral color to all objects like white or even better black, and change to the Default Scanline Render, and in the Render Elements tab chose Add...

Now that you are in there, pick Z Depth and Shadow and whaterver else that you need (I just need shadow and DOF)
You got 3 Virtual Frame Buffer one with the render itself with the shadows and color and stuff wich we don't need, another wich is the shadow (a black image with an alpha channel) and the last the Z-depth buffer, save this 2 as tiff image file and turn on the option of Store Alpha Channel.

See, this was easy and relative fast. Now go to PhotoShop CS (I'm not sure if ver. 7 has the feature we need)

Ok Now on PhotoShop open the 3 Images you just save in Max.

Working with in the Z Dept render. Select all and copy the image (ctrl+a to select all and ctrl+c to copy) make a new Alpha channel in the Difuse Render and paste it in there.

Now copy the alpha channel of the Shadow render and just as the Z Depth make a new alpha channel and paste it in there, so now what you got is a Difuse Render with 2 Alpha channels.

What we need to do now is symply, load the shadow selection, (ctrl+left click) and make a new layer and paint it with black. Give it a opacity of 30 (just hit 3 in your num pad) I use a soft light as blending mode, you can use normal or any other or even paint your shadows any color you want and make any color correction you need (usualy I just use color balance).

If you are happy with the results...well flatten your image and got to Filters>Blur>Lens Blur and there use your alpha channel 2 (Z Depth) to blur your image, use any values that you think are ok, but always have in mind the the Blur Focal distance means the gray color that your focus object is, so if yor object apears to be gray, check the values of the gray (i.e R128 G128 B128) and use it in here:

This the real thing, you can add the DOF as needed more or less depending of your needs, also adding noise if you want (I realy like noise in blured images, and the best thing here is that you can see the results in real time if you use the faster mode and then apply it in More Acurate mode).

Now the final Result in a fraction of the time that should take it render the whole thing in Brazil rs, at the end I render also the self ilumination channel to add a glow in the blue areas.

I hope this was usefull...The render times where 9:52 min for the Brazil render pass and 16.56 min for the Default Scanline Render (shadow and Z Depth) I should say that I start a new render with Brazil using the same values for AA but added DOF and area shadows and has pass more than 25 minutes and the Brazil hasn't render any bucket (64x64) so this demostrates that this way is a lot easyer and faster.

Serial Killer

Related Tutorials

Max 4 Bones and IK

by Mike Rickard
published on 2009-06-16

Keywords: rigging, bones, ik, max,

rating star fullrating star fullrating star fullrating star fullrating star full (2)
Comments 0 Views 36768

Making Of 'Desert Gas Station'

by Eugenio Garcia
published on 2012-10-24

Keywords: scene, gas, station, desert,

rating star fullrating star fullrating star fullrating star fullrating star none (14)
Comments 2 Views 90150

Making Random Grass

by Radoslav Zilinsky
published on 2009-12-09

Keywords: scene, grass, random, max,

rating star fullrating star fullrating star fullrating star fullrating star full (4)
Comments 0 Views 29371

Wired Lights - Video Tutorials

by Michael Bauer
published on 2009-12-09

Keywords: wired, lights, max,

rating star fullrating star fullrating star fullrating star fullrating star none (1)
Comments 0 Views 17447
Readers Comments (Newest on Top)
no comments!
No comments yet. Be the first to comment!
Add Your Comment..