Class Name: Primitive Color

Superclass - SEDRIS Abstract Base

Definition

A single color definition, consisting of individual ambient, diffuse, emissive, and specular components.

Generally speaking, to determine the color of an object illuminated by a light source X, combine

add any intensity due to the Emissive Color (which isn't affected by X.)

Primary Page in DRM Diagram:

Example

  1. Consider a Geometry Model Instance of a computer monitor, placed on top of a Geometry Model Instance of a desk. A Positional Light affecting the two objects is located so that the illumination is directed from above. (Assume that these instances are present within an environment simulating an ordinary room.)
    Each of the Polygons within the desk Model have an Inline Color whose Primitive Color has both an Ambient Color and a Diffuse Color component. Due to the Diffuse Color component, the area of the desk under the monitor that's visible to the observer appears to be in shadow. However, the shadowy area is not totally blacked out, because the Ambient Color simulates the effect due to light reflected from the walls, ceiling, etc. that would reach that area.

  2. Consider a Line used to simulate a line of runway lights. The Line's Color would resolve to a Primitive Color consisting primarily (possibly completely) of an Emissive Color, since the Line is pretending to emit light.

  3. Consider a collection of Polygons used to represent the surface of a sunlit lake. These Polygons' Colors resolve to Primitive Colors consisting of Ambient Color, Diffuse Color, and Specular Color components.
    The Ambient Color prevents any Polygons in shadow from appearing black, while the Diffuse Color provides most of the normal appearance of a lit object. However, since water is a reflective substance, its color requires a Specular Color component to simulate light reflected from the water.

FAQs

Does SEDRIS use the OpenGL lighting model?
No, although the terminology is similar. SEDRIS handles transparency somewhat differently than OpenGL does, among other things. For a description of the OpenGL lighting model, see Woo et. al., Chapter 5 "Lighting" of OpenGL Programming Guide, 3rd ed., Addison-Wesley 1999.

I'm a data provider, and I have a very simple illumination model. I don't have objects that glow in the dark or otherwise emit light, and I don't care about reflections. What do I do with this Color stuff in SEDRIS?
In your question, you've eliminated any worries about Emissive Color and Specular Color components -- your Primitive Colors won't have them. Having said that, you're down to 2 choices -- Ambient Color and Diffuse Color. Here is a simplified description of the effects each will provide (i.e., considering only 1 light source).
Ambient Color is independent of the positions of either the light source or the observer. That is, an object with only Ambient Color appears uniformly lit across its surface, regardless of where the light source is or where the observer is. (This can create a very artificial-looking effect, since it distorts some of the visual cues that provide depth perception.)
Diffuse Color, on the other hand, depends on the angle of the lit object to the light source (although not on the observer's position). An object with only Diffuse Color will appear to be lighted on the side facing the light source, while the opposite side will be in shadow. The effect is consistent with the visual cues used to determine shape-from-shading in various image analysis methods.
Note that a Primitive Color can have both an Ambient Color and a Diffuse Color component. This indicates that even if part of the object is in shadow, it is still somewhat visible. See example #1.

I'm lost - where are the RGB values in all this?!?
Each of the components of Primitive Color has, in turn, a Color Data component, which is either an RGB Color, an HSV Color, or a CMY Color, depending on which color model you're using.

Why do Color Tables have Primitive Colors instead of Inline Colors?
Color Tables used to be composed of Inline Colors, but problems arose since both Color Index and Inline Color objects can have Translucency. When a Color Index that has a Translucency component refers to an entry in a Color Table, the interpretation is clearer if the Color Table's entry cannot have any additional Translucency. Consequently, Primitive Color exists so that we can put 'just the color' into a Color Table.

Constraints

None.

Composed of (one-way)

Component of (one-way)


Prev: Predefined Function. Next: Primitive Feature. Up:Index.