# Incorrect zDepth Values at object edges - maybe an unfiltered fragment method issue

**URL:** <https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146>\
**Category:** Issues\
**Created:** [November 22, 2010, 11:40am UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146 "2010-11-22T11:40:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ultrasonic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/ultrasonic/32/40605_2.png) [@ultrasonic](https://forums.chaos.com/u/ultrasonic)\
**Post date:** [November 22, 2010, 11:40am UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/1 "2010-11-22T11:40:04Z")

</div>

Hey Guys,

i have a problem with my zMerge in Nuke where a object intersects another where it definitely should not. I have attached 4 images that show that problem.

I have no idea why the Z Values of some pixel seem to be nearer to the cam as the object that is laying over them.  
It does not even matter if Part A is switched to “primary visible” “off” or completly hidden…both times the object behind it gets zDepth values closer to the cam.

please see the pics below:

i hope i have described the problem clear enough

cheers  
Oli

 ![zmerge_01.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/9/6/965aaa96d806a0323d78adc0bebc233b22e70852.jpeg)  
 ![zmerge_04.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/7/5/75eb00b6bae12e083fb5b4c16bdf17d1f90d8677.jpeg)  
 ![zmerge_02.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/0/7/0785a9d72769dfec0c91278b8c43b459b672cb25.jpeg)  
 ![zmerge_03.jpg](https://europe1.discourse-cdn.com/chaosprd/original/3X/1/1/11e767d0ca8c59e5e668b2e81334ad49b6ec44d9.jpeg)

---

<div class="post-metadata">

**Author:** ![Mr.Hoo](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/mr.hoo/32/33221_2.png) [@Mr.Hoo](https://forums.chaos.com/u/Mr.Hoo)\
**Post date:** [November 22, 2010, 12:17pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/2 "2010-11-22T12:17:40Z")

</div>

Hey Oli,

is there a chance, that these are antialiasing artifacts caused by using any filtering methods…?  
Because I had a similar problem last days. These artifacts were widely produced in my render passes…

Turning the filtering method to none solved it.

Only one idea…

Cheers!

EDIT: Hm, but you would see the artifacts then in your passes, so this might not be the problem…

---

<div class="post-metadata">

**Author:** ![ultrasonic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/ultrasonic/32/40605_2.png) [@ultrasonic](https://forums.chaos.com/u/ultrasonic)\
**Post date:** [November 22, 2010, 1:27pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/3 "2010-11-22T13:27:23Z")

</div>

> [@MoonDoggie](#):
>
> Turning the filtering method to none solved it.

When turning AA off i only get fewer artifacts but this does not completly solve the problem! Any other ideas?

---

<div class="post-metadata">

**Author:** ![instinct](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/instinct/32/74489_2.png) [@instinct](https://forums.chaos.com/u/instinct)\
**Post date:** [November 22, 2010, 2:20pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/4 "2010-11-22T14:20:32Z")

</div>

Definately looks like a precision issue. If you are rendering halffloat try rendering full float. If not you might want to try and set close ranges for the Z

---

<div class="post-metadata">

**Author:** ![ultrasonic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/ultrasonic/32/40605_2.png) [@ultrasonic](https://forums.chaos.com/u/ultrasonic)\
**Post date:** [November 22, 2010, 4:12pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/5 "2010-11-22T16:12:39Z")

</div>

We are rendering fullfloat…and i also tried to set our “Depth Black” and “Depth White” Values as tight as possible. It does not get better…only different pixels are f$%ked up.

Heeeeeeelp!!!

---

<div class="post-metadata">

**Author:** ![ultrasonic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/ultrasonic/32/40605_2.png) [@ultrasonic](https://forums.chaos.com/u/ultrasonic)\
**Post date:** [November 22, 2010, 5:54pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/6 "2010-11-22T17:54:25Z")

</div>

Ok…now we have a different situation…see the picture and the comments below:

We have hidden only ONE visible filler object which is very far behind in terms of Z-Position. You see that the black artefacts shift to a different position and we have no clue why.

Any ideas would be greatly appreciated!!!  
Oli

 ![zMergeProblems_NUKE.jpg](https://europe1.discourse-cdn.com/chaosprd/original/2X/7/74f5bdfce3f662362e697a919f83072b40eb71c1.jpeg)

---

<div class="post-metadata">

**Author:** ![vlado](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vlado](https://forums.chaos.com/u/vlado)\
**Post date:** [November 22, 2010, 6:49pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/7 "2010-11-22T18:49:46Z")

</div>

This is not going to work properly with a filtered Z-Depth element. You can try an unfiltered element with the option “Unfiltered fragment method” set to “Nearest to camera”.

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![Mr.Hoo](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/mr.hoo/32/33221_2.png) [@Mr.Hoo](https://forums.chaos.com/u/Mr.Hoo)\
**Post date:** [November 22, 2010, 7:05pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/8 "2010-11-22T19:05:33Z")

</div>

He is already using “nearest to camera”, see pics in post #1 or do mean something different Vlado?

---

<div class="post-metadata">

**Author:** ![vlado](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vlado](https://forums.chaos.com/u/vlado)\
**Post date:** [November 22, 2010, 7:19pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/9 "2010-11-22T19:19:23Z")

</div>

> [@king\_max](#):
>
> He is already using “nearest to camera”, see pics in post #1 or do mean something different Vlado?

Yes, I read, but this will only work if filtering is disabled for the Z-depth (it doesn’t look like it from the images).

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![ultrasonic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/ultrasonic/32/40605_2.png) [@ultrasonic](https://forums.chaos.com/u/ultrasonic)\
**Post date:** [November 24, 2010, 12:55pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/10 "2010-11-24T12:55:25Z")

</div>

YES! - we are always using an “unfiltered” zDepth and we also always use “nearest to camera” as u can see here:

And this is also why i suppose that there might be a very little bug in the “nearest to camera” method

I try to send you my scene…unfortunately this needs some time because of confidential data…

---

<div class="post-metadata">

**Author:** ![vlado](https://avatars.discourse-cdn.com/v4/letter/v/779978/32.png) [@vlado](https://forums.chaos.com/u/vlado)\
**Post date:** [November 24, 2010, 8:10pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/11 "2010-11-24T20:10:21Z")

</div>

Ok then; I guess it would be best to look at the scene.

Best regards,  
Vlado

---

<div class="post-metadata">

**Author:** ![ultrasonic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/ultrasonic/32/40605_2.png) [@ultrasonic](https://forums.chaos.com/u/ultrasonic)\
**Post date:** [November 25, 2010, 2:04pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/12 "2010-11-25T14:04:17Z")

</div>

> [@yyk](#):
>
> Ok then; I guess it would be best to look at the scene.

I sent u an email containing a link to the scenefile.

---

<div class="post-metadata">

**Author:** ![ultrasonic](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/ultrasonic/32/40605_2.png) [@ultrasonic](https://forums.chaos.com/u/ultrasonic)\
**Post date:** [December 1, 2010, 3:14pm UTC](https://forums.chaos.com/t/incorrect-zdepth-values-at-object-edges-maybe-an-unfiltered-fragment-method-issue/26146/13 "2010-12-01T15:14:19Z")

</div>

Any news on this problem?
