3
$\begingroup$

I am trying to get the depth value using z pass from my scene which is a simple head model, but while rendering there is white salt and pepper noise in the hair and eyelash. I have saved in both png after normalizing and in openexr file with the raw data. While looking into it I figure it out that both the object are using alpha value from the diffuse and opacity texture file. Below are the composite pass I am using -

enter image description here

Following is the node editor for hair/eyelash object -

enter image description here

Following are the image and corresponding depth (z pass output) as png in with the original alpha values -

enter image description here

Then I manually edited the alpha channel value in the texture image of the hair: I edited the alpha as 255 where there is a alpha value present ( > 0)

enter image description here

This reduced the noise a lot but at the same time its reduce the rendering quality of the hair mesh as well -

enter image description here

I have also tested with changing the max bounces for transparency and transmission but it did not change the result

Is there any further solution of this issue...

Blend File Link :

https://drive.google.com/open?id=1LzJ-RiZzgxlY1aGHTTAAaS0OrGTseyvc

$\endgroup$
  • $\begingroup$ Does it make a difference if you connect the alpha socket from your texture to the alpha socket of the Principled BSDF and remove the Mix Shader and Transparent BSDF? $\endgroup$ – Robert Gützkow Nov 22 '19 at 15:16
  • $\begingroup$ @Robert I tried but it's not giving any improvement in the z-pass result, I have added the blend file in the original post $\endgroup$ – shubhajit Nov 23 '19 at 23:42
3
$\begingroup$

Switch to Branched Path Tracing

Switch the sampling method to Branched Path Tracing and set Min Transparent Bounces to 32 or higher to eliminate the noise.

enter image description here

Also, it is better to use Mist pass instead of Depth.

enter image description here

You need to map the value from 0-1 to 0-100, depending on your mist settings, to match the depth pass.

enter image description here

Thanks to skw Stefan Werner for the Branched Path Tracing hint. https://blenderartists.org/t/cycles-depth-and-mist-passes-for-a-transparent-material-give-a-lot-of-noise/1192751/5


Stay with Path Tracing

If you need to stay with Path Tracing, which seemingly ignores Min Transparent Bounces, you can create a new view layer with material override.

enter image description here

enter image description here

The material will be with Camera Data node and mixing by the object index N.

enter image description here

Change the object indexes of all the particle objects to N, easily with Copy to Selected.

enter image description here

It gives the same result as the mist pass.

enter image description here

|improve this answer|||||
$\endgroup$
  • $\begingroup$ Thanks, @unwave for your reply, I am pretty new to blender and using for my research purpose. I didn't get mixing by the object index part. In my case, there is only two object mesh one is the hair mesh and the other is the eyelash as I am importing this character from iclone. Could you please explain or provide some tutorials I can follow? I have also added my blend file in the original post for your reference. $\endgroup$ – shubhajit Nov 23 '19 at 23:28
  • $\begingroup$ @shubhajit An object index is an integer value of an object you can give it to later access it in the shader and compositor node editors. I did some tests with EEVEE depth and mist passes and also a filtering of the flakes in the compositor. It gives usable results too. Can you specify what you are trying to achieve? $\endgroup$ – unwave Nov 24 '19 at 19:18
  • $\begingroup$ Thanks @unwave for the explanation, I am trying to get the exact depth information in openexr format and their corresponding rgb images, I am importing these characters with from the iclone character creator pipeline in either alembic or fbx format and render it in blender with different camera positions and camera parameters. I have attached the blend file in the original post. $\endgroup$ – shubhajit Nov 24 '19 at 19:34
  • 1
    $\begingroup$ @shubhajit Try this fix blenderartists.org/t/… or use EEVEE with Alpha Hashed. Set Mist Pass from 0 to 100 m, linear, and map range It from 0 - 1 to 0 - 100 in the compositor. You have to enable it first. It will appear in World Properties. $\endgroup$ – unwave Nov 25 '19 at 20:56
  • 1
    $\begingroup$ @shubhajit Check the updated answer. It is easier, you don't need material override. $\endgroup$ – unwave Nov 28 '19 at 9:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.