Depth Pass anti-aliased?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 06 June 2013   #1
Depth Pass anti-aliased?

It appears that C4D R14 is anti-aliasing the Depth Pass. That seems like it's wrong. Wouldn't the anti-aliasing in between gray values throw off the depth of the object?
__________________
----end of line
 
Old 06 June 2013   #2
No you need to render out depth separately (or use Zblur) if you want aliased depth maps.
I tend to make my own separate custom grayscale depth pass to get around this (and for other reasons too)


Funny--- there are 2 threads going on simultaneously here touching on this issue if you look around--the EXR and VRAY thread.
 
Old 06 June 2013   #3
Yep, and something I learned in those threads is that you can get depth information without AA at the same time as you render your beauty pass with AA ... if you render out a position pass. You can use the position pass directly in Lenscare if you set the plugin to use the blue channel.
 
Old 06 June 2013   #4
Yes, you need an aliased depth pass for correct depth values but then your beauty pass won't align up exactly anymore so you need double resolution. It's all very nicely explained in the Frischluft Lenscare (AE DOF plug-in) manual.

<quote>
If you anti-alias your Z-depth pass, any anti-aliased pixels would indicate wrong depth values and result in artefacts. In case of aliased Z-depth pass and anti-aliasing on the image, the passes don't align exactly which result in another type of edge artefacts. You can deal with the second problem by rendering your aliased Z-depth pass at double resolution. Add the oversized Z-depth pass and the image pass (scaled at 200%) in a pre-comp. Apply Lenscare and then scale the pre-comp back to 100% in another comp.
</quote>

I always render all tech passes seperately. If you disable all materials, textures, AO, GI it renders pretty fast and you can disable AA in render settings. It would be nice if C4D allowed custom filtering per pass (like Vray, Mental Ray).

An anti-aliased depth pass is still useful a a mist effect.
 
Old 06 June 2013   #5
Been following along with the position pass info, Adam--and taking lots of notes!!!

This has also been mentioned before by Troyan I believe, but the plugin zBlur has an option to turn off AA (which still can be troublesome at 100%)

http://www.biomekk.com/index.php?page=1&cat=107&itm=26

There is another separate plugin that comes with zblur however that renders JUST your depth buffer. It is multithreaded and renders very fast. it is essentially the same as rendering your scene with lights, AO, materials (etc) turned off but does it automatically.

So you queue up your beauty pass, and then a copy of the same file (set to 200% no AA) with your zblur depth buffer pass activated and it will chew through the render rather quickly...depending on the scene of course. zblur accounts for transparency and reflection so if there is heavy refraction, etc--render times might be a bit slower.


Only reason I do not use zblur often is that I have problems with it if I need to render DOF that includes both rear AND front blur. Front blur in zBlur tends to blur everything.

Isnt DOF a PITA?

Last edited by JoelDubin : 06 June 2013 at 08:31 PM.
 
Old 06 June 2013   #6
not realy zdepth is much simpler than post motionblur imo. You also have to apply both to an image so one will always have to be able to work with an "incorrect" map.

I say inccoreect because if you apply depth blur to your rgb image then you'll need to also apply it to your motion vector image, which becomes 100% useless as all the color values are blurred giving not only different blur amounts but also directions which is key to the motion blur effect.

If you apply your motion blur to your rgb image then you also have to apply it to your depth pass, which will give you a reasonably usable result with notable issues at edges. Ideally your motionblur tool/plugin can allow you to produce an unpremultiplied result and no filtering. That should aid it a lot but the depth blur plugin should be able to reduce artifacts in those odd transitions. It will certainly have some inaccuracies but it should be minimal and not too distracting.

If you want the best results possible, then you will have to leave C4D's built in workflows and resort to also rendering in layers. There are two plugins to help with this workflow in C4D. The idea being that if each character or hero prop is on it's own image layer than applying both the depth blur and the motion blur should only be producing artifacts within the characters own image which reduces it to typically minimal depth differences in areas that typically have significant motionblurring like arms and legs.

