POV-Ray : Newsgroups : povray.general : diffuse and ambient Server Time
8 Aug 2024 18:19:34 EDT (-0400)
  diffuse and ambient (Message 1 to 10 of 35)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Hookflash
Subject: diffuse and ambient
Date: 10 Jan 2001 20:51:37
Message: <3A5CF537.5489@hotmail.com>
I've been using Pov for awhile now, but I've always been a bit confused
about the "ambient" and "diffuse" keywords in the finish block of an
object.  My understanding is as follows:

When a light source in the scene is shining on an object, that object's
"diffuse" value determines how much of that light is reflected to the
camera (is it a percentage, 0-1 being 0-100% ?).

An object's "ambient" value determines the amount of ambient light (i.e,
light striking the surface of an object from all directions and from no
particular light sourfce) (is this also a percentage?) reflected off the
object to the camera.

Is this correct?  The documentation seems to state that "diffuse"
determines the percentage of the light you see reflecting off an object
that is actually light from light sources being reflected diffusely.  If
this were the case, "diffuse 1" would cause the object to reflect no
ambient light, which is of coarse not the case.  Any help would be
greatly apprectiated... I'm confused;-)  Thanks in advance.

Jordan


Post a reply to this message

From: Chris Huff
Subject: Re: diffuse and ambient
Date: 10 Jan 2001 22:12:22
Message: <chrishuff-6BA0EF.22140210012001@news.povray.org>
Diffuse is the percentage of light from light_sources reflected 
"diffusely" from the surface, ambient is the same thing, except for the 
ambient "light source" defined by ambient_light in global_settings. The 
default ambient light is white, so you can use "ambient 1 diffuse 0" to 
specify all points on your are illuminated with a white ambient light 
(that is, a light with no position or direction, that fills space)
Or you could use "ambient 0 diffuse 1" to specify that the only 
illumination comes from light_sources. In that case, completely shadowed 
areas will be pure black.

Basically, ambient specifies a "minimum illumination", and diffuse 
specifies the effect of light_sources. I generally try to make sure 
ambient+diffuse+reflection <= 1 to get more realistic 
textures...otherwise, your surface is reflecting more light than it 
absorbs. Also, giving everything an ambient of 0 and using radiosity 
gives very realistic shading...

And though these are percentages (with 1 being 100%), you can go outside 
the [0, 1] range...while this is usually not realistic, it is useful in 
radiosity, where you can make an object glow by giving it a very high 
ambient value.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Hookflash
Subject: Re: diffuse and ambient
Date: 10 Jan 2001 22:42:38
Message: <3A5D0F3D.32B0@hotmail.com>
Well, thanks for clearing that up!  Now, if only they explained it that
way in the documentation;-)  Maybe it's just a weird interpretation on
my part.  Anyways, thanks again.

Jordan

<><


Post a reply to this message

From: David Fontaine
Subject: Re: diffuse and ambient
Date: 10 Jan 2001 23:33:01
Message: <3A5D365B.8D0F0F3E@faricy.net>
They are both percentages, but the language is maybe a tad ambiguous.

Diffuse = percent of light hitting being reflected. And despite popular
belief, percentages are not constrained to [0,1], but you already knew that.
:)

Ambient = percent of ambient light level being reflected, sort of, I guess.
There is a parameter ambient_light you can specify in global_settings, and
no surprise, changing this scales all of your objects' ambience.

It seemed kind of strange to me at first; I thought the "ambient_light"
would factor into an object's diffuse because it still comes from outside
the object, whereas "ambient" would mean light given off by the object
itself. That way you also wouldn't have to keep changing the ambience of
"glowing" objects when changing the general ambient lighting level. Once you
figure it out though it's an easy system to adapt, and it might as well be
kept for continuity's sake. There's always little debates here over the
mechanics of this and that.

--
David Fontaine  <dav### [at] faricynet>  ICQ 55354965
My raytracing gallery:  http://davidf.faricy.net/


Post a reply to this message

From: Tom Melly
Subject: Re: diffuse and ambient
Date: 11 Jan 2001 04:40:26
Message: <3a5d7f8a$1@news.povray.org>
"Hookflash" <hoo### [at] hotmailcom> wrote in message
news:3A5### [at] hotmailcom...

I was wondering about this the other day.

I think that, in particular, diffuse and reflection are highly dependant on
each other in REAL LIFE (tm). To be able to specify them separately is
unrealistic but useful - it's as though you had a program to simulate the
action of electricy that allowed you to specify voltage, current and
resistance independantly of each other.

