Depth Pass needs white background
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
The black background in the Depth Pass is very wrong, as that puts "infinity" at a distance of zero. This messes with a lot of depth-based effects and is very hard to work with. A current workaround is to make a large hollow sphere around your environment, but this complicates things and is unnecessary.
GTX 1080Ti 11GB (3x), Water-cooled
Intel i7-5820K 6-core @ 3.3GHz
Windows 10 Pro 64-bit, 32GB RAM
Intel i7-5820K 6-core @ 3.3GHz
Windows 10 Pro 64-bit, 32GB RAM
- stratified

- Posts: 945
- Joined: Wed Aug 15, 2012 6:32 am
- Location: Auckland, New Zealand
The easiest is to use depth + alpha in your effects. Alpha is 0 where depth is infinity.profbetis wrote:The black background in the Depth Pass is very wrong, as that puts "infinity" at a distance of zero. This messes with a lot of depth-based effects and is very hard to work with. A current workaround is to make a large hollow sphere around your environment, but this complicates things and is unnecessary.
cheers,
Thomas
So programming an incorrect depth pass is the right solution here?
In what instance is having black at infinity ever useful? You should use the alpha matte as you're suggesting to make infinity black.
In what instance is having black at infinity ever useful? You should use the alpha matte as you're suggesting to make infinity black.
GTX 1080Ti 11GB (3x), Water-cooled
Intel i7-5820K 6-core @ 3.3GHz
Windows 10 Pro 64-bit, 32GB RAM
Intel i7-5820K 6-core @ 3.3GHz
Windows 10 Pro 64-bit, 32GB RAM
- stratified

- Posts: 945
- Joined: Wed Aug 15, 2012 6:32 am
- Location: Auckland, New Zealand
Hi,
Just a clarification for interested readers. The Z-depth is a real depth value in
I did a quick experiment of writing a large value for those pixels where the ray leaves the scene. Now you get these horrible edge artefacts because of the anti-aliasing filter. I don't think that is any better so we'll leave it as is. I don't think using the alpha channel is a too bad.
cheers,
Thomas
Just a clarification for interested readers. The Z-depth is a real depth value in
[0, +infinity). The pixels are white because they are clamped to 1.I did a quick experiment of writing a large value for those pixels where the ray leaves the scene. Now you get these horrible edge artefacts because of the anti-aliasing filter. I don't think that is any better so we'll leave it as is. I don't think using the alpha channel is a too bad.
cheers,
Thomas
In the parameters there is a 'Z-depth Max'. Maybe setting the escaping rays to this value would be reasonable? I think I understand what you're getting at, it's just a very 'unnatural' map that's messy. Far values should look like other far values, not close values. In fact maybe any escaping rays don't output their actual distance, and instead just return an RGB value of (255,255,255)
(On a side note, can we maybe move this thread to General Discussion?)
(On a side note, can we maybe move this thread to General Discussion?)
GTX 1080Ti 11GB (3x), Water-cooled
Intel i7-5820K 6-core @ 3.3GHz
Windows 10 Pro 64-bit, 32GB RAM
Intel i7-5820K 6-core @ 3.3GHz
Windows 10 Pro 64-bit, 32GB RAM
