z-depth element not rendering when anti-aliasing disabled

z-depth element not rendering when anti-aliasing disabled

futengda
Enthusiast Enthusiast
198 Views
0 Replies
Message 1 of 1

z-depth element not rendering when anti-aliasing disabled

futengda
Enthusiast
Enthusiast

This issue comes from the 3ds Max forum board, link. It should be a programming-related issue, so it has been moved here. The original description is: 

 

I need to use the texture obtained from the z-depth renderElement for depth testing to perform some occlusion culling. For extreme cases, such as when the model is particularly small and occupies only a few pixels in the z-depth map, if anti-aliasing is enabled, its grayscale value will be "polluted," making it hard to make correct judgments. However, the problem is, when I try to turn off anti-aliasing, the z-depth simply does not render at all? 

 

I'm using Max 2023.3.4

 

futengda_0-1721729145232.gif

 

But actually, I found that even using the Render API to render the z-depth render element, this issue still exists.

 

render camera:MyCam outputsize:[512,512] channels:#(#zDepth) \
    renderElements:true renderElementBitmaps:&reb renderhiddenobjects:false vfb:off  \
    antiAliasing:false -- !!!NOTE: this will make the depthmap completely black

 

 

So, I believe this issue is common and unrelated to whether it's through the GUI or a script.

 

For now, based on the current situation, the only solution for me at the moment is to increase the resolution of the output size.

0 Likes
199 Views
0 Replies
Replies (0)