Coloring glass shader

Started by archonforest, January 07, 2015, 11:37:25 AM

Previous topic - Next topic

archonforest

It is possible to create a for example gold colored glass surface? Like to give a different color to the glass shader?
I tried all kind of possibilities but the color did not changed at all. Any ideas pls?
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

j meyer

Seems to be a bit more problematic nowadays with the new refractive
capabilities.That's what some quick tests suggest at least.
So best seems to be to do it like follows:for the glass shader make sure that
double sided is unchecked,then connect your glass shader to input 1 of a merge
shader and the defaultshader (or a surface layer or a constant colour etc) set to
the desired colour to the 2nd input of the merge shader,set the merge shaders
colour mix mode to multiply input by A's diff colour and render.
Most likely you will have to fine tune the colour hue to come closer to what you
want.

archonforest

Quote from: j meyer on January 07, 2015, 01:02:08 PM
Seems to be a bit more problematic nowadays with the new refractive
capabilities.That's what some quick tests suggest at least.
So best seems to be to do it like follows:for the glass shader make sure that
double sided is unchecked,then connect your glass shader to input 1 of a merge
shader and the defaultshader (or a surface layer or a constant colour etc) set to
the desired colour to the 2nd input of the merge shader,set the merge shaders
colour mix mode to multiply input by A's diff colour and render.
Most likely you will have to fine tune the colour hue to come closer to what you
want.
Danke fur tip :D I am on it...

Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

Oshyan

Do you want to color the glass "surface", so to speak, or the volume (interior)? What kind of object are you applying the shader to, a "thick" one (like an ice block or a crystal), or a "thin" one (like a window)? For interior (volume), you can just use the Decay Tint and Decay Distance, for a clear, colored crystal-like effect, or Volume Color and Volume Density.

- Oshyan

archonforest

Quote from: Oshyan on January 07, 2015, 04:53:26 PM
Do you want to color the glass "surface", so to speak, or the volume (interior)? What kind of object are you applying the shader to, a "thick" one (like an ice block or a crystal), or a "thin" one (like a window)? For interior (volume), you can just use the Decay Tint and Decay Distance, for a clear, colored crystal-like effect, or Volume Color and Volume Density.

- Oshyan
It is an object that was made in PS. There was a flat image and I extrude it and saved it as an .obj in PS. Then I imported into TG and replaced the surface shader with the glassy one. It is a relatively thin. Not like a window but thin. I try to color the volume. Like the logo should look like gold crystal/glass or something similar.
The idea of j meyer works to some degree...I got some colors but it is week? The background is blue sky and blue ocean and that amount of blue kinda kills all the colors I made. What kind of numbers should I set for the tint and decay?
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

archonforest

There is something odd here. See attached pix. I zoomed in onto the logo and did a render. TG did not rendered the water shader that is behind the glassy part. ???
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

russe166

Hi!

Try to set the 'Ray detail multiplier' from 0,25 to 1. You can find it in the 'Render subdiv settings' (klick the little cross on the Render node)


archonforest

Quote from: russe166 on January 08, 2015, 06:21:45 AM
Hi!

Try to set the 'Ray detail multiplier' from 0,25 to 1. You can find it in the 'Render subdiv settings' (klick the little cross on the Render node)
Thx for the tip. I tried with "1" but changed nothing really on the render.
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

russe166

Oh! I have no idea :(
I've attached an example file and maybe someone else knows the answer?

archonforest

Thanks. yours looks better...hmmm...i will download your file an see what is the difference here...
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

j meyer

Oshyan - the volume color and density do behave a bit strange compared
             to the pre-glass shader era.At least with TG's cube and sphere.

archonforest

Btw jm your idea actually works. I played around with the settings and got some gold-yellow colored glassy surface. I am fine tuning the color now...hope the client will be happy with it ::)
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

j meyer


Oshyan

j meyer, have you tested this with exact same settings/scene in 3.2 and previous versions(s)? What exactly are the differences you're seeing?

- Oshyan

j meyer

No,not the exact same settings/scene,not yet.
The effect I saw is hard to describe.
Will do some more tests tonight and then post images.