In this beginner’s tutorial we’re going to create a bokeh effect in 3ds Max. The term bokeh is familiar from photography. When depth of field is shallow, part of the photo is blurred. Bokeh refers to that blur or the quality of it. There are a few different methods of creating shallow depth of field in 3ds Max, but this time we concentrate on the ‘Depth of Field / Bokeh’ camera shader which is a new feature in 3ds Max 2011. The Bokeh shader gives us nice tools to control the quality and the look of the out of focus areas.
We’re going to render the bokeh effect with Mental Ray. By default 3ds Max uses the Scanline renderer so we have to change that. Change the renderer to Mental Ray ().
We’re going to create a simple 3d scene and finally add the bokeh effect to it. If you are just interested about the bokeh effect itself, go ahead and skip to step 13.
We’re going to create a simple scene with some text in it but first we create a background. Create a Plane ( ) in the front viewport . Modify the Plane ( ) according to the following parameters:

Open Material Editor ( ) and create the material for the plane:

Create a Text shape ( ) in the front viewport . Modify the text ( ) according to the following parameters:
Feel free to select different font or write something different. I chose Century Gothic because those round shapes are good at catching highlights.

At this point the text is just a shape and can’t even be seen in renderings. Let’s turn it to a 3d surface. Add Bevel modifier to the text ( ). Apply the following parameters ( ) to the Bevel modifier:

Open Material Editor ( ) and create the material for the text:

Let’s prepare the scene for rendering:

Now is a good time to render the scene for the first time so hit render ( ) and you should see something like the picture below.

This is our first render so obviously there are some problems:
Let’s adjust the sampling settings to get a more polished render. Go to the render setup and increase antialiasing quality by increasing Mental Ray’s sampling values ( ):
Now the aliasing issues are fixed and it’s time to illuminate the text. By the way, if rendering time is an issue you could use the default sampling values for now and use these high quality settings only in the final rendering.
Create Mental Ray area omni ( ) in the front viewport and apply the following parameters to it ( ):
Place the omni light according to the picture below.

When you render the scene you should get something like the picture below. Move the light if necessary.

The illumination is improved but the text is too dark and therefore merges with the background. Let’s address these issues with soft shadows and glare. Modify the omni light ( ) to get softer shadows:
Apply Glare Camera Shader ( ) Just turn the output shader on, the glare shader should be selected by default. Open Material Editor ( ) and drag and drop the Glare shader from Camera Shaders to an empty material slot in Material Editor ( make sure to select ‘instance’ when asked ). Make the following adjustments to the Glare shader:
Render the scene the see the effect of these changes. Now shadows are softer and the text is brighter and has a nice glow.

At the moment our scene is really flat so there is no point in adding a bokeh effect just yet. First we’ll create something that will be out of focus in the final rendering. Let’s add some sparkles to the scene. Create a super spray ( ) in the top viewport and apply ( ) the following parameters to it:
Next we’re going to create a spline and force the particles to travel along it. Create the spline:
( )

Create a path follow object ( ), go to the modify panel, and apply the following parameters to it:
Bind the super spray to the path follow object:
Particles should immediately follow the path like in the picture below.

Tip. If you’d like the particles to stray away from the spline, try increasing the particle speed in super spray and/or adjusting Particle Motion settings in the path follow object.
Open Material Editor ( ) and create the material for the sparkles:

Render the scene the see the particles. The glow is really strong but wait till you see it with the Bokeh effect.

Apply ‘Depth of Field / Bokeh’ Camera Shader ( ). Open Material Editor ( ) and drag and drop the bokeh shader from Camera Shaders to an empty material slot in Material Editor ( make sure to select ‘instance’ when asked ). Make the following adjustments to the Bokeh shader:

Now we’re ready to render the final image with the bokeh effect. I made some adjustments in Photoshop as well:

