Saturday 8 March 2008

more dof

I seem to have found a solution in my search for efficient dof (depth of field). I have found a way to render out just the depth map of a scene (the Z-channel) which looks like this:


(environment and truck modelled by rey and luke)

Objects closest to the camera appear white and furthest are dark. The plan was to then use this channel as a guide for the depth of field affect in After Effects so that the whiter objects are less blurry than the darker ones. However I had major problems with the compatibility in after effects because in maya the only formats that can output a z channel are mayas native "iff" format and RLA. Unfortunately after effects does not recognise z or depth channels from "iff" images so I was forced to use RLA. This is bad because our custom renderer we are using does not export RLA images. I then tried to export a depth pass just using the maya software renderer in RLA format but after effects couldnt handle the file properly and refused to recognise the Z channel!

I then came across a very good compositing package. I found out that this software has much more compatibility than after effects in terms of the z channel so I began playing about with it and eventually achieved a natural looking depth of field affect in an amazingly fast render time (literally 1 sec per frame). This is the result: