Author Topic: Coloring glass shader  (Read 6246 times)

Offline archonforest

  • Member
  • *
  • Posts: 3987
  • !AMIGA RULEZ!
Re: Coloring glass shader
« Reply #30 on: January 11, 2015, 05:27:38 PM »
Quote
The 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!
« Last Edit: January 11, 2015, 05:43:00 PM by archonforest »
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram
Amiga 1200 8Mb ram, 8Gb ssd

Online Matt

  • Planetside Staff
  • *
  • Posts: 3552
  • I'm the crazy one
Re: Coloring glass shader
« Reply #31 on: January 11, 2015, 09:26:16 PM »
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
« Last Edit: January 11, 2015, 09:34:10 PM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.

Online Matt

  • Planetside Staff
  • *
  • Posts: 3552
  • I'm the crazy one
Re: Coloring glass shader
« Reply #32 on: January 11, 2015, 09:38:35 PM »
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.

(Attachment Link)

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
« Last Edit: January 11, 2015, 09:47:09 PM by Matt »
Just because milk is white doesn't mean that clouds are made of milk.

Offline j meyer

  • Member
  • *
  • Posts: 2157
    • orkwarts
Re: Coloring glass shader
« Reply #33 on: January 12, 2015, 04:21:46 PM »
Quote
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?

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.

Quote
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.

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

Quote
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.

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.




« Last Edit: January 12, 2015, 05:05:58 PM by j meyer »

Offline j meyer

  • Member
  • *
  • Posts: 2157
    • orkwarts
Re: Coloring glass shader
« Reply #34 on: January 12, 2015, 04:38:34 PM »
Quote
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.

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.

Offline j meyer

  • Member
  • *
  • Posts: 2157
    • orkwarts
Re: Coloring glass shader
« Reply #35 on: January 12, 2015, 09:26:12 PM »
Indeed the inscription of the comparison image was wrong.
Here is the corrected version.

54609-0

The corrected version should be sufficient enough to explain this:
Quote
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?

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.

54611-1

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.

Online Matt

  • Planetside Staff
  • *
  • Posts: 3552
  • I'm the crazy one
Re: Coloring glass shader
« Reply #36 on: January 14, 2015, 04:36:27 AM »
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.

Offline j meyer

  • Member
  • *
  • Posts: 2157
    • orkwarts
Re: Coloring glass shader
« Reply #37 on: January 14, 2015, 04:43:23 PM »
Thank you for making me aware of my mistake.

Offline bobbystahr

  • Member
  • *
  • Posts: 10348
  • Turn, and face the Strange Ch Ch Changes...D Bowie
Re: Coloring glass shader
« Reply #38 on: January 14, 2015, 08:52:11 PM »
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