Let’s continue in the discussion. Patience with the rendering!
In 3d modeling polygon is a plane which has three or more corners. A polygon has a vertex in each corner and is surrounded by edges. Animated high quality 3D characters are often made mostly of four-sided polygons. Polygons with 5 or more sides can cause problems in deforming surfaces such as a human face.
Fantastic effect, thanks for the share.
Hi,
great tutorial. I can not choose the the Depth of Field / Bokeh efect. It is not in my list. I use Max 2010
Hi!
Unfortunately the Bokeh shader can be found only in 3ds Max 2011.
The Bokeh shader in Max 2010 is hidden from the user interface, however it can be easily made available to you. Located in the file:
C:\Program Files\Autodesk\3ds Max 2010\mentalray\shaders_standard\include
is the file architectural_max.mi which includes the lines:
gui “gui_mia_lens_bokeh” {
control “Global” ”Global” (
“uiName” ”Arch: DOF / Bokeh”,
“hidden”
Simply put a # before the line that says “hidden”, save the file, open Max and you will now have the Bokeh lens shader available.
Thanks for the brilliant tip Joe!
Great ! Works beautifully
Cheers !
thank you very much! works perfect!
Wow! Works great. I assume this applies to all of the other effects marked “hidden” in this folder?
- Spencer
Great!
Awesome find. Thanks a lot!
Awesome tutorial… Looking forward to more like this. Holla
Great! You Guys Improving the site with the best tutorials!
For the samples a good value for testing is 2 or 4, for the final render more than 32 is overkill…
Thanks for the tip! I made a change to the tutorial. 256 samples might be insane but it produces nice noise free bokeh. I can still see difference between 128 and 256 samples.
Good job, It made me try it out
Where is the Area Light Parameters ?
When you place your Mr Area Omni Light and you press the modify button (normally on the right on youre screen, the 7th tab is the Area Light Parameter. So you got General Parameters, than Intensity/color/attenuation, than Advanced effects, and when you keep getting down you find the parameters where you search for…
but i have a question to
)
because i’m stuck over there…when you now press render, do you get the smooth vision and clearder words than before? because on my render there isn’t changed something…
good luck!
In the second rendering in step 9, you should get brighter glowing text (because of the glare shader) and softer shadows because the ‘Radius’ value in Area Light Parameters have been increased.
Hi,
I’m a bit stuck on step 9 :s when I instance copy the glare to the material editor en put quality on 4 and spread on 6 and render than i dont see a clearder picture or some blurrie words… i’m using 3D Studio Max 2010…
thanx a lot!
greetz
mathias
thanks for your step by step tutorial..
it’s very useful for beginer..
by. SY Design
helo..host..
is it depth of field/bokeh effect take long time to render??
how long u get to finish render?
High samples value in Bokeh shader means long rendering time. I rendered my scene in about 7 hours because I used 256 samples. You could try for example with 32 samples to keep the rendering time reasonable.
Thank you for sharing this great tutorial, very useful
Thank you Mathias.
super spray does not follow the line
Please tell the more detailed with this.
Thank you.
Postscript Sorry if English is not good
Translation from google.
I am no good at English
I had the same problem, be sure that you bind the super spray with the path follow…you do this like Polygonblog explaned
you click on bind button allmost in the left corner of your screen, click on superspray and don’t let your mouse button go, and move to path follow… (you will see striped lines)because when you entered your path follow and connect with your line on the modify panel like written in this tutorial, the super spray should folow the line…try a few times, it was oslo new for me but it works for sure
good luck!
Great effect bro. Btw, is this thing can be animated? If this couldn’t, then how? Thanks.
Can wait for next awesome tutorials…
This lens shader is also hidden in Max 2008. The same procedure Joe detailed for Max 2010 can be made to turn it on in the 2008 version. I’ve used it once in a simple scene, worked fine.
Thanks for the tip Leandro!
thanx a lot.
Mathias
hye..really great tutorial but i stuck in how to apply the super spray..i cant make it appeare..(picture above the step 12)really need ur help..hee im a newbie by the way…thx alot! =]
owh..u already answer in above..
sory for my poor english..=[
Thank you for sharing this great step by step tutorial, very useful, mental ray is really good.
wo0o0ow, thanks for brining up this useful tutorial. You did a great job. I will check ur blog often so keep it up
I’m kind of stuck… My particles just show up small and with poor glare… I checked all values and it still with no “life”… Everything else is OK, it’s following the path and everything… Some help, please?
When i drag the line over the square thing, it says “cannot bind: Would create dependency loop”
Like 2 people above, im also lost. Al though they might have figured it out, but i haven’t.
Please help :’(
Also, you might want to have videos of it too
Make sure you bind the super spray to the path follow object.
Great tutorial
thanks for the great tutorial
I just had a little problem with the tutorial, it was time to render it took too long and could not finish more than otherwise excellent tutorial blog polygon always recommend to my friends
Excellent Tutorial. The only issues I had were self induced and quickly corrects to get the awesome effects once I re-read the section. lol… Particle Quantity, use TOTAL: 1000
Thanks for such useful stuff.
July 3,
I’ve finally found this. Great tutorials!
Why I can’t set my samples to 256? The max here is 128.
I have no idea. In my system the max is 1024. Perhaps a different version of 3ds Max or a memory related problem…
Hi,
great tutorial. I can not choose the the Depth of Field / Bokeh efect. It is not in my list. I use Max 2009
can i use Bokeh effect
Thanks a tons… Its a lovely effect!!!
Hi
Great Tutorials! Its a lovely effect!!!! Thanks!
Thanks! very very good tutorial! easy as heck to follow, and i got a nice result from it! thanks!
Awesome, keep on rockin’
Awesome tutorial. I’m just having a problem with the rendering. When I try to render I get an error, “Missing Map Files – bokeh.tif”. I’d really appreciate it if someone could post me a link to the file. Using max 2011. Thanks.
Hi i don’t have the glare shader is it my 3ds max i have 3DS MAX 2009
It’s there but it’s hidden. Read the comments.
oh yea
Me again i have another problem when you have to put the material on the particles i don’t have self illumination (Glow) can someone please respond i have 3DS MAX 2009