Next: RAYTRACING YOUR CREATION Up: DRAFT *** DRAFT Previous: BUILDING A ROBOT

# RT MATERIAL TYPE, PROPERTIES, and COLOR

First the solids must be formed into a "region", eg:

r ball u torus u tube-hole

To change material type, properties and color use the "mater" command:

`mged> mater base
Material =
Material? (CR to skip) plastic
Param =
Parameter string? (CR to skip) sh=10 dl=0.2 sp=0.8 re=0.75
Color = (No color specified)
Color R G B (0..255)? (CR to skip) 112 219 147
Inherit = 0: lower nodes (towards leaves) override
Inheritance (0|1)? (CR to skip) 0
mged>
`

For the values in Parameter String for material ``Plastic'', you can enter such things as: "shinyness (sh)", "specular lighting fraction (sp)", "diffuse lighting fraction (di)", "transmission fraction (tr)", "reflection fraction (re)", and "refractive index (ri)". Two formulas must hold to keep the material ``physical'': sp + di=1.0, and tr + re=1.0.

Suggested values for these properties are listed below:

sh=10, dl=0.2, sp=0.8, re=0.75

NOTE: Not all of these fields need to be input, you can use the system defaults for the rest.

To display objects in different colors on the screen, each object must be a region with its own material properties and colors. All regions must be displayed on screen before a ray tracing can be performed (region objects can have cutouts to display other parts).

    R      G       B        COLOR

    112    219     147       aquamarine
    50     204     153       med aquamarine
    0        0       0       black
    0        0     255       blue
    95     159     159       cadet blue
    66      66     111       corn flower blue
    107     35     142       dk slate blue
    191    216     216       light blue
    143    143     188       light steel blue
    50      50     204       medium blue
    127      0     255       medium slate blue
    47      47      79       midnight blue
    35      35     142       navy blue
    50     153     204       sky blue
    0      127     255       slate blue
    35     107     142       steel blue
    255    127       0       coral
    0      255     255       cyan
    142     35      35       firebrick
    204    127      50       gold
    219    219     112       golden rod
    234    234     173       med goldenrod
    0      255       0       green
    47      79      47       dark green
    79      79      47       dk olive green
    35     142      35       forest green
    50     204      50       lime green
    107    142      35       med forest green
    66     111      66       medium sea green
    127    255       0       med spring green
    143    188     143       pale green
    35     142     107       sea green
    0      255     127       spring green
    153    204      50       yellow green
    47      79      79       dk slate grey
    84      84      84       dim grey
    168    168     168       light grey

     R      G       B          COLOR

    159    159      95       khaki
    255      0     255       magenta
    142     35     107       maroon
    204     50      50       orange
    219    112     219       orchid
    153     50     204       dark orchid
    147    112     219       medium orchid
    188    143     143       pink
    234    173     234       plum
    255      0       0       red
    79      47      47       indian red
    219    112     147       medium violet
    255      0     127       orange red
    204     50     153       violet red
    111     66      66       salmon
    142    107      35       sienna
    219    147     112       tan
    216    191     216       thistle
    173    234     234       turquoise
    112    147     219       dk turquoise
    112    219     219       med turquoise
    79      47      79       violet
    159     95     159       blue violet
    216    216     191       wheat
    252    252     252       white
    255    255       0       yellow
    147    219     112       green yellow

material types are: plastic mirror glass texture

Shinyness (ie: sh=16)

Refractive index for: crown glass = 1.52 Flint glass = 1.65 Rock salt = 1.54 Water = 1.33 Diamond = 2.42

Transmission fraction for a mirror: re=1.0 (tr=0)