POV-Ray : Newsgroups : moray.win : Getting light to reflect Server Time
28 Nov 2021 09:21:55 EST (-0500)
  Getting light to reflect (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Tim Cook
Subject: Re: Getting light to reflect
Date: 27 Feb 2011 03:06:23
Message: <4d6a05ff$1@news.povray.org>
On 2011-02-26 12:18, Warp wrote:
>    Radiosity only does diffuse reflection, not specular (ie. mirror)
> reflection, which is what photon mapping does. I got the impression
> that the original poster wanted the light to reflect from a reflective
> (mirror-like) object.

I find myself confused as to the exact distinction between diffuse and 
specular reflectivity.   All objects are mirror-like and specular; 
diffuse materials are just this reflection spread out according to the 
unevenness of the surface texture.  If you tune radiosity settings to a 
count of one and a very low error bound you can see that this is what 
radiosity is doing.   The bright-spot shine of a specular highlight is 
simply the result of a light source being so much brighter than 
everything it's illuminating.  Yes?

-- 
Tim Cook


Post a reply to this message

From: Warp
Subject: Re: Getting light to reflect
Date: 27 Feb 2011 04:03:01
Message: <4d6a1344@news.povray.org>
Tim Cook <z99### [at] gmailcom> wrote:
> I find myself confused as to the exact distinction between diffuse and 
> specular reflectivity.

  Both are approximations of how real-life surfaces reflect light.
(Dividing into pure diffuse and pure specular comes originally from the
Phong lighting model, which is what POV-Ray still uses. The division is
done because they are very easy to calculate and in conjunction they
produce a result that looks more or less realistic for many surfaces.)

  Diffuse reflection reflects light to all directions. The weight
distribution of the reflected light is dependent only on the normal
vector of the surface (ie. the direction it's facing) but not on the
direction where the incoming light is coming from. (The direction of
the incoming light only affects how much of it is reflected, but not
its distribution.) This is the normal surface shading you get in POV-Ray
by default (when you don't specify any highlight finishes).

  Radiosity (be it what POV-Ray calls as such, or the real scaline rendering
technique called "radiosity") only takes into account pure diffuse reflection
of light when it calculates how light reflected from surfaces illuminates
other surfaces.

  Specular reflection is a pure 100% mirror reflection: Light is reflected
only in one direction (rather than all directions), this direction being
determined by the normal vector of the surface and the direction of the
incoming light. This is what you get when you specify a 'reflection' finish
on a surface.

  Photon mapping only takes into account pure specular reflection (as well
as refraction) when it calculates how light reflected from a surface
illuminates other surfaces.

  Specular reflection shouldn't be confused with specular highlighting,
which is something else completely. Specular highlights are a completely
independent surface shading technique (a rather simplistic one) which
aims to approximate what happens when a surface is not 100% diffuse, but
has some specular reflectivity to it. Most real-life surfaces are not
100% diffuse, and the distribution of reflected light is not uniform to
all directions, but has a dependence on the direction of the incoming
light. This means that more light is reflected to the specular direction
than to the other directions, causing visible highlights. The distribution
function for real-life surfaces tends to be quite complicated, and the
specular highlighting used in the Phong shading model is a really simplistic
approximation that gives ok results for many surfaces.

  The Phong shading model (which is what POV-Ray uses) is a very simplistic
model and the approximation of real-life surface properties is, blatantly
put, quite crude (and many would say that nowadays antiquated). However,
it gives ok results in most situations and, most importantly, it's very
fast to calculate, which is its biggest advantage.

> The bright-spot shine of a specular highlight is 
> simply the result of a light source being so much brighter than 
> everything it's illuminating.  Yes?

  I think you are confusing the brightest part of diffuse reflection with
the brightest part of a specular highlight. They are not at the same place.
The former is at the point where the surface is directly facing the light
source (and it does not depend on the position of the camera), while the
latter is where the angle between the normal vector of the surface and
the light source is the same as the angle between the normal vector and
the camera (which means that the location of the highlight depends on the
location of the camera, and thus moves if the camera is moved).

  Radiosity cannot produce specular highlights, only diffuse shading.

-- 
                                                          - Warp


Post a reply to this message

From: Tim Cook
Subject: Re: Getting light to reflect
Date: 27 Feb 2011 04:50:03
Message: <4d6a1e4b@news.povray.org>
On 2011-02-27 03:03, Warp wrote:
>    Specular reflection shouldn't be confused with specular highlighting,
> which is something else completely.

Ahhh ok, this is where most of my confusion on the matter was.

>    I think you are confusing the brightest part of diffuse reflection with
> the brightest part of a specular highlight. They are not at the same place.
> The former is at the point where the surface is directly facing the light
> source (and it does not depend on the position of the camera), while the
> latter is where the angle between the normal vector of the surface and
> the light source is the same as the angle between the normal vector and
> the camera (which means that the location of the highlight depends on the
> location of the camera, and thus moves if the camera is moved).

...and this, which I'm finding hard to visualise, somehow.  Rather, I 
/can/, but understanding of what's happening in regards to 
light/object/camera relative loci is escaping me.  An animation would do 
wonders (and not just for me, perhaps?)...

-- 
Tim Cook


Post a reply to this message

From: Warp
Subject: Re: Getting light to reflect
Date: 27 Feb 2011 05:34:26
Message: <4d6a28b1@news.povray.org>
Tim Cook <z99### [at] gmailcom> wrote:
> >    I think you are confusing the brightest part of diffuse reflection with
> > the brightest part of a specular highlight. They are not at the same place.
> > The former is at the point where the surface is directly facing the light
> > source (and it does not depend on the position of the camera), while the
> > latter is where the angle between the normal vector of the surface and
> > the light source is the same as the angle between the normal vector and
> > the camera (which means that the location of the highlight depends on the
> > location of the camera, and thus moves if the camera is moved).

> ...and this, which I'm finding hard to visualise, somehow.  Rather, I 
> /can/, but understanding of what's happening in regards to 
> light/object/camera relative loci is escaping me.  An animation would do 
> wonders (and not just for me, perhaps?)...

  You don't need an animation to visualize the difference. Consider the
following:

//----------------------------------------------------
camera { location -z*6.5 angle 25 look_at 0 }
light_source { y*100, 1 }
sphere
{ 0, 1
  pigment { rgb <1, .5, .25> }
  finish { specular 1 roughness .01 }
}
//----------------------------------------------------

  The brightest part of the (diffusely illuminated) surface is at the very
top, because the light source is right above the sphere (and the camera is
on the z axis). However, the specular highlight is not at the top, but lower
(more precisely where the angle between the normal vector and the light
source is the same as with the camera).

-- 
                                                          - Warp


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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