home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inside Multimedia 1995 December
/
IMM1295.ISO
/
share
/
grafik
/
povhelp
/
colors.hlp
< prev
next >
Wrap
Text File
|
1994-07-04
|
3KB
|
63 lines
The simplest type of pigment is a solid color. To specify a solid color
you simply put a color specification inside a pigment. For example:
pigment { color Orange }
A color specification consists of the keyword "color" followed a color
identifier or by a specification of the amount or red, green, blue and tran-
sparency in the surface. For example:
color red 0.5 green 0.2 blue 1.0
The float values between 0.0 and 1.0 are used to specify the intensity of
each primary color of light.
NOTE: We use additive color primaries like the color phosphors on a color
computer monitor or TV. Thus:
color red 1.0 green 1.0 blue 1.0
specifies full intensity of all primary colors which is white light. The
primaries may be given in any order and if any primary is unspecified its
value defaults to zero.
In addition to the primary colors a 4th value called "filter" specifies
the amount of transparency. For example a piece of red tinted cellophane
might have:
color red 1.0 filter 1.0
Lowering the filter value would let less light through. The default va-
lue if no filter is specified is 0.0 or no transparency.
NOTE: The example has an implied "green 0.0 blue 0.0" which means that
no green or blue light can pass through. Often users mistakenly specify a
clear object by:
color filter 1.0
but this has implied red, green and blue values of zero. You've just speci-
fied a totally black filter so no light passes through. The correct way is:
color red 1.0 green 1.0 blue 1.0 filter 1.0
NOTE: In earlier versions of POV-Ray the keyword "alpha" was used for
transparency. However common usage of "alpha" in this context usually means
that light passes through unaffected. In POV-Ray however, light is filtered
when it passes through a colored surface. The program works the same as it
always did but the keyword has been changed to make its meaning clearer.
A short-cut way to specify a color is:
color rgb <0.2, 0.5, 0.9>
or:
color rgbf <0.2, 0.8, 1.0, 0.7>
Color specifications are used elsewhere in POV-Ray. Unless stated other-
wise, all of the above information on color specs given above applies to any
color specifications.
Color identifiers may be declared. For examples see COLORS.INC. A color
identifier contains red, blue, green and filter values even if they are not
explicitly specified. For example:
color filter 1.0 My_Color // My_Color overwrites the filter
color My_Color filter 1.0 // Changes My_Color's filter to 1.0
When using a color specification to give an object a solid color pigment,
the keyword "color" may be omitted. For example:
pigment { red 1 blue 0.5 }
or:
pigment { My_Color }
are legal.