SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.


SM Forums / Lounges / Maya Basics & Newbie Lounge / Keyframe Depth of Field?

Maya Basics & Newbie Lounge Please post in this section ONLY if your question doesn't fit in anywhere else on the forum, or if you're not sure which section it's relevant to. We also have Free streaming trial available.

Join the conversation. Reply to post
 
Thread Tools
07-01-2004, 06:00 PM   #1
mindbend
Registered User
 
Join Date: Jan 2004
Posts: 17
Keyframe Depth of Field?
How does one Keyframe the Depth of Field attributes?

I have a little test sequence where I have three primitive shapes lined up. I set the camera to focus on the middle shape. I then animated the camera to move through and around the shapes. Much to my dismay, I could not keyframe the focus distance to stay focused on the center object.

How is this accomplished? Thanks.
  Reply with quote
07-01-2004, 11:23 PM   #2
Pony
Subscriber
 
Pony's Avatar
 
Join Date: Mar 2003
Location: with PonysGirl
Posts: 2,573
wandering to clear something up. you could not keyframe the Field attribute at all or you key framed it but its dificult to get the field to stick right whare you want ?
  Reply with quote
09-01-2004, 05:05 AM   #3
ragecgi
Registered User
 
ragecgi's Avatar
 
Join Date: Sep 2002
Location: Minnesota, USA
Posts: 3,709
Good points as usual Pony!

Also, just an fyi, to my knowledge, depth of field is not keyable in an "axial" sense.

However, you should be able to key it for distance from cam.
__________________
Israel "Izzy" Long
Motion and Title Design for Broadcast-Film-DS
izzylong.com
  Reply with quote
09-01-2004, 09:52 AM   #4
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
this would be much simpler in post. You could animate a fade in shake (or similar package assuming you have access to it) to control z depth image. I did this on my masters project and it worked a treat. It would mean you only need to render one image.

Do you have access to any comping software?
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
  Reply with quote
09-01-2004, 02:54 PM   #5
mindbend
Registered User
 
Join Date: Jan 2004
Posts: 17
I do have After Effect production bundle 6.0, which of course supports z-depth. I have yet to do any 3D work in AE, but I imagine it's pretty easy as I'm pretty comfortable in AE in general.

It just seems to me that keyframing the camera parameters would be easier. You know, set a keyframe on frame 1 with focal distance = 15, move to frame 50 and set a new keyframe of focal distance 25, etc. But apparently it doesn't work that way?

Someone on another forum mentioned to use a locater and tie the focal distance to the locater. Seems overkill to me, but I admit I'm just learning this, so I'll reserve analyzing it until I'm more familiar.

Thanks for the input, I'll try the post-production method. Presumably that's going to have a slightly different look, right? Not that it really matters for what I'm doing, but I could see where someone would prefer one render look over the other.
  Reply with quote
09-01-2004, 04:28 PM   #6
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
no it should look the same, and the beauty is that if you dont like the look you can tweak it without re-rendering the scene... and that's the time saving beauty of it
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
  Reply with quote
09-01-2004, 04:39 PM   #7
mindbend
Registered User
 
Join Date: Jan 2004
Posts: 17
Interesting. So is it safe to say that in general one would NOT render in Maya with depth of field, but rather just render with Z-depth and do it in post. Thus allowing the flexibility as well as time savings in renders?

I'm going to have to play with that this afternoon.
  Reply with quote
09-01-2004, 06:01 PM   #8
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
damn right! I would never trust maya's DOF it takes too long and when you're done you've got dof whether you like it or not! if you do it in post you can remove it, tweak it do whatever the hell you want with it. Much much more flexible

Alan
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
  Reply with quote
20-07-2009, 07:07 PM   #9
andymcbride
Registered User
 
andymcbride's Avatar
 
Join Date: Jul 2009
Location: atlanta
Posts: 42
I would like to see if there IS a way to keyframe the depth of field within maya...i mean..it just doesnt make sense that you couldnt. But doing it in after effects SEEMS like a solution...but for some reason i dont like the idea of doing it in AE. hmm..i will read into that too. If anyone has good links for this process please post..I will aswell.
  Reply with quote
20-07-2009, 07:13 PM   #10
honestdom
The Nurb Herd
 
honestdom's Avatar
 
Join Date: Oct 2007
Location: London
Posts: 2,381
Quote:
Originally posted by Alan
damn right! I would never trust maya's DOF it takes too long and when you're done you've got dof whether you like it or not! if you do it in post you can remove it, tweak it do whatever the hell you want with it. Much much more flexible

Alan
this is your answer.
  Reply with quote
23-07-2009, 01:17 AM   #11
Chirone
Subscriber
 
Chirone's Avatar
 
Join Date: Dec 2007
Location: NZ
Posts: 3,125
A DOF in after effects or other compositing packages takes all of 2 seconds, doing it in maya takes all of... not sure how long it takes, but its certainly more than 2 seconds to see something, as stated above

you just need to have a zdepth pass rendered
__________________


that's a "Ch" pronounced as a "K"

Computer skills I should have:
Objective C, C#, Java, MEL. Python, C++, XML, JavaScript, XSLT, HTML, SQL, CSS, FXScript, Clips, SOAR, ActionScript, OpenGL, DirectX
Maya, XSI, Photoshop, AfterEffects, Motion, Illustrator, Flash, Swift3D
  Reply with quote
29-05-2018, 09:52 PM   #12
whitecrow1986
Registered User
 
Join Date: May 2018
Posts: 1
Okay I know it's been a LONG time since this post was created but I ran into this issue last night in Maya 2017 where I could for the life of me animate the DOF from in camera or with a mental ray lens bokeh. Though after much trial and error, I found a way to do it....EXPRESSION DRIVEN!

In the camera itself, if you create a new attribute called something like "dofAnimate" you can link it directly to the camera DOF focus distance or mi_lens_bokeh plane with a simple expression like this:

perspShape1.focusDistance = persp1.dofAnimate;

for an mi_lens_bokeh it would look something like this:

mi_lens_bokeh1.plane = persp1.dofAnimate;

Now you can simply keyframe the dofAnimate attribute on the camera and it forces Maya to actually animate the DOF.


On a side note, I could have easily rendered out a Z pass, but let's face it, without rendering out multiple layers of objects with their own passes, Zdefocus in Nuke looks terrible and can have broken or choppy edges especially on really deep scenes with lots of bokeh. Rendering DOF directly out of Maya always looks better even if you have to sacrifice a lot more time to do so. I hope this is helpful for anybody who runs into this issue in the future.
  Reply with quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
(Depth of field ) render issue............ yourway91 Lighting & Rendering 0 23-11-2014 04:09 PM
Free Friday Tutorial #12 Easy Depth of Field in Maya (DOF) David Simply Maya Tutorials 12 11-04-2013 07:36 AM
depth of field Callum_Abele Maya Basics & Newbie Lounge 4 10-03-2006 06:21 PM
Depth field Dann Maya Basics & Newbie Lounge 3 10-08-2003 07:52 PM