My intuition is that diffuse and reflection should add to 1. Light falling
on an object that isn't reflected is diffused and visa versa. Ambient, on
the other hand, is a "fake" effect to simulate radiosity in a scene.


Post a reply to this message

From: Gail Shaw
Subject: Re: diffuse and ambient
Date: 11 Jan 2001 05:21:59
Message: <3a5d8947@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote in message
news:3a5d7f8a$1@news.povray.org...
> "Hookflash" <hoo### [at] hotmailcom> wrote in message
> news:3A5### [at] hotmailcom...
>
> My intuition is that diffuse and reflection should add to 1.

Asuming the object does not absorb light. I recall reading in some
tutoial or book that diffuse should not be set to 1 as no object diffusely
reflects
all light falling on it.

I tend to work by the rule that ambient + diffuse + reflection < 1 unless
I'm trying
for some odd effect

Gail
********************************************************************
* gsh### [at] monotixcoza              * System.dat not found.         *
* http://www.rucus.ru.ac.za/~gail/ * Reformat hard drive Y)es O)k  *
********************************************************************
* If at first you don't succeed, call it version 1.0               *
********************************************************************


Post a reply to this message

From: Tom Melly
Subject: Re: diffuse and ambient
Date: 11 Jan 2001 05:52:05
Message: <3a5d9055$1@news.povray.org>
"Gail Shaw" <gsh### [at] monotixcoza> wrote in message
news:3a5d8947@news.povray.org...
>
>
> Asuming the object does not absorb light. I recall reading in some
> tutoial or book that diffuse should not be set to 1 as no object diffusely
> reflects
> all light falling on it.
>
> I tend to work by the rule that ambient + diffuse + reflection < 1 unless
> I'm trying
> for some odd effect
>
> Gail

I wondered about that, and consequently left it out. Aren't absorption and
pigment the same? i.e. the colour of an object is the colour of the light
that isn't absorped? Also, IMHO, ambient should be in a separate calc. Dunno
what though.


Post a reply to this message

From: Chris Huff
Subject: Re: diffuse and ambient
Date: 11 Jan 2001 07:15:06
Message: <chrishuff-1871A3.07164811012001@news.povray.org>
In article <3a5d8947@news.povray.org>, "Gail Shaw" 
<gsh### [at] monotixcoza> wrote:

> Asuming the object does not absorb light. I recall reading in some 
> tutoial or book that diffuse should not be set to 1 as no object 
> diffusely reflects all light falling on it.

Also, if you are using a pigment that is darker than pure white, that 
will give a lower diffuse. The diffuse keyword just allows you to adjust 
the whole thing...

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Ron Parker
Subject: Re: diffuse and ambient
Date: 11 Jan 2001 08:11:57
Message: <slrn95rc8u.bcr.ron.parker@fwi.com>
On Thu, 11 Jan 2001 09:40:26 -0000, Tom Melly wrote:
>My intuition is that diffuse and reflection should add to 1. Light falling
>on an object that isn't reflected is diffused and visa versa. Ambient, on
>the other hand, is a "fake" effect to simulate radiosity in a scene.

Don't forget filter/transmit and specular.  Those should be included in your
sum as well.

Ambient is equivalent to "diffuse reflection from unknown light sources" and
as such should probably also be included in the sum.  I always include it in
the sum, at any rate.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Tom Melly
Subject: Re: diffuse and ambient
Date: 11 Jan 2001 08:45:09
Message: <3a5db8e5$1@news.povray.org>
"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] fwicom...
>
> Ambient is equivalent to "diffuse reflection from unknown light sources"
and
> as such should probably also be included in the sum.  I always include it
in
> the sum, at any rate.
>

Yes, it should be included - I'm just not sure how. After all, for an object
in deep space, ambient would be pretty much 0 for all objects. Which seems
to imply that ambient is a property of the scene rather than the object.
However, an object with reflection 1 always has, by implication, an ambient
of 0, which implies that it is an attribute of the object.

The trouble with ambient is that to make any real sense it should be
influenced by the overall strength of the light-sources available. Perhaps
one should code like this:

#declare light_strength = 0.75;
light_source{<0,0,0> color rgb<1,1,1>*light_strength translate <-300,
300, -300>}
object{foo finish{ambient 0.3*light_strength}}


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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