POV-Ray : Newsgroups : povray.binaries.images : Ambient and cast shadows on metallic textures Server Time
2 Dec 2021 15:26:43 EST (-0500)
  Ambient and cast shadows on metallic textures (Message 1 to 9 of 9)  
From: Cousin Ricky
Subject: Ambient and cast shadows on metallic textures
Date: 24 Nov 2021 22:14:50
Message: <619effaa@news.povray.org>
It has become conventional wisdom around here, perhaps started by
clipka, that metallic finishes should have zero ambient, and Alain has
been carrying that banner ever since.  I have been skeptical, however.

It seems to me that no cast shadow should be visible on a 100% specular
surface, and this is easily verified with a mirror or a chrome fixture.
What's more, I realized early on that, whatever the texture, the ambient
should be proportional to the diffuse component; therefore, a 100%
specular surface--which has a zero diffuse component--should of course
have zero ambient.

However, I have examined less shiny metallic surfaces, and they do
reveal faint cast shadows--the duller the surface, the more prominent
the shadow.  This implies the real-life equivalent of a 'diffuse'
component to these metals, and I do not see how a texture can have a
diffuse component without picking up diffuse environmental light--i.e.,
a non-zero ambient.

Reflection + diffuse should never exceed 1.0, so for a finish that is
mostly specular, keeping ambient proportional to diffuse ensures a very
low ambient.  But does this proportionality hold for metals?  Should the
ambient be zero regardless?  I have often treated 'diffuse' as a crude
proxy for blurred reflection--which does *not* imply a non-zero
ambient--but my observations of cast shadows show that there really is a
diffuse-equivalent in real life, perhaps due to dust, grime, or oxidation.

Image metal_ambient-pbi.jpg shows metal spheres with varying levels of
specular reflection, and a post used to cast a shadow on each sphere.
On each sphere, the 'diffuse' is calculated as half of what is not
specularly reflected.  For example, reflection { 1.00 metallic } has
diffuse 0, and reflection { 0.50 metallic } has diffuse 0.25.  The left
column sets ambient proportionately to the diffuse, and the right column
sets ambient to zero.  The middle column uses radiosity, and sets zero
ambient on all surfaces throughout the scene.

The radiosity cases are used as controls, to see how POV-Ray deals with
metallic surfaces with a diffuse component.  The shadows cast with
non-zero ambients (left) are better matches to the radiosity controls
than the shadows cast with zero ambients (right).  The same is true of
the reflected tiles.

(You may notice that the spheres also vary roughness with specular
reflection, but this is not at all relevant to the question of ambient &
diffuse.)

For completeness, I also decided to test whether cast shadows show up on
100% specular surfaces with blurred reflection.  Image
metal-blur-shade-pbi.jpg shows spheres with reflection { 1.00 metallic }
and varying levels of blurred reflection.  Cast shadows show only where
they interrupt the blurred highlight.  So, if POV-Ray's modeling is
accurate, this means that the dull metals I examined IRL should be
modeled with a small diffuse component--and per the previous test,
should have a correspondingly tiny ambient component.


Post a reply to this message


Attachments:
Download 'metal_ambient-pbi.jpg' (340 KB) Download 'metal-blur-shade-pbi.jpg' (154 KB)

Preview of image 'metal_ambient-pbi.jpg'
metal_ambient-pbi.jpg

Preview of image 'metal-blur-shade-pbi.jpg'
metal-blur-shade-pbi.jpg


 

From: Cousin Ricky
Subject: Re: Ambient and cast shadows on metallic textures
Date: 24 Nov 2021 22:22:23
Message: <619f016f@news.povray.org>
On 2021-11-24 11:14 PM (-4), Cousin Ricky wrote:
> It has become conventional wisdom around here, perhaps started by
> clipka, that metallic finishes should have zero ambient, and Alain has
> been carrying that banner ever since.  [...]
> 
> [snip]
> 
> However, I have examined less shiny metallic surfaces, and they do
> reveal faint cast shadows--the duller the surface, the more prominent
> the shadow.  This implies the real-life equivalent of a 'diffuse'
> component to these metals, and I do not see how a texture can have a
> diffuse component without picking up diffuse environmental light--i.e.,
> a non-zero ambient.

Since clipka has been posting about metallic finishes, over the years I
have been increasing the specular reflection and decreasing the diffuse
& ambient in my metallic textures.  This can be seen longitudally in
some of my Object Collection modules.  I am reconsidering the
AndroidRobot finish, though, for whenever Google next revises the robot;
I think the robot looks better semi-metallic.

