Glass Shader

Started by Matt, November 25, 2014, 11:04:39 PM

Previous topic - Next topic

PabloMack

Will the new glass shader do "stained glass"? That is to say, is Matt telling us that the glass can be colored and translucent? I suppose glass with surface relief is a given after applying a sort of displacement shader.

Oshyan

The existing water shader can already be colored. You can even color it by a color function (Volume 1 Color Function input on the Water Shader). So yes. :D

- Oshyan

TheBadger

Quote from: Matt on November 26, 2014, 05:34:45 PM
Quote from: TheBadger on November 26, 2014, 02:44:35 PM
Very nice bit of news!

What does the render look like form inside the glasses looking out? And does any change need to be made to settings, or can you move the camera in and outside with out making any changes and still get a proper look?

Do you mean as if it's embedded in the glass material? It should still render the refraction correctly as long as the object normals are correct, but it won't render the internal volume density or decay (attenuation according to Beer's law) which only work when the camera is looking into the object from the outside.

Matt

Hi and thanks,

I meant if I took your TGD as is, and just moved the camera inside the open area of the glass (where liquid would be), and hit render, would it work the same as looking through it as from the out side? or do you have to make changes to the glass shader settings?

Because before I had to make changes to the "glass" when rendering from inside V outside, As in this thread:
http://www.planetside.co.uk/forums/index.php/topic,15003.30.html

But from the looks of your image, it looks like a real change/fix. So just wanted to ask.
It has been eaten.

Matt

#18
It all depends on the object. These glass models have thickness modeled into them, so putting the camera where the liquid would be it's still on the "outside" of the glass. With polygon models the renderer has to guess what's "inside" and "outside" by looking at the normals. If you just have a plane and you move the camera to the other side of the plane, then you're on the "inside". But the Glass Shader has a checkbox for that situation so it can treat it as though it's still on the outside.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

PabloMack

I just discovered that Terragen also seems to ignore the transparency parameter(s) in the MTL file for an OBJ that is read in with the OBJ reader. I just manually turned down the opacity value (seems to be always initialized to 100%) in the shader that the Terragen OBJ reader created for a surface described in the MTL file that is supposed to be glass . Once I did this the surface became transparent when rendered. So, apparently, transparency does work at least sometimes in Terragen. But I think the OBJ reader needs to be worked on so that it reads and stores the parameters taken from the MTL file and used to initialize the appropriate values in the shader nodes created for the object's surfaces.

Later....
I just tried 50% opacity and it seems to render as though it were 100% opaque so transparency doesn't work in all cases.

Dune

It's not really transparency (as in glass) that is in the opacity tab, it's just on and off (invisible), and not gradual, so 49% will still be off and 51% be on.

Henrik

Will there be support for ACES in v3.2?
ASUS P8Z68-V PRO/GEN3, Socket-1155|I7 2600K(4.7GHz)|GTX970|GTX580|16GBRAM|C4D|FORMZ|Realflow|Maxwel|Octane|

PabloMack

#22
Quote from: Dune on November 27, 2014, 02:55:37 AMIt's not really transparency (as in glass) that is in the opacity tab, it's just on and off (invisible), and not gradual, so 49% will still be off and 51% be on.

Thanks. That's pretty much what I observed. It's rounding up which makes sense since 50% or greater in fixed-point binary is "0.1####..." and 49.9999% is "0.0####...".

PabloMack

After trying to get transparency by creating a texture with Alpha channel it looks like TG handles that the same way as Opacity (all or none). Seems I'll be waiting on the Glass Shader that Matt is working on unless I can get the Water Shader working for me.

j meyer

The usual workaround is connecting the water shader to the child
input of a surface layer and mask that surface layer,thus you can
fake some sort of greyscale opacity.A search might help,too.

bobbystahr

Quote from: PabloMack on November 27, 2014, 12:32:47 PM
After trying to get transparency by creating a texture with Alpha channel it looks like TG handles that the same way as Opacity (all or none). Seems I'll be waiting on the Glass Shader that Matt is working on unless I can get the Water Shader working for me.

Try this thread:
http://www.planetside.co.uk/forums/index.php/topic,18342.msg178034.html#msg178034
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Oshyan

We have no immediate plans to support ACES. Terragen outputs to 16bit/channel EXR (48bit color) with floating point precision and no gamma applied. Thus you can apply any color conversion you would like in post processing/compositing/etc.

- Oshyan

Henry Blewer

This will come in handy. Thank you!
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

rcallicotte

Just seeing this. Late for the train. +1!
So this is Disney World.  Can we live here?

otakar

Having some fun with the new shader. But I have a question. The light seems to have a hard time propagating through the glass. Is there some parameter that governs it? I have decay distance set to 150.