this is a problem i have had for some time. i can not seem to get my glass to render the refraction into the alpha channel. i don’t think refraction is the technical correct word for it, but it is the word that vray seems to use for making glass transparent or not opaque.
anyway, how do i get this to render into the alpha channel?
..i am using vray glass, using the settings that Natty posted a long time ago. i have tried checking ‘effect alpha’, i have tried making it ‘double sided’, i have tried making it ‘reflect on back’. …none of these seem to work.
the only thing i can think of is that i need to somehow use the ‘g-buffer’ output channels to do this, rather than relying on max’s default alpha output to pick this up.
checking ‘affect alpha’ should do it. BUT, thats only if you dont have any geometry behind the glass thats occlusing the environment. Then its own alpha ruins it.
ok. the part that i am trying to get to render into the alpha channel is cropped below. it is a walkway, that has a pane of glass on each side. does another layer of glass equal geometry that would keep it from effecting the alpha channel?
in my head, i would think that if both have transparency values (both are the same glass material), then they would still effect the alpha.
basically.. i am dropping in the sky post process, and i need to have the sky show through the 2 layers of glass. i could photoshop in the sky through the layers of glass, but in theory i should be able to render it into the alpha channel.
_____________________________
image, without sky dropped in (blue color is just part of the sky dome, which is set not to render).
alpha channel of the image. notice the area where you are looking through the walkway is solid white, rather than a shade of gray, creating some level of transparency.
…and my glass setting, if anyone wants to spend the time to screw with them.
..well, it was my skydome causing the problems. originally i had tried it woithout the skydome, but that was before i checked ‘effect alpha’ in the material setting of the glass.
i tried to set the alpha contribution to -1, but that didn’t seem to work. i will probably wind up rendering 2 passes to get the alpha channel i need, and still keep the scene looking the way i want.
Just go to Render\System\Objects Settings and set the Alpha Contribution to whatever you want (0-1).
0= fully transparent and 1= fully opake.
Unfortunatelly it’s not this simple:
One would expect that value of 0.5 would give you an RGB alpha value of 128 but it does not. The value it returns iz 191 (which is roughly 50% more). I haven’t got time to fully investigate why is this happening but Vlado (in whom we trust) might shed some light on it.
In the mean time use a bit of math. I usuelly use a value of 0.2-0.3
This parameter should, probably, be linked to refraction value in Materials dialog!
BTW all this is for Vray material. Standard material returns correct alpha.
the alpha contribuition is used normally to create mattes and you should use a value of -1.
a value of 0 to 1 makes the object see the others behind so it would act as a transparency effect on a refraction (that doesn’t affect the alpha). but if you use a simple standard material you don’t need to get all this mess.