Coloring glass shader

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

Previous topic - Next topic

archonforest

#30
Quote from: Dune on January 11, 2015, 11:52:35 AM
QuoteThe only thing still puzzles me that why TG is not rendering the scene that is behind the glass...

It does doesn't it? I see stuff through the glass. But if you mean; why doesn't it render in high detail, then the answer is in the render subdivision settings (which are inside the render shader, and default at 0.25). Make it 1 and it's perfect, though takes longer to render.
Thx for your input. Yes it does but stays lo-res. I already tried to increase render subdiv to 1 but did not changed anything. I will crank it a bit now...

Update. Dune you were right. Tried again with 1 and it worked well. Not sure what was wrong yesterday when I tried with 1 but who cares as now all good!
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram, GTX 1080
Amiga 1200 8Mb ram, 8Gb ssd

Matt

#31
Quote from: j meyer on January 10, 2015, 11:33:33 AM
You'll notice that difference in the volume density values.That's because the
water shader has a range from 0 to 10 by default while the glass shader's
range goes from 0 to 1000.

The shaders have different slider ranges, but the strength of the volume density setting should be the same in each shader. I don't know why the 3 images on the 1st row appear to have the same density. It looks like the density setting isn't having any effect. Is there some reason you used 10x the density on the built-in objects versus the imported sphere? Could you repeat each of those 1st row tests with different values?

Quote
With double sided checked (which gives the same glass effect like the water
shader method) you can crank the value all the way up and won't see any
color.As you can see in row #2 the procedurals show some weird light blue
plane effect.

The volume density and decay distance aren't designed to be used when double-sided is enabled on the glass shader, because double-sided means the object has no volume. (If it were to render as a volume it would break its ability to render open surfaces as sheets of glass, which is the main reason for the double-side setting IMO.) I'll investigate the weird blue stuff on the built-in sphere and cube.

Quote
In row #3 the procedurals just show some grainy noise.

The volume settings don't work well with shadow-casting objects, I'm afraid. Since the object's surface is casting a shadow, the whole of the volume should be in shadow, but due to other things going on in the renderer some parts of the surface are picking up unshadowed light on the light-facing sides.

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

Matt

#32
Quote from: j meyer on January 10, 2015, 11:42:45 AM
One more thing I want to show although it has nothing to do with
coloring the glass shader.
This image depicts the reason for using the water shader in conjunction
with a reflective shader instead of using the water shader's reflection
feature.

[attach=1]

Hope you don't mind,but since it's related to glass effects in TG I
thought it's better here than making a new thread.

It looks to me like you want to tint the transparency, but not produce any refraction. You can use the Glass Shader and tint its transparency directly with the transparency colour. It doesn't change with depth like the decay and volume settings do, but you probably don't need it to if you're rendering a piece of glass that's thin enough not to produce refraction.

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

j meyer

#33
QuoteThe shaders have different slider ranges, but the strength of the volume density setting should be the same in each shader. I don't know why the 3 images on the 1st row appear to have the same density. It looks like the density setting isn't having any effect. Is there some reason you used 10x the density on the built-in objects versus the imported sphere? Could you repeat each of those 1st row tests with different values?

The reason I used 10x the density was that I wanted to have the same amount of color on the
procedurals and I naively thought that would be the right way,because 2.88906 was too weak
with the glass shader.And I even thought it was 100x the value btw.
And yes,I can and will repeat those with different values later today.

QuoteThe volume density and decay distance aren't designed to be used when double-sided is enabled on the glass shader, because double-sided means the object has no volume. (If it were to render as a volume it would break its ability to render open surfaces as sheets of glass, which is the main reason for the double-side setting IMO.) I'll investigate the weird blue stuff on the built-in sphere and cube.

That was done for demo-purposes solely.Especially as I told Oshyan I had observed something
weird going on.
Thanks for the explanation,though.

QuoteThe volume settings don't work well with shadow-casting objects, I'm afraid. Since the object's surface is casting a shadow, the whole of the volume should be in shadow, but due to other things going on in the renderer some parts of the surface are picking up unshadowed light on the light-facing sides.

Demo-purposes again.Seems to be related to what we saw earlier (TG2).The black spots.

Edit: just noticed that there might be a mistake in the inscription of the image.
        Will check that also.





j meyer

QuoteIt looks to me like you want to tint the transparency, but not produce any refraction. You can use the Glass Shader and tint its transparency directly with the transparency colour. It doesn't change with depth like the decay and volume settings do, but you probably don't need it to if you're rendering a piece of glass that's thin enough not to produce refraction.

That post was admittingly somewhat confusing maybe.
I wanted to show why it was better not to use the reflection features of the water shader to
mimic glass (windows and so on) in the pre glass shader era.
I ran into some issues long ago and then after a while forgot why I used the two shaders
instead of using the water shader's build in reflections,like some of the others did.
And these tests reminded me and so I rendered that example.
Also reminded me why to leave the refraction at 1 for the water shader,even when using
the additional refl shader.(anything goes black)

Sorry for being confusing,
and thanks again for your explanations.

j meyer

Indeed the inscription of the comparison image was wrong.
Here is the corrected version.

[attach=1]

The corrected version should be sufficient enough to explain this:
QuoteThe shaders have different slider ranges, but the strength of the volume density setting should be the same in each shader. I don't know why the 3 images on the 1st row appear to have the same density. It looks like the density setting isn't having any effect. Is there some reason you used 10x the density on the built-in objects versus the imported sphere? Could you repeat each of those 1st row tests with different values?

I think rendering the first row with different values is consequently not necessary anymore.

I did render all three objects with the glass shader,double sided unchecked and a volume
density of 2.88906,though.And of course you were right that it is not required to set it to
a value 10x or 100x stronger.
I was just assuming that,because of the different ranges of the sliders.

[attach=2]

The inscription was done after several hours of testing and deinstalling and reinstalling and I
got too tired obviously.
Again I'm sorry to have caused confusion.

Matt

No problem. Thanks for updating the annotations. That all makes sense now.

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

j meyer

Thank you for making me aware of my mistake.

bobbystahr

This thread is so polite it's almost Canadian, hee hee hee...and interesting as well
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist