just a quick question to ask about limitations of the Vray Z depth buffer.
Would it be possible to get the Z depth buffer to recognize a simple black-and-white opacity, so that geometry, such as alpha mapped leaves would work properly with the Z depth buffer.
I understand the complications and limitations of the Z depth buffer when working with semi-transparent objects, but I donāt see why it canāt work [ or be made to work] with pure black and white alphas that clip away alpha -geometry.
I have tried to use a falloff map [with the falloff set to camera distance]. To generate a Z depth buffer [ using it as a extra-tex render element] and it automatically cut out the alpha int the geometry of the leaves. Itās a bit of a workaround that seems to give satisfactory results, but i would rather use the Z-depth.
So is there any way to get Z depth buffer to clip away an alpha channel before working out the depths of the pixel.
Would it have to be rewritten to do such a thing.
It just seems so simple, using the falloff map that I canāt see why the Z depth canāt do the same thing
Forgive me if I am looking at this bit to simplistically.
Hello,
Iāve just tried the VrayZDepth, because I will need it soon with alpha channel support. And it seems to work!? I just create a ptepot with a Vraymtl, I add a checker in the opacity map slot, and everything seems ok.
Did I miss something?
The VRayZDepth works fine for me too. You need to make sure that the āfilteringā option is turned ON and that you are using V-Ray 1.5 SP3 or later - just checked with both VRayMtl and a Standard material.
I didnāt have the 'Enable Filtering option enabled & it seems to be cutting out the alpha geometry fine, now that I have turned it on.
The only problem is that now the Z-depth is anti-aliased which is not really of any use now as it wonāt work properly for DOF in post.
[This is the reason I had the filtering āOFFā in the first place as antialiasing createsā falseā distances on edges..creating artifacts when trying to do DOF in post.
Is there any way to get it to filter the alpha without anti-aliasing the edges???
So I think I have finally worked it outā¦thanks for the help.
The two main issues I noticed are below
1.
To get the Zdepth to NOT antialias the edges you need to set the Image Sampler to fixed at value 1. This will keep the pixels at the correct depth
This obviously requires a separate pass as the main render usually uses Adaptive DMC sampler.
Iitās quick to create another Z-depth pass anyway, so itās not an issue.
2.
The alpha map has to be pure Black & white [If you are trying to clip geometry ]
And now I can finally do some DOF in post⦠to my hearts content
Interesting.
Vlado, I assume itās not possible to have the z-depth rendered using fixed sampling to achieve the correct alpha without aliasing ? It would be nice to avoid having to setup a seperate pass.
You can certainly use fixed sampling, but that would be for the entire image; it is not possible to have different sampling just for one of the elements.
It might be possible to make the alpha transparency work with filtering turned off, but I have to look into it.
Please look into this! Being able to automatically render an non-antialiased z-depth is absolutely essential if you plan on using any post DOF. By the way - is there any way to extract the Z-depth separately without having to re-render the entire image?
Hi, Iām using this build and itās working great as far as the aliasing is concerned. But now I have another problem, and it may be something Iām just not setting right, but Iāve tried everything I can think of. Thereās no way I can adjust any of the VRayZDepth parameters so that objects closer will be lighter grey, objects farther will be darker grey, and the background will be black thatās the critical thing. If I adjust it to give me correct shades for the objects I always get a white background, and if I set it to get a black background, then the object values are always reversed. What am I doing wrong here? Of course the workaround is to put a plane way deep in the background, but thatās probably not always optimal.
Itās a bug that I need to fix (seems to have come up when I fixed the transparent stuff). In the meantime, you can just put a plane that is sufficiently far away, as you suggested.