Z Buffer / Depth of Field


#1

Couple of questions guys,

Firstly, does anyone know if its possible to show z buffer images in the render view? I know it can be done in Fcheck but would like to look at them whilst still in Maya if possible.

Secondly, can anyone detail a method of using Z buffer images to create Depth of Field? I’d be using combustion to composite but I dont think its straightforward judging by this article;

http://www.fxguide.com/fxtips-179.html

But I would appreciate any advice from anyone who has used z depth from Maya to create depth of field.


#2

with zdepth, i don’t think its possible to view in the render view. You could batch just the one frame and do that. But since it isn’t going to be that precise (i guess) then it won’t really be noticeable if you make a mistake with it.

The ZDepth works with the clipping planes of the camera. So if you set the near and far planes right it shouldn’t be a problem. Also make sure you take off auto clip.


#3

As mentioned in the article, Combustion does’nt recognize Maya iff files easly. Maybe you should go for a workaround.
If you know how to play with z-buffer in a program like Photoshop so it’s easy to find the solution.
The clue is to bring th z-buffer picture -converted to grayscale- and use select rang color to get the area that should be blured then apply the gaussian blur on the RGB rendering to simulate DOF.
But i have a question for Maya users. I’ve tryed many times to render out my scene in other format than iff, but the z-buffer still render in a separate Maya iff files? if there a way to get them in another format?
-lazhar

ps: i’m talking about Mental Ray for Maya, I dont use the Maya renderer.


#4

many other formats simply dont support z channel. I couldn’t get any tool to work with those iff files mental ray renders out. I guess most tools have a problem with them because they only contain z channel and no rgba channels. The only work around we found here was to render out the scene again, with surface shaders and no light or whatever makes your scene superfast. render it with maya renderer and now fusiom or shake can read the z channel of those files. With channel booleans in Fusion or Reorder in Shake you can put together the mental ray image with the zchannel. Hope that helps.


#5

but the problem in maya renderer is that the tesselation of nurbs surfaces are not the same -for me of course- so the second rendering would be different than the first and it should bring lot of troubles in accurating the DOF.
Any idea?


#6

convert to polys


#7

atzefratz is a sucker - just render with MR as maya iff´s or even with the build in maya renderer -> un check the auto clipping in the cam attrib and set the minimum nessecery min max values -> render

load the image seq in combustion and use the 3D dof / show gbuffer - it works just fine - else use any other composer to extract the z to an rgb
image -> use this as matte of the defocus intensity


#8

uschi, I’ve tryed many times to play with 3D Post Operators in Combustion 2 , but noway. I remember that the Documentation only talks about using RLA/RPF files rendered using MAX, but they didnt mention any other rendering package.
In Combustion , I just get the RGBA data, but the Z channel contained in the iff Maya files is not recognised. Same when you use another Format, the Z-depth is only rendered to a iff Maya.
Any clue please? I really need the solution or do I need to ask in the C forum?

atzfratz, I dont think converting to Poly is a good solution. So why do we work in nurbs? there is some situation where you have to use nurbs and converting will destoy the geometry and need a lot of work to refine it again.
thanks.


#9

sure, its not a good idea to convert.
But the Nurbs data is converted to polys before rendering if your not using Renderman or other Nurbsrenderer. So what ever your Nurbs are tesselated to before rendering you can do by hand before. But uschi is right, If you render iffs with mental ray the zbuffer is already included in the image. So there is no need to convert it, i didn’t know that.


#10

here is my rendered image using the comand line “MAYARENDER_WITH_MR”.
http://lazzhar.arabcg.com/mosquezdepth.iff
it’s 180x135 sorry for using such a low resolution, but i’ve brought the picture as rendered from MR.
in Photoshop, i could see the z-depth as a second alpha channel. for this, i used the iff Maya plugin from Highend3d. but in C2.0 no way :frowning:
So here is the Combustion project file:
http://lazzhar.arabcg.com/mosque.cws
a 30 frames of the still picture above, i applied :
Operators->3D Post->Show G-Buffer. the result is a pure black. changes the near/far Z didnt change anything.
I know the workaround of using a Fog in an additional pass, but it takes time for setup and rendering. and searching in this forum gives confusion cuz many people are asking for the same problem but noone has given the ultimate solution.


#11

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.