Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: RobH2 on 2018-07-27, 18:17:28

Title: Need to render a mask that is behind glass
Post by: RobH2 on 2018-07-27, 18:17:28
I have an object behind glass. I need to render a mask of it. The transparent material obscures the mask and if I render the mask with the glass turned off, the mask is not in the correct location due to refraction.

How can it pull a mask from something behind glass while leaving the glass enabled?
Title: Re: Need to render a mask that is behind glass
Post by: Frood on 2018-07-27, 18:45:03
Currently you can't. Simply that. Vote for

"Refraction/Reflection working with masking render elements (CMasking_Mask,CTexmap, etc...)"

here:

https://forum.corona-renderer.com/index.php?topic=96.0

if you need it desperately.


Good Luck



Title: Re: Need to render a mask that is behind glass
Post by: RobH2 on 2018-07-27, 18:58:07
Good enough. I'll vote.

Well, we all think that everything we need is "desperate" don't we...lol...? I'll render the mask in VRay I guess. I think it can do it.

Thanks for the fast response.
Title: Re: Need to render a mask that is behind glass
Post by: iancamarillo on 2018-07-27, 23:38:43
or hide the glass and re render only masks. I dreaded this workflow but surprisingly was very fast for an animation I did
Title: Re: Need to render a mask that is behind glass
Post by: Frood on 2018-07-31, 18:59:15
You don't get a refractive mask doing so. Depending on the (glass) object you only get some approximation but usually just a wrong mask.


Good Luck



Title: Re: Need to render a mask that is behind glass
Post by: iancamarillo on 2018-07-31, 19:16:11
yes sorry, I misread the initial post
Title: Re: Need to render a mask that is behind glass
Post by: pokoy on 2018-07-31, 20:18:15
Smartass alert here but can't you disable all lights, set the glass reflection to zero, set the object that you need a mask of to self illumination 1/white and render that? Not a direct solution but maybe a viable workaround.
Title: Re: Need to render a mask that is behind glass
Post by: Frood on 2018-07-31, 20:48:05
Interesting hack! Now we have shadowcatcher workaround for opacity masks and self illu for refraction - and a horrible workflow :) But for that one mask quickly needed, why not.


Good Luck




Title: Re: Need to render a mask that is behind glass
Post by: pokoy on 2018-07-31, 21:06:22
Yeah it's not very elegant but will probably work, I've used this setup on a few occasions. Forgot to specify that you'd probably need to use a LightMtl because you need to make the object not emit any light.

If you need the mask for reflections too you need to keep reflections enabled for the glass material. 
Title: Re: Need to render a mask that is behind glass
Post by: iancamarillo on 2018-07-31, 21:59:32
nice!
Title: Re: Need to render a mask that is behind glass
Post by: actrask on 2018-09-19, 19:28:10
I just had to do a similar trick that pokoy used. Put a Rayswitcher on the object behind the glass and have only the 'refract override' set to a self illuminated RG or B color. This will stop the self-illum from kicking out any GI. Put a flat black material on everything except the glass and refracted object. I'd save a scene state before doing this.

Aside from all that, is it really that hard to implement this or is it just not a high priority?


Title: Re: Need to render a mask that is behind glass
Post by: julienbe on 2019-07-13, 15:56:48
Same problem for me here.
I'm working on a commercial with a fish in an aquarium. It is practically impossible to use the render elements for post-production because of the refraction of the aquarium glass.

JULIEN
Title: Re: Need to render a mask that is behind glass
Post by: actrask on 2019-07-15, 19:02:49
What if you set the aquarium glass object to "not visible to camera"?
Title: Re: Need to render a mask that is behind glass
Post by: bluesarchitecture on 2019-07-26, 11:07:00
i found this...

dont know if it helps.

https://coronarenderer.freshdesk.com/support/solutions/articles/5000529357-how-to-make-an-object-invisible-in-masks-render-elements-
Title: Re: Need to render a mask that is behind glass
Post by: actrask on 2019-07-26, 16:45:45
Wow, I never knew about that. Thank you!
Title: Re: Need to render a mask that is behind glass
Post by: maru on 2019-07-29, 11:11:50
i found this...

dont know if it helps.

https://coronarenderer.freshdesk.com/support/solutions/articles/5000529357-how-to-make-an-object-invisible-in-masks-render-elements-

Wow, I never knew about that. Thank you!

That still won't allow you to render a mask which is affected by refraction.
We have this logged in our internal tracker as one of the top 10 feature requests from the users.
(internal id=291805959)
Title: Re: Need to render a mask that is behind glass
Post by: Nate101 on 2019-09-18, 19:29:05
Coming up against this limitation of Corona right now, albeit with reflections instead of refractions.  This is really a killer for me given the way I'm using Corona.  I know this has been asked for for years, any chance we'll see this implemented soon?  I'm trying to figure out workarounds so I don't have to switch to Vray.
Title: Re: Need to render a mask that is behind glass
Post by: RobH2 on 2019-10-14, 22:09:43
I have to say, "Wow" on this too. I've been trying for a year to find a way to render masks behind glass and decided to read today to see if anyone ever solved it in a manner that didn't take too may extra contortions. I don't know when this switch showed up but "Visible in masks" is my new BFF.