Difference between revisions of "Color"

From Web3D.org
Jump to: navigation, search
 
Line 1: Line 1:
 
* [[Node Reference]]
 
* [[Node Reference]]
 
==Color==
 
==Color==
 +
 +
Specification Link: [http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rendering.html#Color Color]
  
 
<pre>
 
<pre>
 
Color : X3DColorNode {  
 
Color : X3DColorNode {  
   MFColor [in,out] color    [NULL] [0,1]
+
   MFColor [in,out] color    []   [0,1]
   SFNode  [in,out] metadata NULL   [X3DMetadataObject]
+
   SFNode  [in,out] metadata NULL [X3DMetadataObject]
 
}
 
}
 
</pre>
 
</pre>
  
This node defines a set of RGB colours to be used in the fields of another node.
+
==DTD Validation==
 +
 
 +
===Children===
 +
 
 +
Children must appear as follows:
 +
 
 +
# A single, optional IS.
 +
# A single, optional node derived from ''X3DMetadataObject'' for the ''metadata'' field.
 +
 
 +
===Attributes===
 +
 
 +
* There is no check that the values of the ''color'' field are acceptable.
 +
 
 +
==Schema Validation==
 +
 
 +
===Children===
 +
 
 +
Children must appear as follows:
 +
 
 +
# A single, optional IS.
 +
# A single, optional node derived from ''X3DMetadataObject'' for the ''metadata'' field.
  
 +
===Attributes===
  
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.
+
* The Schema attempts to check that the values of the ''color'' field are within the range [0,1]. It does this successfully for values in decimal format but can fail for values in exponent format.
  
 +
==Schematron validation==
  
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.
+
TBD
  
 
* [[Node Reference]]
 
* [[Node Reference]]

Latest revision as of 13:57, 10 June 2015

Color

Specification Link: Color

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

DTD Validation

Children

Children must appear as follows:

  1. A single, optional IS.
  2. A single, optional node derived from X3DMetadataObject for the metadata field.

Attributes

  • There is no check that the values of the color field are acceptable.

Schema Validation

Children

Children must appear as follows:

  1. A single, optional IS.
  2. A single, optional node derived from X3DMetadataObject for the metadata field.

Attributes

  • The Schema attempts to check that the values of the color field are within the range [0,1]. It does this successfully for values in decimal format but can fail for values in exponent format.

Schematron validation

TBD