The other issue is that people push depth of field far too strong when doing it in post. It's amazing how many people I see, who've been doing this for years mind you, put the aperture blur further than the actual blur that is in the real background plate, and sometimes to aperture sizes beyond physically possible. Not to say that in an all cg piece that can't look nice, but the stronger the blur the more likely you will run into artifacts as is.
__________________
Quote: "Until you do what you believe in, how do you know whether you believe in it or not?" -Leo Tolstoy
Kai Pedersen
 
Old 06 June 2013   #7
Originally Posted by LucentDreams: If you want the best results possible, then you will have to leave C4D's built in workflows and resort to also rendering in layers. There are two plugins to help with this workflow in C4D. The idea being that if each character or hero prop is on it's own image layer than applying both the depth blur and the motion blur should only be producing artifacts within the characters own image which reduces it to typically minimal depth differences in areas that typically have significant motionblurring like arms and legs.


For me, this is the one aspect of Cineware that gives me hope for it's future. Being able to separate out layers in comp before the render, allowing you to apply apply custom attributes per layer for MB and DOF before the render.

It also makes me wonder if some form of render layers tech will be part of R15.
 
Old 06 June 2013   #8
Originally Posted by AdamT: Yep, and something I learned in those threads is that you can get depth information without AA at the same time as you render your beauty pass with AA ... if you render out a position pass. You can use the position pass directly in Lenscare if you set the plugin to use the blue channel.


How? I have yet to get this to work.
__________________
2014 Reel
Company website
Behance Portfolio
HyperactiveVR
I reject your reality and substitute my own
 
Old 06 June 2013   #9
Originally Posted by Troyan: How? I have yet to get this to work.


Here are the steps:

Enable depth pass and the post effects effect to get a position pass. Set the scale in the position pass options so that you get a nice gradient -- I found that the default setting was useless. In my scene I had to set the scale to .001 to get a good result.

By default, the blue channel in the position pass represents Z depth, so in Lenscare choose the position pass as your depth layer and then set the plugin to use the blue channel.

That's it.
 
Old 06 June 2013   #10
Originally Posted by JoelOtron: Been following along with the position pass info, Adam--and taking lots of notes!!!

This has also been mentioned before by Troyan I believe, but the plugin zBlur has an option to turn off AA (which still can be troublesome at 100%)

http://www.biomekk.com/index.php?page=1&cat=107&itm=26

There is another separate plugin that comes with zblur however that renders JUST your depth buffer. It is multithreaded and renders very fast. it is essentially the same as rendering your scene with lights, AO, materials (etc) turned off but does it automatically.

So you queue up your beauty pass, and then a copy of the same file (set to 200% no AA) with your zblur depth buffer pass activated and it will chew through the render rather quickly...depending on the scene of course. zblur accounts for transparency and reflection so if there is heavy refraction, etc--render times might be a bit slower.


Only reason I do not use zblur often is that I have problems with it if I need to render DOF that includes both rear AND front blur. Front blur in zBlur tends to blur everything.

Isnt DOF a PITA?


Zblur does turn off AA. I don't understand the issue you're having with frontal blur. Zblur is just making a depth map, Lenscare should be handling the frontal blurring. What do you mean it tends to blur everything?
__________________
2014 Reel
Company website
Behance Portfolio
HyperactiveVR
I reject your reality and substitute my own
 
Old 06 June 2013   #11
Originally Posted by AdamT: Here are the steps:

Enable depth pass and the post effects effect to get a position pass. Set the scale in the position pass options so that you get a nice gradient -- I found that the default setting was useless. In my scene I had to set the scale to .001 to get a good result.

By default, the blue channel in the position pass represents Z depth, so in Lenscare choose the position pass as your depth layer and then set the plugin to use the blue channel.

That's it.


Trying that scale now, but I'm still curious about a couple of things
1) I'm assuming you're using OpenEXR format
2) In Position Pass what space are you using? Camera?
3) Are you not using Extractor or anything on it? Just tapping the EXR file?
__________________
2014 Reel
Company website
Behance Portfolio
HyperactiveVR
I reject your reality and substitute my own
 
