Hello,
I think that there is a fundamental flaw in Inventor's materials.
In particular: the default ambientColor makes no sense.
From the OpenGL red-book, chapter 6:
"Ambient and diffuse reflectances define the color of the material and
are typically similar if not identical."
This statement makes perfect sense: 99.9% of all object in the real
world will have a fixed colour, regardless of the direction of the
incoming light.
If the light is ambient, instead of directed, why on earth would
the perceived colour of the object change? This is a rare occasion,
and happens e.g. with the surface of a CD.
In Inventor, (And just about any OpenGL based system), the colour
of objects change dramatically if the light is not directed, but
ambient, and a default ambientColor is used.
This is caused by the fact that the ambient colour of materials
is by default 0.2 0.2 0.2, which is dark grey. This is wrong:
A red sphere in ambient light should be red, not grey.
The bulk of all the Inventor models out on the net suffer
from using default ambient colours.
(just try viewing /usr/share/inventor/data/chair.iv in ambient
light, and you'll see what I mean).
A better default would be to use the diffuseColor, if ambientColor
is not set.
Of course a dynamic default for ambientColor based on diffuseColor
is a tricky thing, programming-wise. So maybe a 0,0,0 default
ambientColor is better.... This forces the programmers/designers
to think about ambientColours if they want to use ambient light
in their scenes.
The nonsense-default value is ofcourse a result of the same
illogical use of this default in the OpenGL spec for
glMaterial()
I think GL_AMBIENT should never be used with glMaterial,
only GL_AMBIENT_AND_DIFFUSE makes sense.
<end of rant>
Bram
|