Glass

Started by MGebhart, May 21, 2010, 05:50:46 PM

Previous topic - Next topic

airflamesred

 I was under the impresion Vyacheslav was refering to opacity.
Marc's tgc works great

AndyWelder

#106
Some of you may have noticed I'm recently exploring "glass". Not glass spheres but glass planes. I attach a water shader to the surface of a plane, up "Transparency" and "Decay distance" to the max and set all the wave settings to zero. The result is something that looks and works as a glass pane would.http://forums.planetside.co.uk/index.php?topic=11822.0
Today, while working on a new render I flipped some of the planes by accident and I noticed something odd: Instead of acting like a glass pane (being transparent, with the background shining through and some reflections), the planes acted as mirrors.... the planes went invisible though they do cast shadows. And though invisible in the image, during the render pass there was a slight indication of the planes but this disappeared in the finished render.
I did change the values for the coordinates of the edge vectors: Edge vector a was 1/0/0 and became 0/1/0, edge vector b was  0/1/0 and became 1/0/0.
Could it be that, because planes (and spheres surfaces also) are infinite thin, TG is having difficulties putting the attached surface shaders on the "right" side of the surfaces? Maybe I'm talking utter BS now but when it comes down to the technical details I'm an absolute layman.
I'll do some more testing tomorrow.

Another thought: Testing glass material on a sphere makes things complicated because after all a sphere will make light bounce internally, a plane does not have this behaviour but will act as a infinite thin glass pane.

Here are the results: The image names reflect the vector positions of the planes.
"Ik rotzooi maar wat aan" Karel Appel

AndyWelder

And another test, for completeness sake, shows the visibility depends on the POV: If the camera moves to the other side of the visible plane the plane becomes invisible. Hmmm...
"Ik rotzooi maar wat aan" Karel Appel

jo

Hi Andy,

Quote from: AndyWelder on March 06, 2011, 05:30:04 AM
And another test, for completeness sake, shows the visibility depends on the POV: If the camera moves to the other side of the visible plane the plane becomes invisible. Hmmm...

Planes are only visible from the front.

Regards,

Jo

AndyWelder

QuotePlanes are only visible from the front
:-[ Didn't know that. Why didn't I know this...? :'( So that's why flipping the vector coordinates made the plane invisible: Instead of looking at the front the camera was looking at the back! Bloody infinite thinness!
Sorry for waisting your time.
"Ik rotzooi maar wat aan" Karel Appel

Kadri

Quote from: AndyWelder on March 06, 2011, 07:50:08 AM
QuotePlanes are only visible from the front
:-[ Didn't know that. ...

Many 3D renderers act in this way. There are options to make planes  one or two-double sided mostly.
It is not a TG2 thing only AndyWelder .

Vyacheslav

Pledged video ,on creation glass from Reflective shader.Glass.avi  (2 mb) -  2 minutes and glass ready.

http://depositfiles.com/ru/files/kb17ocmhg  (glass.avi)

dandelO

#112
Sorry, porn is all I seem to have the rights to download from that link. :(
:o ;)
Night night, early bed time for me, I believe! :-X


* Rude! I apologize.

I finally got the download to work. It seems to be one of those wait-in-line affairs. Hopefully now I can get the reflective shader to work correctly...

bobbystahr

Quote from: Vyacheslav on March 08, 2011, 05:50:56 PM
Pledged video ,on creation glass from Reflective shader.Glass.avi  (2 mb) -  2 minutes and glass ready.

http://depositfiles.com/ru/files/kb17ocmhg  (glass.avi)

thank you Vyacheslav.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

dandelO

I watched the video and yes, it seems to be the same thing I was experiencing with the reflective shader. An arbitrary amount of reloads seems to make the transparency of a reflective shader work correctly. It's a shame that it has to be that way. Hopefully there will be some sort of fix for that at some point.