Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: genesys on 2021-08-20, 19:21:01

Title: [solved]propagate masks for CGeometryZdepth in reflection returns wrong distance
Post by: genesys on 2021-08-20, 19:21:01
When using propagate masks for CGeometry_Zdepth with reflection, the returned distance is the distance from the reflecting surface (i.e. the mirror) to the reflected surface (whatever is reflected).

This however isn't a useful value and unlikely the value people using this feature are interested in.

What you really want to return is distance from camera to reflecting surface plus distance from reflecting surface to reflected surface, since that's the value you need if you for example want to correctly render depth-of-field effects in reflections (in the same way as you want distance from camera to refractive surface plus distance from refractive surface to refracted surface in order to properly render depth-of-field for objects behind windows)
Title: Re: propagate masks for CGeometry_Zdepth in reflection returns wrong distance
Post by: GeorgeK on 2021-08-25, 13:35:03
When using propagate masks for CGeometry_Zdepth with reflection, the returned distance is the distance from the reflecting surface (i.e. the mirror) to the reflected surface (whatever is reflected).

This however isn't a useful value and unlikely the value people using this feature are interested in.

What you really want to return is distance from camera to reflecting surface plus distance from reflecting surface to reflected surface, since that's the value you need if you for example want to correctly render depth-of-field effects in reflections (in the same way as you want distance from camera to refractive surface plus distance from refractive surface to refracted surface in order to properly render depth-of-field for objects behind windows)

Thanks for reporting this, we already have it logged for further assessment, please stay tuned for updates. 

(Report ID=CRMAX-903)
Title: Re: propagate masks for CGeometry_Zdepth in reflection returns wrong distance
Post by: maru on 2022-02-08, 13:37:15
This is fixed, and the updated version of Corona will be available soon!
(the reflection will appear correctly in the Z-Depth pass - just as if actual geometry was placed in the same distance from the camera as the reflection)