Old 06 June 2013   #12
Originally Posted by Troyan: Trying that scale now, but I'm still curious about a couple of things
1) I'm assuming you're using OpenEXR format
2) In Position Pass what space are you using? Camera?
3) Are you not using Extractor or anything on it? Just tapping the EXR file?


1) I've done it both ways (separate pass and EXR). I can't figure out how to get a layered EXR straight out of render settings, but I've been able to get one by rendering and then saving out of the Picture Viewer;

2) Camera space;

3) I used EXtractoR with the layered EXR, but if you render a separate pass you can use that directly. With EXtractoR you have to select "Y-depth" for each channel, precompose the result, and then use the precomp as your depth layer in Lenscare.
 
Old 06 June 2013   #13
Originally Posted by LucentDreams: not realy zdepth is much simpler than post motionblur imo. You also have to apply both to an image so one will always have to be able to work with an "incorrect" map.

I say inccoreect because if you apply depth blur to your rgb image then you'll need to also apply it to your motion vector image, which becomes 100% useless as all the color values are blurred giving not only different blur amounts but also directions which is key to the motion blur effect.

If you apply your motion blur to your rgb image then you also have to apply it to your depth pass, which will give you a reasonably usable result with notable issues at edges. Ideally your motionblur tool/plugin can allow you to produce an unpremultiplied result and no filtering. That should aid it a lot but the depth blur plugin should be able to reduce artifacts in those odd transitions. It will certainly have some inaccuracies but it should be minimal and not too distracting.

If you want the best results possible, then you will have to leave C4D's built in workflows and resort to also rendering in layers. There are two plugins to help with this workflow in C4D. The idea being that if each character or hero prop is on it's own image layer than applying both the depth blur and the motion blur should only be producing artifacts within the characters own image which reduces it to typically minimal depth differences in areas that typically have significant motionblurring like arms and legs.

The other issue is that people push depth of field far too strong when doing it in post. It's amazing how many people I see, who've been doing this for years mind you, put the aperture blur further than the actual blur that is in the real background plate, and sometimes to aperture sizes beyond physically possible. Not to say that in an all cg piece that can't look nice, but the stronger the blur the more likely you will run into artifacts as is.


Trying to work out a solution to this exact problem. I have an animation with a bunch of gears that without blur some gear rotation synchs with the frame rate causing them to look stationary or running backwards. Need DOF to help focus on gear sets during fly-by. Not looking forward to this if I have to render DOF and Blur in Cinema. Which 2 plugins are you talking about exactly?
__________________
2014 Reel
Company website
Behance Portfolio
HyperactiveVR
I reject your reality and substitute my own
 
Old 06 June 2013   #14
Originally Posted by Troyan: Zblur does turn off AA. I don't understand the issue you're having with frontal blur. Zblur is just making a depth map, Lenscare should be handling the frontal blurring. What do you mean it tends to blur everything?


I already said that you can turn off AA in blur i.e.
Quote: "This has also been mentioned before by Troyan I believe, but the plugin zBlur has an option to turn off AA (which still can be troublesome at 100%)"


Have you tried doing rack focus in Zblur? (either rendered in camera or in post using lens care)

I've never gotten a sharp focal point when I use the front and back blur simultaneously (via the Focus position slider under Depth adjustment.)

To be honest--this may work now that zblur has the option to utilize the cameras depth settings. The c4d camera does produce good front and rear depth maps. USing the focus position slider in zblur doesn't in my experience.

Last edited by JoelDubin : 06 June 2013 at 03:29 PM.
 
Old 06 June 2013   #15
Originally Posted by Troyan: Which 2 plugins are you talking about exactly?


Probably zblur and enDof?

EDIT--sorry its enDOFin

http://www.blackstar-solutions.de/?id=33

Last edited by JoelDubin : 06 June 2013 at 03:32 PM.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:27 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.