- Tue Jun 06, 2006 5:27 am
#159274
This is by no means THE glass, just some general suggestions. You can always alter the parameters like transmission, reflectance to get different looks.
First version:

Settings:

Going through the settings:
Reflectance (0°)
I decided I want very reflective glass so I set this pretty high, 218. This is actually too high, if you compare with one of the glass ior files (bk7 for example) it's reflectance would be much less than 218, perhaps around 80.
Reflectance (90°)
I left this at default white since I don't want tinted reflections at grazing angles. Usually only metals tint the reflection to their own color.
Transmittance
This controls the color and also the intensity of light rays passing through the glass. If you leave it at black it's as if the material is opaque.
Transmittance is a pretty sensitive parameter so change values in small increments.
Note: If ND is set to 1 and transmittance is set to 255, than the clipmapping feature will kick in.
Attenuation distance
Controls how far a light ray can move through an object before losing half it's energy. If you set this parameter very low, no light will actually pass through to the other side which gives transparency. I set it to 2cm since I thought it would be a "normal" setting for the usual glass. Think that you are shining a light through a glass panel 2cm thick, the light will lose a lot of it's initial energy passing through all that glass.
It's important to understand the attenuation distance works together with the transmittance. For example you can set transmittance to a very saturated blue, but if you set the attenuation distance at 999M and the glass panel in your scene is only 3mm thick, then the light rays passing through it will not have time to become tainted with blue. You will get completely colorless glass.
ND
Controls amount of light refraction. Here I set a typical of 1.55. Denser glass would have a bit higher nd, like 1.63.
Roughness
I didn't want any frosted glass, so I set roughness at 0, completely smooth glass.
Now changing only the transmittance from 200 to 100, we get a more "smoky" glass look:

Lowering the transmittance even more, to only 20, the glass looks much darker overall, that is the thickness of the glass bottle doesn't matter too much, all of it looks darker:

What if instead of setting the transmittance 10x less (from value 200 to 20), we lower instead the attenuation distance 10x (from 2cm to 2mm)?
Attenuation 2mm:

The glass looks brighter, except the parts which are thicker, they look slightly more solid. This is because this particular model has a very small thickness and even a 2mm attenuation distance will still make it transparent. So if you wanted this model to look like tainted glass, it would be difficult to do that only lowering the attenuation distance, you would also have to make the transmittance color pretty saturated and not too bright. The next glass shows this:

This is a 2 bsdf glass, with a weightmap controlling the influence of each bsdf.
The settings and weightmap:

The glass object was simply mapped with a flat projector.
The weightmap was inverted for the other bsdf layer.
You can see the transmittance color for both bsdf's is pretty dark, so this thin object can still look tainted. One bsdf has the attenuation distance at 2mm, the other at 1cm. As mentioned above, having the attenuation distance smaller will make the glass tint "faster".
You can ofcourse have different nd for the two glass materials.
First version:

Settings:

Going through the settings:
Reflectance (0°)
I decided I want very reflective glass so I set this pretty high, 218. This is actually too high, if you compare with one of the glass ior files (bk7 for example) it's reflectance would be much less than 218, perhaps around 80.
Reflectance (90°)
I left this at default white since I don't want tinted reflections at grazing angles. Usually only metals tint the reflection to their own color.
Transmittance
This controls the color and also the intensity of light rays passing through the glass. If you leave it at black it's as if the material is opaque.
Transmittance is a pretty sensitive parameter so change values in small increments.
Note: If ND is set to 1 and transmittance is set to 255, than the clipmapping feature will kick in.
Attenuation distance
Controls how far a light ray can move through an object before losing half it's energy. If you set this parameter very low, no light will actually pass through to the other side which gives transparency. I set it to 2cm since I thought it would be a "normal" setting for the usual glass. Think that you are shining a light through a glass panel 2cm thick, the light will lose a lot of it's initial energy passing through all that glass.
It's important to understand the attenuation distance works together with the transmittance. For example you can set transmittance to a very saturated blue, but if you set the attenuation distance at 999M and the glass panel in your scene is only 3mm thick, then the light rays passing through it will not have time to become tainted with blue. You will get completely colorless glass.
ND
Controls amount of light refraction. Here I set a typical of 1.55. Denser glass would have a bit higher nd, like 1.63.
Roughness
I didn't want any frosted glass, so I set roughness at 0, completely smooth glass.
Now changing only the transmittance from 200 to 100, we get a more "smoky" glass look:

Lowering the transmittance even more, to only 20, the glass looks much darker overall, that is the thickness of the glass bottle doesn't matter too much, all of it looks darker:

What if instead of setting the transmittance 10x less (from value 200 to 20), we lower instead the attenuation distance 10x (from 2cm to 2mm)?
Attenuation 2mm:

The glass looks brighter, except the parts which are thicker, they look slightly more solid. This is because this particular model has a very small thickness and even a 2mm attenuation distance will still make it transparent. So if you wanted this model to look like tainted glass, it would be difficult to do that only lowering the attenuation distance, you would also have to make the transmittance color pretty saturated and not too bright. The next glass shows this:

This is a 2 bsdf glass, with a weightmap controlling the influence of each bsdf.
The settings and weightmap:

The glass object was simply mapped with a flat projector.
The weightmap was inverted for the other bsdf layer.
You can see the transmittance color for both bsdf's is pretty dark, so this thin object can still look tainted. One bsdf has the attenuation distance at 2mm, the other at 1cm. As mentioned above, having the attenuation distance smaller will make the glass tint "faster".
You can ofcourse have different nd for the two glass materials.
Last edited by Mihai on Tue Jun 06, 2006 6:09 am, edited 2 times in total.
Maxwellzone.com - tutorials, training and other goodies related to Maxwell Render
Youtube Maxwell channel
Youtube Maxwell channel