Color

From Web3D.org
Revision as of 15:53, 1 February 2006 by Abergstrom (Talk | contribs)

Jump to: navigation, search

Color

Color : X3DColorNode { 
  MFColor [in,out] color    [NULL] [0,1]
  SFNode  [in,out] metadata NULL   [X3DMetadataObject]
}

This node defines a set of RGB colours to be used in the fields of another node.


Color nodes are only used to specify multiple colours for a single geometric shape, such as colours for the faces or vertices of an IndexedFaceSet. A Material node is used to specify the overall material parameters of lit geometry. If both a Material node and a Color node are specified for a geometric shape, the colours shall replace the diffuse component of the material.


RGB or RGBA textures take precedence over colours; specifying both an RGB or RGBA texture and a Color node for geometric shape will result in the Color node being ignored. Details on lighting equations can be found in the Lighting model section of the X3D specification.