For most metal surfaces, I'm finding this a good finish:

  finish
  { reflection { 0.9 metallic }
    diffuse 0.05
    ambient 0.05 * whatever_your_general_scene_ambient
    emission 0 // Suppresses 3.8's high ambient warning
    specular albedo 1 metallic
    roughness 0.0001 // or higher
  }

For polished surfaces:

  finish
  { reflection { 1 metallic }
    diffuse 0
    ambient 0
    specular albedo 1 metallic
    roughness 0.0001 // or lower
  }


Post a reply to this message


Attachments:
Download 'spec-androidrobot-pbi.jpg' (122 KB) Download 'spec-rc3metal-pbi.jpg' (118 KB) Download 'spec-roundedge-pbi.jpg' (111 KB)

Preview of image 'spec-androidrobot-pbi.jpg'
spec-androidrobot-pbi.jpg

Preview of image 'spec-rc3metal-pbi.jpg'
spec-rc3metal-pbi.jpg

Preview of image 'spec-roundedge-pbi.jpg'
spec-roundedge-pbi.jpg


 

From: Thomas de Groot
Subject: Re: Ambient and cast shadows on metallic textures
Date: 25 Nov 2021 02:33:36
Message: <619f3c50@news.povray.org>
Thanks for this.

There is a catch. The Clipka Grimoire tells us (1) to use high quality 
radiosity with metallic finishes, and (2) that ambient is/ disabled/ 
when using radiosity, from version 3.7 onwards.

I am no expert on this so I cannot really discuss this; I simply notify 
my info.

In the past, I bundled Clipka's comments on this matter in a couple of 
pdf's. I post them here for reference.

-- 
Thomas


Post a reply to this message


Attachments:
Download 'clipka_finish 1.pdf' (66 KB) Download 'clipka_finish 2.pdf' (235 KB)

From: Alain Martel
Subject: Re: Ambient and cast shadows on metallic textures
Date: 25 Nov 2021 12:06:43
Message: <619fc2a3$1@news.povray.org>
Le 2021-11-24 à 22:14, Cousin Ricky a écrit :
> It has become conventional wisdom around here, perhaps started by
> clipka, that metallic finishes should have zero ambient, and Alain has
> been carrying that banner ever since.  I have been skeptical, however.
> 

I came to the conclusion that metallic finishes should have zero ambient 
through my own experimentation. The metallic textures from the various 
includes looked just wrong to me. I started by commenting out the 
ambient. I got a massive improvement. Then, I tested with an explicit 
zero ambient and got the best, most realistic, result.

When I first posted about it, I was unaware of Clipka's position on that 
subject.

The metallic finishes from metals.inc have been made to look acceptable 
in an empty scene against a black background, and that's the only 
situation where they look somewhat correct.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Ambient and cast shadows on metallic textures
Date: 25 Nov 2021 13:28:04
Message: <619fd5b4$1@news.povray.org>
On 2021-11-25 3:33 AM (-4), Thomas de Groot wrote:
> Thanks for this.

You're welcome.

> There is a catch. The Clipka Grimoire tells us (1) to use high quality
> radiosity with metallic finishes, and (2) that ambient is/ disabled/
> when using radiosity, from version 3.7 onwards.

Naturally.  This post was intended primarily for non-radiosity scenes.
But an important co-issue of the ambient discussion is whether metallic
textures should have a diffuse component, and this is relevant whether
or not radiosity is used.

Of course, if you are using radiosity with 3.6.* or earlier, you should
explicitly set all ambients to zero.  If you have no glow-in-the-dark
objects, you can to this with global_settings { ambient_light 0 }.
Otherwise, you should use a #default statement, so that you can retain
the ability to set ambients on the glowing objects.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Ambient and cast shadows on metallic textures
Date: 25 Nov 2021 14:00:51
Message: <619fdd63$1@news.povray.org>
On 2021-11-25 1:06 PM (-4), Alain Martel wrote:
> 
> I came to the conclusion that metallic finishes should have zero ambient
> through my own experimentation. The metallic textures from the various
> includes looked just wrong to me.

Yes, they do look horrible!  My experiments with better metallic
textures began very soon after I downloaded POV-Ray.

> I started by commenting out the
> ambient. I got a massive improvement. Then, I tested with an explicit
> zero ambient and got the best, most realistic, result.

As I implied in the OP, I adopted the policy of reducing the ambient in
proportion to the diffuse, and wrote a macro to do this automatically.
Since a highly specular surface would have a low diffuse component, this
naturally leads to very low ambients.  But the ambients in metals.inc
are *way* out of proportion to the diffuse components!

