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!
If you are a talented artist and have ideas to share, we welcome you to be a guest author! Click here to find out more!
Polygon Blog is devoted to unique 3ds Max tutorials. All tutorials on this site are about 3ds Max. Furthermore, these tutorials don't require any plugins. They are doable with just 3d Max. If you have a good idea for a new 3d Studio Max tutorial, please let us know!
Hello,
I have 3ds max 2009 and don’t have the bokeh/depth of field how can i get or what do i use?
get 3ds 2010
1. Open architectural_max.mi file using notepad. The location of this file is in Program Files \ Autodesk \ 3ds Max 2009 \ mentalray \ shaders_standard \ include
better backup this file first to be safe if there are mistakes.
2. Find the line of code like this:
gui “gui_mia_lens_bokeh” {control “Global” “Global” (“uiName” “Arch: DOF / bokeh”, “hidden”
in the text “hidden” add a # in front of it so that it becomes # “hidden”.
3. Save the file architectural_max.mi
restart your 3ds max, Now mia_lens_bokeh shader ready for use.
in Brazil’s like to work
keep it up
P.S my english no good
Is bokeh/depth of field in Max 2011. I have 2009 and can’t find it.
@anilee13.
the shader is hidden in max 2009. you have to unhide the shader by editing a mental ray settings file. check this link http://www.mastering-mentalray.com/blog/?p=84
Really nice!
Hope you can throw up some iray tutorials soon also!
I’m a newbie, sorry for asking but… I’m stuck at “pick shape object” in the path follow properties… It wont let me use that to click on the line.
Its probably something really easy.
Thanks for the tutorial anyway!
3ds max at the begginning of it has different material editor. How can i change it so it looks like urs?
Open Compact material editor ( Rendering > Material Editor > Compact Material Editor ).
hey dude , thanks for this tutorial …………. it helped me a lot …carry on ..
Hi I got a problem
In Step 9 ”
* Area Light Parameters
o Radius: 10 ”
I cant find that. Can u explain it to me?
Make sure you have created ‘mr Area Omni’ and not Omni.
Hey one more thing
In the last step when i am rendering (finish proces, btw i still need heplp with this omni light shadow) it says that bookeh.tf is missing. I got 3ds max 2011
I have no idea about that error message. Does it work anyway?
Everything renders fine (except its taking quite long xd) but it shows everytime I render it or open a file. I dont really see the difference when using Bokeh effect, could you explain to me what it does?
Im trying to make a infinite loop with the particles on an animation, problem is at frame 100 it explodes and does not follow the path anymore.
Any tips?
thanks and great tutorial.
Thanks for the great tutorial, but I have a question about the self illumination. This option isn’t visible in my workspace. Do i have to enable something?
Thanks for your help!
Keep up the good work!
Great work…I must be an idiot because I followed it EXACTLY word for word, line by line and my project looked NOTHING like this. I applaud the outstanding work!!
hi,
awesome work that u shared with us, Thank u so much. but i want to ask u, How can i decrease the super spray particle?
Please tell me.its urgent
In step 10 se set the particle quantity to 1000 (Particle Generation > Particle Quantity > Use Total: 1000). Just decrease the value.
Never mind my last comment. GREAT TUTORIAL! Thanks!
The result for my render after applying glare effect with the settings as your turned out to be different. I can see glow on one alphabet only…How come?? can i know what is the problem?? I am using 3dsmax 2010 but i cant find bokeh effect in my camera shader lens….can anyone help me??
thank you very much~
Where do the spheres get their orange light from?
PS Thanks for a great tutorial.
hi.. could u share the project file too?
sir i have a doubt .
its quiet difficult for me to render such a scene with the help of mental ray as my system can’t afford that much ram . its just 3 gb .and could u please let me know if i could add glare and render out a fine scene without using mental ray ?
very grateful & unique bokeh effect thanks
Nice tutorial, I followed your instruction with little difficulty. I’m looking forward to learning more little tricks to round out my knowledge in 3DS.
awesome tutorial, looks great.
Sir i didnt get the depth of feild in my lens options. What to do?
This is incredibly stunning. Thank you for sharing that with the world, haha!
But I do come across two tiny bugs: 1) When I’m rendering after I’ve placed that ‘mr Area Omni’, I see a strong light just in the middle in the like of a bulb.. Which is unlike what this tutorial shows; 2) I don’t know how, but now,(that is a few minutes after messing up around~I’m very much of a newb, hah), whenever I select to render the whole thing, I get a nice black render.. I mean, nothing – just plainly all black!
I don’t know if that matter, but I run with the 2009 version (64Bits).
Never mind the second problem; it has been fixed by importing then exporting the whole thing.
Also, the first problem has somehow vanished… Anyways, thanks a lot again for this BRILLIANT tutorial.
Peace!
Oh, Can someone help me out here….
Whenever I render up, I get that: http://img811.imageshack.us/i/twfo.jpg/
ANd here is how everything is placed: http://img811.imageshack.us/img811/9980/twfw.jpg
Any help would be nice, thx!
Not sure what is going on but try setting ‘Ray Bias’ to 0.
That didn’t work. http://img163.imageshack.us/img163/8265/didnt.jpg
Funny thing though, the light bulb has reappeared… =/
Alrighty. I finally figured it out how to get rid of the light bulb when rendering the whole thing.
Select your camera, go to Modify – Parameters, before the Stock Lenses, uncheck ‘Orthographic Projection’. And voila!
but I was unable to complete the Bokeh Effect because of the incredible lag I’ve been getting. I suppose because of the low cache size on my CPU.
http://img38.imageshack.us/img38/1271/twfbw.jpg
Awesome simple and neat. Only heard about new bokeh depth of feild in an article i read about max 2011 saying how great it was. well just got max 2012 update and figured i should look that up. your tutorial was simple and awesome. only needed the last bit cuz my scene was already made but man did it make a difference! thanks so much!
step 11 is driving me crazy! I go through the steps of creating a path follow object, but i can not click ‘Pick Shape Object’, it is grayed out! so i cant select the spline, which in part i think is also the reason why i cant bind the super spray to the path follow object. (which was the next step)
any help!? i have been doing well through this process and i’d hate to stop now!
The “Pick Shape Object” will be grayed out in the Create Tab, but should work once created and you go to the Modify Tab.
Hi, great tutorial. But I can’t get the “Depth of Field / Bokeh” it’s not anywhere to be seen. I have 3ds2010 so it should be there..
Please help
The “Arch: DOF / bokeh” lens shader is hidden in both 2009 and 2010 versions. Follow this previous post to unhide it.
pras says:
October 12, 2010 at 8:24 am
1. Open architectural_max.mi file using notepad. The location of this file is in Program Files \ Autodesk \ 3ds Max 2009 \ mentalray \ shaders_standard \ include
better backup this file first to be safe if there are mistakes.
2. Find the line of code like this:
gui “gui_mia_lens_bokeh” {control “Global” “Global” (“uiName” “Arch: DOF / bokeh”, “hidden”
in the text “hidden” add a # in front of it so that it becomes # “hidden”.
3. Save the file architectural_max.mi
restart your 3ds max, Now mia_lens_bokeh shader ready for use.
Hi
great tutorial!
but I have a problem.
I get a sign saying “Missing Map Files”, and the file is “Bokeh.tif”. Anyone know where I can get?
I’m using Max 2012
Regards!
p.s.: forgiveness for my bad English, I’m using an online translator :S
Hi, I have the same problem as ENS, but I use max 2011. Somebody could help us?
gracias ya e entendido mejor este software
hello , i am so confused how to place super spray and how to create particles .. as u shown here .. i mean i am so confused in step 10 and 11 pls help .. me
Hi, Does someone have bokeh.tif file? I’m using Max Design 2012. Eveything perfectly done. But when redering it says bokeh.tif missing…
hey. where can i find Glare??