Z-Depth pass problem (Anti-Aliasing/jagged edges)

Forums: Z-Depth pass problem (Anti-Aliasing/jagged edges)
Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderator: aoktar

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby abstrax » Thu Aug 11, 2016 9:14 pm

abstrax Thu Aug 11, 2016 9:14 pm
We've got the option "distributed ray tracing" in the info passes / kernel. If disabled, it disables motion blur and depth of field, but it still leaves pixel filtering enabled. What we could do is also disabling pixel filtering when this option is enabled. Unfortunately things like masks wouldn't then work correctly anymore. I.e. we would need to separate the info passes into passes that apply pixel filtering and passes that don't (they are currently rendered together).

-> Which passes should have pixel filtering disabled when distributed ray tracing is disabled?
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5143
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby Terryvfx » Fri Aug 12, 2016 12:46 am

Terryvfx Fri Aug 12, 2016 12:46 am
Mmm I'm not expert compositor but I would say at least these ones: z-depth, world position, motion vector, normal(maybe) and anything that it's information about the scene except masks but maybe someone can correct me or come out with a better approach.
User avatar
Terryvfx
Licensed Customer
Licensed Customer
 
Posts: 299
Joined: Tue Dec 30, 2014 12:43 am

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby calus » Fri Aug 12, 2016 7:11 am

calus Fri Aug 12, 2016 7:11 am
abstrax wrote:-> Which passes should have pixel filtering disabled when distributed ray tracing is disabled?


z-depth
position
uv-coordinate
texture-tangent
motion vector
all normal passes
all ID passes


So basicaly this is all the true info-passes for which it doesn't make any sens to have a filtered pixel giving a false information as for example in z-depth:
if one object is at 0 depth , background is at 1000, filtered pixels for the contour of the object are at depth 500 ...
Or for example for ID passes, filtered pixels of the contour of the object give an exotic ID wich is the RGB mix of background ID and Object ID.

Also to extract filtered masks from aliased passes,we need a coverage pass, which octane doesn't have,
coverage pass contain the filtering information :
coverage_pass.jpg


However without coverage pass, we can still recreate filtering for extracted mask with an older technic:
render aliased pass at twice the resolution, and down scale the extracted mask.
Last edited by calus on Fri Aug 12, 2016 1:55 pm, edited 1 time in total.
Pascal ANDRE
--------------------
Maya 2019, Windows 7, 128 GB RAM
4x GTX 1070, driver 430.39
--------------------

--------------------
Join MAYA OCTANE USERS Skype discussion here :
https://join.skype.com/LXEQaqqfN15w
--------------------
calus
Licensed Customer
Licensed Customer
 
Posts: 1306
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby FxDesign » Fri Aug 12, 2016 10:01 am

FxDesign Fri Aug 12, 2016 10:01 am
abstrax wrote:
-> Which passes should have pixel filtering disabled when distributed ray tracing is disabled?


I'm not an expert in passes, but fore sure these passes should be aliased:

-Position pass
-Z-depth pass


For me the ID pass shouldnt be aliased or the final mask will be too.

Maybe Calus is right for the coverage.

In a first step, abstrax could you make us a P.pass/Z.pass aliased, with a magic button ?

Thank you
FxDesign
Licensed Customer
Licensed Customer
 
Posts: 80
Joined: Wed Apr 24, 2013 10:47 am

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby aoktar » Fri Aug 12, 2016 12:34 pm

aoktar Fri Aug 12, 2016 12:34 pm
FxDesign wrote:
abstrax wrote:
-> Which passes should have pixel filtering disabled when distributed ray tracing is disabled?


I'm not an expert in passes, but fore sure these passes should be aliased:

-Position pass
-Z-depth pass

For me the ID pass shouldnt be aliased or the final mask will be too.

Maybe Calus is right for the coverage.

In a first step, abstrax could you make us a P.pass/Z.pass aliased, with a magic button ?

Thank you


As i undestood that's not possible to get aliased and anti-aliased on ONE render phase. It requires to be rendered as TWO stages. It should be hard for the renderer but easier to manage in plugins as TWO STAGES with different aliasing options.
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
aoktar
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 13516
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby calus » Fri Aug 12, 2016 1:02 pm

calus Fri Aug 12, 2016 1:02 pm
FxDesign wrote:For me the ID pass shouldnt be aliased or the final mask will be too.

ID passes used for compositing must be aliased and used in conjonction with a coverage pass...
(or without coverage, rendering at double resolution and downscaling the extracted mask)

There's no way you can extract a usable mask from a filtered ID pass for animation.

