POV-Ray : Newsgroups : povray.general : Ambient value Server Time
24 Nov 2024 13:56:09 EST (-0500)
  Ambient value (Message 1 to 9 of 9)  
From: kurtz le pirate
Subject: Ambient value
Date: 21 Jul 2018 12:20:54
Message: <5b535d66$1@news.povray.org>
Hello,


Many of my old scenes have this kind of settings :

finish {
   ambient 0.40
   diffuse 0.60
   }

Now with 3.7/3.8 version, there is the message :
"Possible Parse Error: Suspiciously high 'ambient' value found...."

If i set ambient to zero, it's ok, but renders are differents
So, what is correct settings for finish {} now ?


One advise ?

-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Bald Eagle
Subject: Re: Ambient value
Date: 21 Jul 2018 13:55:06
Message: <web.5b53725596f764b3458c7afe0@news.povray.org>
kurtz le pirate <kur### [at] gmailcom> wrote:


> If i set ambient to zero, it's ok, but renders are differents
> So, what is correct settings for finish {} now ?


See:

http://news.povray.org/povray.newusers/thread/%3Cweb.5098a702d2be5305aaeb765e0@news.povray.org%3E/?mtop=384948&moff=10

for a discussion of this topic, and recommendations by clipka.

Also, see the POV-Ray help topic, and the following entry for emission.


3.6.1.3.1 Ambient

The light you see in dark shadowed areas comes from diffuse reflection off of
other objects. This light cannot be modeled directly using ray-tracing, however,
the radiosity feature can do a realistic approximation at the cost of higher
render times. For most scenes, especially in-door scenes, this is will greatly
improve the end result.

The classic way to simulate Ambient Lighting in shadowed areas is to assume that
light is scattered everywhere in the room equally. The effect can simply be
calculated by adding a small amount of light to each texture, whether or not a
light is actually shining on that texture. This renders very fast, but has the
disadvantage that shadowed areas look flat.

Note: Without radiosity ambient light does not account for the color of
surrounding objects. For instance, when entering a room where the walls, floor
and ceiling are red, your white clothing will look pink from the reflected
light. POV-Ray's ambient shortcut does not account for this.

The ambient keyword controls the amount of ambient light used for each object.
In some situations the ambient light might also be tinted. In that case a color
value can be specified as in the example below:

finish { ambient rgb <0.3,0.1,0.1> } //a pink ambient

If all color components are equal, a single float value may be used. In other
words a single float value of 0.3 is treated as <0.3,0.3,0.3>. The default value
is 0.1, which gives very little ambient light. As with light sources, physically
meaningful values are typically greater than 0, but negative values work too.
Lastly the value can also be arbitrarily high to simulate a very bright light.

You may also specify the overall ambient light level used when calculating the
ambient lighting of an object using the global ambient_light setting.

The total light defined as: Ambient = Finish_Ambient *
Global_Ambient_Light_Source. See also: Ambient Light for more details.

Ambient light affects both shadowed and non-shadowed areas, so if you turn up
the ambient value, you may want to turn down the diffuse and reflection values.

There has been a Change as of version 3.7 in that the ambient mechanism is now
automatically turned off when radiosity is enabled, provided that #version is
set to 3.7 or higher. This will allow use of the same material definitions in
both radiosity and non-radiosity scenes. As a consequence, the practice of
co-opting ambient to model glowing materials will no longer work in radiosity
scenes and is therefore strongly discouraged altogether; instead, the new
emission keyword has been added specifically for this purpose.

Note: Specular reflected indirect illumination like a flashlight shining in a
mirror cannot modeled by either ambient light or radiosity. Use photons instead.

There has been an important Change in version 3.8 regarding the default ambient
setting. When #version is set as either the first statement of the scene file or
via command-line option and the version is 3.8 or greater the default setting is
now ambient 0 as opposed to the ambient 0.1 value used in previous versions.


Post a reply to this message

From: clipka
Subject: Re: Ambient value
Date: 21 Jul 2018 14:40:23
Message: <5b537e17$1@news.povray.org>
Am 21.07.2018 um 18:20 schrieb kurtz le pirate:
> Hello,
> 
> 
> Many of my old scenes have this kind of settings :
> 
> finish {
>   ambient 0.40
>   diffuse 0.60
>   }
> 
> Now with 3.7/3.8 version, there is the message :
> "Possible Parse Error: Suspiciously high 'ambient' value found...."
> 
> If i set ambient to zero, it's ok, but renders are differents
> So, what is correct settings for finish {} now ?
> 
> 
> One advise ?

The message already includes any advice necessary:


"... Are you trying to model a glowing material? As of POV-Ray v3.7,
'ambient' is disabled when using radiosity, and its use to model glowing
materials is generally deprecated; use 'emission' for this purpose
instead. If your intention is to model unusually high ambient
illumination in a non-radiosity scene, you can avoid this warning by
explicitly specifying 'emission 0'.


You have to decide whether your intention of using `ambient` was to
model a material glowing of its own (which the feature has often been
co-opted for, but wasn't originally intended for; the original intention
was to model the effect of indirect illumination, serving the same
purpose as radiosity albeit at a lower quality).

