How to render glass objects separately (Corona renderer and V-Ray)


#1

I have big architectural scenes, some setup to render with V-Ray and some setup to render with Corona.

I’m looking for a solution for the following problem for each of these two renderers.

I need to have all transparent windows rendered separately, so that I have depth and color values for both, the window as well as whatever is behind the window.

Basically something such that if I compose Windowless_render + Window_only_render.rgb * window_only_render.alpha = original render

What’s the easiest way to separate opaque and glass windows into separate renderings, such that the glass windows still contain the proper reflections of the rest of the scene, but so that it only contains the pixels of the glass? (also, of some opaque object partially obstructs a window, then these pixels should be black in the window_only rendering).

What’s the easiest way to achieve this for V-Ray and Corona renderer? (if you know a solution for only one of these, that’s fine too)


#2

G-Buffer object ids / LAYERS

To set object id for your glass / house - right click on group / selection / object — object properties - G-Buffer Object ID (you can set it to whatever but dont set same id for objects that need to be rendered seperately).

Say your house has OBJECT ID set to 1
Your glass should be anything other than 1

Now go to your render setup then type in the object id you want to render -

In v-ray - you can find this in V-Ray section image sampler - render mask / object ID
In corona renderer - you can find it in the Scene section and then render selected / object ID

you can set a series of object / multiple ids as well to render together 1-100 is house and then 125 could be glass

In your case you need a glass and a house - so you will have to set these ids and render each time seperately… if you have 5 objects to render seperately… you will need to render 5 times seperately.

Just a tip -
Dont forget to clear frame buffer between seperate renders, if you are not rendering via network / render farm etc. etc.

OR

Layers - Just set objects to layers and choose layer instead of object id.


You could search for rendermask video tutorial for v-ray… it explains it all


Keep a copy of your scene / Try this out on a trial scene before you try any of it on your main scene

Good Luck!!