User avatar
By Mihai
#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:

Image

Settings:

Image

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:

Image

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:

Image

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:
Image

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:

Image

This is a 2 bsdf glass, with a weightmap controlling the influence of each bsdf.

The settings and weightmap:

Image

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.
By jjs
#159278
Thanks for tutorial Mihai


- however some of your image links are broken

Jonathan
User avatar
By aitraaz
#159280
hmmm very nice the orange glass, the clear glass examples seem to be missing something. Good tutorial anyways....
By jespi
#159284
Thanks you very much Mihai :wink: . Very clear tutorial.
User avatar
By tom
#159286
Mihai wrote:Do not set it at 255 RGB since that kicks in the clip mapping feature.
Only if the Nd=1, otherwise 255 transmittance doesn't mean clipping. So, you don't need to worry about it for the glass. ;)
Thanks for this tutorial and clean renders, Mihai!

Note: Bumpmap blurs the bottom and with high reflectance this seems like a shiny topcoat color acryllic.
Last edited by tom on Tue Jun 06, 2006 6:04 am, edited 1 time in total.
By DELETED
#159287
DELETED
By samsam
#159306
Great stuff Mihai - thanks for this. :D
By vinys
#159352
Thanx :D !

- vinys
User avatar
By Hervé
#159354
very nice tutorial Mihai... good explanation.. :wink:
User avatar
By jotero
#159357
very nice work Mihai :)
but where the scene for testing :wink:

ciao
torolf
Sketchup 2025 Released

Thank you Fernando!!!!!!!!!!!!!!!!!!!!!!!!!!! hwol[…]

I've noticed that "export all" creates l[…]

hmmm can you elaborate a bit about the the use of […]

render engines and Maxwell

Funny, I think, that when I check CG sites they ar[…]