I suppose filtered IDpass can be useful for still picture to output quick dirty masks if by chance near objects all have a very different ID color,
but anyway with the Abstrax proposition, filtered ID pass would still be possible if you enable the "distributed ray tracing" option.

Same thing for the zdepth pass, if used for compositing DOF, it has to be aliased,
but if used for post-effect fog , the depth pass should be filtered, so in this case we would have to enable the "distributed ray tracing" option.
Pascal ANDRE
--------------------
Maya 2019, Windows 7, 128 GB RAM
4x GTX 1070, driver 430.39
--------------------

--------------------
Join MAYA OCTANE USERS Skype discussion here :
https://join.skype.com/LXEQaqqfN15w
--------------------
calus
Licensed Customer
Licensed Customer
 
Posts: 1306
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby FxDesign » Fri Aug 12, 2016 2:31 pm

FxDesign Fri Aug 12, 2016 2:31 pm
So have we just to wait for abstrax or an other dev to develop this feature in a new release ?
FxDesign
Licensed Customer
Licensed Customer
 
Posts: 80
Joined: Wed Apr 24, 2013 10:47 am

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby Terryvfx » Fri Aug 12, 2016 3:44 pm

Terryvfx Fri Aug 12, 2016 3:44 pm
What Calus is saying it's really interesting to me I didn't knew anything about coverage passes, and yeah I was confused about that one we do need masks to be aliased too.

So we should have all info passes aliased and maybe consider adding this coverage pass to the engine.

I also found a way to essentially create your own coverage pass from both aliased and antialiased colorID passes: https://www.youtube.com/watch?v=Fe6Vazv9_Wg

A solution where we can check to have them both aliased and antialiased would be the best.
Last edited by Terryvfx on Fri Aug 12, 2016 4:18 pm, edited 1 time in total.
User avatar
Terryvfx
Licensed Customer
Licensed Customer
 
Posts: 299
Joined: Tue Dec 30, 2014 12:43 am

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby calus » Fri Aug 12, 2016 4:03 pm

calus Fri Aug 12, 2016 4:03 pm
Terryvfx wrote:I also found a way yo essentially create your own coverage pass from both aliased and antialiased colorID passes: https://www.youtube.com/watch?v=Fe6Vazv9_Wg


oh nice find thanks,
yes obviously you may also create a coverage pass with the difference between one aliased IDpass and one filtered IDpass,
but it seems to me that each ID color should have the same luminance (because of the conversion from color to grey),
And Octane unlike other renderer use a color sheme with lot of luminance variation for its ID colors, so this technique may not give good coverage pass with octane IDpass. I will have to try...
Pascal ANDRE
--------------------
Maya 2019, Windows 7, 128 GB RAM
4x GTX 1070, driver 430.39
--------------------

--------------------
Join MAYA OCTANE USERS Skype discussion here :
https://join.skype.com/LXEQaqqfN15w
--------------------
calus
Licensed Customer
Licensed Customer
 
Posts: 1306
Joined: Sat May 22, 2010 9:31 am
Location: Paris

Re: Z-Depth pass problem (Anti-Aliasing/jagged edges)

Postby abstrax » Thu Oct 20, 2016 11:59 pm

abstrax Thu Oct 20, 2016 11:59 pm
We will look into this issue in the next couple of weeks. Just to make sure that I got this right: We will add a new mode that disables pixel filtering on all info passes, except:

- layer mask
- wire frame
- AO
- all material passes (opacity, roughness, ...)

I have been thinking about the coverage passes and I don't think the original concept (storing the pixel coverage of the object ID with the largest coverage) can be implemented reasonably in Octane, we could do something that works similarly (storing the pixel coverage of the object ID that is at the center of the pixel), but I don't think it will be good enough to extract useful anti-aliased mattes from it. There is also the "cryptomatte" system (viewtopic.php?f=33&t=55253) which might be more useful since it allows the separation of multiple objects/mattes per pixel. So the questions I have are:

Which post-processing tools could use coverage passes and which tools can use "cryptomattes" or OpenDCX?
You would render those coverage/cryptomatte passes for only for one of the ID passes (material ID / object ID / object layer colour / render layer ID) or for multiple of these?
Is there any other approach that should be considered instead?
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
User avatar
abstrax
OctaneRender Team
OctaneRender Team
 
Posts: 5143
Joined: Tue May 18, 2010 11:01 am
Location: Auckland, New Zealand
PreviousNext

Return to Maxon Cinema 4D


Who is online

Users browsing this forum: No registered users and 8 guests

Fri Aug 14, 2020 5:49 pm [ UTC ]