|
Français
![]() Deutsch ![]() |
Surface Design by "texture"Color is live ! "color ... " By the statement "pigment { color .... } " a color or a color pattern of a texture is defined. Besides of the color also transparency and/or filter intensity can be defined! Samples: If we have added in a previous line: #include "colors.inc", a predefined color may be used, i.e.: "pigment{ color Red }" We can use about 100 predefined colors (see special table!). The human eye is able to distinguish nearly 16 Mio colors ("true color")! Because of this it is often necessary to create some additional colors!. ( For "true color" colors like used in POVRAY, we need 1 byte for each of the 3 basic colors. "rgb" = red-green-blue. Each byte may have a value from 0 to 255, according a color intensity between 0 percent and 100 percent. We can create 256*256*256 = about 16 millions of different colors. If we are using less then this (i.e."high-color") we can see shadings with color steps! ) New colors handmade: "color rgb< , , >"
Every color can be mixed by adding red, green and blue light of different intensity! For this we use "color rgb< , , >" (red, green, blue).
Instead of "color rgb<1 , 1 ,0 >" we can also write " color red 1 green 1 blue 0 ".
If we have inserted on top of our scenery descriptions a line: #include "colors.inc" we can use the ready made colors!Here some Samples for rgb colors:
*) I love this yellow!It's worth to continue researching! Our own color creations are available for all of our own sceneries with own color names just by putting the definitions in a personal include file. See also: " Making your own colors and textures collection" As long as we put in one of the first lines of a scenery description the line: #include "textures.inc", we can use ready made color patterns ("pigment") and textures ("texture") which are defined in this file. Attention: The include file textures.inc uses colors.inc !!! Besides of the rgb values of a color it is also possible to define the transparency of a color by an additional float value! But be carefully: The program has to add to the color of an object and the color of the background by the defined proportions and this lets explode the calculation times very easy - an fun with ray tracing is reciprocal to this!!! The transparency of a color with filter effect (color of the shape filters background color!) is described by the value "filter" abbreviation "f", "transmit", abbreviation "t", describes the transparency without filter effects. Sample: "pigment{color rgbf <1.0 ,0.5,0.0,1.0>}" or also "pigment{color rgb<1.0,0.5,0.0> filter 1.0}". A shape with "color rgb <0.9,0.9,0.9>" appears through a filter with
"color rgbf <1, 0.5,0.0,1.0>", like having the color "color rgb <0.9,0.45,0.0>
" . Red 100%, green 50% ( 0.45) and blue totally blocked! Transparent color parts are very important for layered textures!. With these transparent or partly transparent textures we can layer textures of very different structure - i.e. to simulate stone structures. |