Author Topic: Alpha channel from mirror reflection  (Read 621 times)

2025-02-04, 05:52:28

lyn95

  • Active Users
  • **
  • Posts: 8
    • View Profile
Hi guys, does anyone know how to get alpha channel from mirror reflection? Or saving a render as a .png file and retaining the window's transparency in the mirror?

I read a post about a similar problem here:
https://forum.corona-renderer.com/index.php?topic=39199.0
but I still couldn't figure it out. Propagate Masks didn't work for me.

Here I have a sample scene of a window and a mirror. I will be saving this render as a .png file so I can insert my own background outside the window, but I am unable to do so with the mirror reflection. Can anyone help me? :) Thank you so much.

2025-02-04, 09:29:55
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13376
  • Marcin
    • View Profile
Yes, mask propagation should do the trick: https://support.chaos.com/hc/en-us/articles/4528327507729
If you cannot get it to work as expected, please post your results.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-02-04, 11:15:24
Reply #2

lyn95

  • Active Users
  • **
  • Posts: 8
    • View Profile
Here's what I did. I changed the "Propagate Masks" to "Always" for the clear window glass material and the mirror material. But the alpha is still not showing in the mirror reflection. Am I doing something wrong? I tried "Through Reflection" and "Through Refraction" options as well but nothing changed either.
« Last Edit: 2025-02-04, 11:22:52 by lyn95 »

2025-02-04, 14:20:54
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13376
  • Marcin
    • View Profile
Turns out this doesn't work for alpha and unfortunately it's due to technical reasons. It works for CMasking_ elements though. You can use CMasking_Mask to get a black and white mask.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-02-05, 02:52:17
Reply #4

lyn95

  • Active Users
  • **
  • Posts: 8
    • View Profile
Hi, I tried adding a CMasking_Map render element and going to Interactive Render to try it out, but it's showing just a black screen. Is there a step I missed?

2025-02-05, 08:40:51
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13376
  • Marcin
    • View Profile
Did you include any objects in the CMasking render element settings?
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-02-05, 09:41:22
Reply #6

lyn95

  • Active Users
  • **
  • Posts: 8
    • View Profile
I tried using CMasking_ID and it worked :) CMasking_Mask still shows a black screen though. Just curious, how do I "include objects in the CMasking render element settings"? Maybe I can get the CMasking_Mask to work that way.

2025-02-05, 10:04:59
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13376
  • Marcin
    • View Profile
Like this:
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-02-05, 10:23:20
Reply #8

lyn95

  • Active Users
  • **
  • Posts: 8
    • View Profile
Ah okay :) I tried including the glass and mirror only and the result turned out weird, so I selected everything in the scene and included them (don't know if that's the right way to do it?) and it worked! Thank you very much.

2025-02-05, 10:34:29
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13376
  • Marcin
    • View Profile
Yes, this should be the correct method in this case.
You can also click on the include button, select "exclude" and not any objects to the list. This can be sometimes more convenient than adding ALL scene objects to the include list.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-02-05, 11:17:24
Reply #10

lyn95

  • Active Users
  • **
  • Posts: 8
    • View Profile
Thank you for the helpful tips! That would be very useful in larger scenes with lots of objects :)