Author Topic: [solved]propagate masks for CGeometryZdepth in reflection returns wrong distance  (Read 2070 times)

2021-08-20, 19:21:01

genesys

  • Active Users
  • **
  • Posts: 16
    • View Profile
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)
« Last Edit: 2023-02-17, 10:26:03 by NazarVitkovskyi »

2021-08-25, 13:35:03
Reply #1

GeorgeK

  • Corona Team
  • Active Users
  • ****
  • Posts: 838
  • George
    • View Profile
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)
George Karampelas | chaos-corona.com
Chaos Corona QA Specialist | contact us

2022-02-08, 13:37:15
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12813
  • Marcin
    • View Profile
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)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us