If you find that you are indeed using `ambient` to model a glowing
material, replace `ambient 0.40` with `emission 0.40` (presuming your
scene uses the default of `ambient_light 1.0`).

Otherwise, simply add `emission 0` to suppress the warning without
changing anything.

(If it's actually a mix of both, use e.g. `ambient 0.10 emission 0.30`.)


Post a reply to this message

From: Kenneth
Subject: Re: Ambient value
Date: 22 Jul 2018 15:20:00
Message: <web.5b54d78f96f764b3a47873e10@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

>
> The message already includes any advice necessary:
>
>
> "... Are you trying to model a glowing material? As of POV-Ray v3.7,
> 'ambient' is disabled when using radiosity, and its use to model glowing
> materials is generally deprecated; use 'emission' for this purpose
> instead. If your intention is to model unusually high ambient
> illumination in a non-radiosity scene, you can avoid this warning by
> explicitly specifying 'emission 0'.
>

An easy way to do this for an *entire* old NON-radiosity scene would be...

global_settings{
.....
#default{finish{emission 0}}
}

This way, you can supress the too-high ambient warning messages without having
to change any of your old finish{...} blocks in the scene code itself.


Post a reply to this message

From: clipka
Subject: Re: Ambient value
Date: 22 Jul 2018 16:22:39
Message: <5b54e78f$1@news.povray.org>
Am 22.07.2018 um 21:16 schrieb Kenneth:

> global_settings{
> ......
> #default{finish{emission 0}}
> }
> 
> This way, you can supress the too-high ambient warning messages without having
> to change any of your old finish{...} blocks in the scene code itself.

That's news even to me. Go figure.


Post a reply to this message

From: Kenneth
Subject: Re: Ambient value
Date: 23 Jul 2018 10:45:01
Message: <web.5b55e91496f764b3a47873e10@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 22.07.2018 um 21:16 schrieb Kenneth:
>
> > global_settings{
> > ......
> > #default{finish{emission 0}}
> > }
> >
> > This way, you can supress the too-high ambient warning messages without having
> > to change any of your old finish{...} blocks in the scene code itself.
>
> That's news even to me. Go figure.

Well, uh, I didn't actually *TRY* it... until now. And the #default trick
doesn't work :-(  Either inside global_settings or outside it. (The emission
effect itself works, but not the message supression.) Alas, it would have been a
nice & easy way to circumvent the warning message(s) in old scenes.

Any chance of *making* it work using that good ol' Clipka magic? ;-)


Post a reply to this message

From: clipka
Subject: Re: Ambient value
Date: 23 Jul 2018 17:18:14
Message: <5b564616$1@news.povray.org>
Am 23.07.2018 um 16:41 schrieb Kenneth:
> clipka <ano### [at] anonymousorg> wrote:
>> Am 22.07.2018 um 21:16 schrieb Kenneth:
>>
>>> global_settings{
>>> ......
>>> #default{finish{emission 0}}
>>> }
>>>
>>> This way, you can supress the too-high ambient warning messages without having
>>> to change any of your old finish{...} blocks in the scene code itself.
>>
>> That's news even to me. Go figure.
> 
> Well, uh, I didn't actually *TRY* it... until now. And the #default trick
> doesn't work :-(  Either inside global_settings or outside it. (The emission
> effect itself works, but not the message supression.) Alas, it would have been a
> nice & easy way to circumvent the warning message(s) in old scenes.
> 
> Any chance of *making* it work using that good ol' Clipka magic? ;-)

If you want to render an old scene as-is with as few changes as
possible, you should simply use a corresponding `#version` statement.
(And yes, that does suppress the warning in question.)

If you want to migrate an old scene to v3.7 or v3.8 standards, you
should really use `emission` in the individual finish statements.


Post a reply to this message

From: kurtz le pirate
Subject: Re: Ambient value
Date: 24 Jul 2018 13:06:29
Message: <5b575c95$1@news.povray.org>
Le 23/07/2018 à 23:18, clipka a écrit :
> If you want to migrate an old scene to v3.7 or v3.8 standards, you
> should really use `emission` in the individual finish statements.


Yeah, I'll probably do that.
'sed' is my friend !


Of course, for scenes *without* radiosity.



-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: clipka
Subject: Re: Ambient value
Date: 24 Jul 2018 20:21:54
Message: <5b57c2a2$1@news.povray.org>
Am 24.07.2018 um 19:06 schrieb kurtz le pirate:
> Le 23/07/2018 à 23:18, clipka a écrit :
>> If you want to migrate an old scene to v3.7 or v3.8 standards, you
>> should really use `emission` in the individual finish statements.
> 
> 
> Yeah, I'll probably do that.
> 'sed' is my friend !

I'd rather suggest `grep` and a good editor.

Wherever `ambient` is used to simulate ambient light, you should leave
it as is. If the value is unusually high, you should add `emission 0` to
suppress the warning.

Wherever `ambient` is used to simulate glowing material, you should
replace it with `emission`.

> Of course, for scenes *without* radiosity.

For all scenes, actually.


Post a reply to this message

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