> When I first posted about it, I was unaware of Clipka's position on that
> subject.
> 
> The metallic finishes from metals.inc have been made to look acceptable
> in an empty scene against a black background, and that's the only
> situation where they look somewhat correct.

Or, how about using a bright sky_sphere along with a large hollow black
sphere with no_reflection.  Our realistic low-ambient and no-ambient
metals will show up fine, no need for metals.inc's insane ambients.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Ambient and cast shadows on metallic textures
Date: 26 Nov 2021 02:14:37
Message: <61a0895d$1@news.povray.org>
Op 25/11/2021 om 19:28 schreef Cousin Ricky:
> On 2021-11-25 3:33 AM (-4), Thomas de Groot wrote:
>> Thanks for this.
> 
> You're welcome.
> 
>> There is a catch. The Clipka Grimoire tells us (1) to use high quality
>> radiosity with metallic finishes, and (2) that ambient is/ disabled/
>> when using radiosity, from version 3.7 onwards.
> 
> Naturally.  This post was intended primarily for non-radiosity scenes.
> But an important co-issue of the ambient discussion is whether metallic
> textures should have a diffuse component, and this is relevant whether
> or not radiosity is used.
> 
> Of course, if you are using radiosity with 3.6.* or earlier, you should
> explicitly set all ambients to zero.  If you have no glow-in-the-dark
> objects, you can to this with global_settings { ambient_light 0 }.
> Otherwise, you should use a #default statement, so that you can retain
> the ability to set ambients on the glowing objects.
> 
Very good. You have taken my worries away. :-)

Needless to say that I shall read (and apply) your stuff very carefully. 
Thanks again.

-- 
Thomas


Post a reply to this message

From: Thomas de Groot
Subject: Re: Ambient and cast shadows on metallic textures
Date: 26 Nov 2021 02:21:04
Message: <61a08ae0$1@news.povray.org>
Op 25/11/2021 om 20:00 schreef Cousin Ricky:
> On 2021-11-25 1:06 PM (-4), Alain Martel wrote:
>>
>> The metallic finishes from metals.inc have been made to look acceptable
>> in an empty scene against a black background, and that's the only
>> situation where they look somewhat correct.
> 
> Or, how about using a bright sky_sphere along with a large hollow black
> sphere with no_reflection.  Our realistic low-ambient and no-ambient
> metals will show up fine, no need for metals.inc's insane ambients.
> 

<hint> There is a task for you to correct the metals.inc content for the 
future users generations and, on a more serious note, for (future) 
downloads of the POV-Ray package. </hint> ;-)

-- 
Thomas


Post a reply to this message

From: Alain Martel
Subject: Re: Ambient and cast shadows on metallic textures
Date: 26 Nov 2021 13:02:13
Message: <61a12125$1@news.povray.org>
Le 2021-11-25 à 14:00, Cousin Ricky a écrit :
> On 2021-11-25 1:06 PM (-4), Alain Martel wrote:
>>
>> I came to the conclusion that metallic finishes should have zero ambient
>> through my own experimentation. The metallic textures from the various
>> includes looked just wrong to me.
> 
> Yes, they do look horrible!  My experiments with better metallic
> textures began very soon after I downloaded POV-Ray.
> 
>> I started by commenting out the
>> ambient. I got a massive improvement. Then, I tested with an explicit
>> zero ambient and got the best, most realistic, result.
> 
> As I implied in the OP, I adopted the policy of reducing the ambient in
> proportion to the diffuse, and wrote a macro to do this automatically.
> Since a highly specular surface would have a low diffuse component, this
> naturally leads to very low ambients.  But the ambients in metals.inc
> are *way* out of proportion to the diffuse components!
> 
>> When I first posted about it, I was unaware of Clipka's position on that
>> subject.
>>
>> The metallic finishes from metals.inc have been made to look acceptable
>> in an empty scene against a black background, and that's the only
>> situation where they look somewhat correct.
> 
> Or, how about using a bright sky_sphere along with a large hollow black
> sphere with no_reflection.  Our realistic low-ambient and no-ambient
> metals will show up fine, no need for metals.inc's insane ambients.
> 

Here is my edited versions of metals.inc and golds.inc.
I explicitly set all ambient to zero.


Post a reply to this message


Attachments:
Download 'golds.inc.txt' (10 KB) Download 'metals.inc.txt' (14 KB)

Copyright 2003-2021 Persistence of Vision Raytracer Pty. Ltd.