Author Topic: Getting reflection depth for planar mirrors  (Read 1099 times)

2021-08-12, 14:09:24

genesys

  • Active Users
  • **
  • Posts: 16
    • View Profile
I would like to add some planar mirror objects with perfect reflectivity to a scene but instead of getting the distance to the mirror surface per pixel in the depth buffer, I would like to get the total depth of the reflection (ie. the distance the ray traveled from camera to mirror surface plus the distance from the mirror surface to the primary intersection of the reflection ray.
How can I do that?
« Last Edit: 2021-08-12, 14:21:34 by genesys »

2021-08-12, 16:38:11
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13622
  • Marcin
    • View Profile
Why do you need this? Can you share an example where this would be useful?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2021-08-12, 18:56:36
Reply #2

genesys

  • Active Users
  • **
  • Posts: 16
    • View Profile
I'm creating simulation data for machine learning and need exact reflection depths. But I think i figrued out how - seems using propagate masks this should be possible https://coronarenderer.freshdesk.com/support/solutions/articles/12000066916-how-to-use-masks-with-reflection-refraction