| Re: Realistic Illumination, IDL & OpenGL [message #37893 is a reply to message #37828] |
Mon, 02 February 2004 11:19  |
Matt Feinstein
Messages: 33 Registered: July 2002
|
Member |
|
|
On 30 Jan 2004 14:06:09 -0800, nasalmon@onetel.net.uk (Neil) wrote:
> Could someone please help me with problems of illumination in IDL.
>
> For Object Graphics to emulate reality, illumination must be
> accurately represented. Take for example an outdoor scene, where sky
> background emission above and up-welling emission below bathes an
> object in different intensities from all directions. Can this be
> accurately described in IDL or OpenGL?
>
> In IDL Object Graphics there is the possibility to bring in the
> "light" by way of obj_new "IDLgrLight". However, this can only be:
> type 0) Ambient; 1) point source; 2) collimated beam; 3) spot light
> (apertured). The number of lights is limited to 8. Is this
> illumination limited by IDL or the OpenGL on which IDL operates?
For what it's worth: Each light in the OpenGL lighting model has three
components; specular, diffuse and ambient, . Specular obeys a
parameterized variant of the 'angle of reflection equals angle of
incidence' model, diffuse obeys a lambertian model, and ambient is,
well, ambient. The lights can be in any position, including infinity,
and they may have any angular width. The illumination from any given
source is a sum of these three models. The OpenGL spec allows a
lighting model of up to eight independent light sources. There is also
a 'true' ambient illumination that isn't tied to a light source.
This is combined with a general coloring model-- the color of every
facet is a combination of four components; specular, diffuse, ambient,
and emissive. The observed color of any component due to a given
source is the product of the color of that component of the source and
the color of that component of the material.
So, there are -lots- of parameters. In fact, considering that every
facet may have a different color and a different normal vector (the
normal vector is used in the specular lighting model), a rendered
scene could easily have many thousands of parameters. The difficulty
in modeling lighting is not a lack of parameters.
And, I've neglected to mention shadowing, which is a whole other
problem-- you have to figure out a way to compute shadows
(non-trivial) and -then- combine the shadows with your existing
lighting model.
Matt Feinstein
--
There is no virtue in believing something that can be proved to be true.
|
|
|
|