The SEDRIS Data Representation Model
APPENDIX C - Types SE_Colour_Mapping |
---|
/* * SET: SE_Colour_Mapping * * This data type specifies how the given <Colour> instance is applied * to the objects that reference it. * * 1. "Front" and "back" refer to which side of the object (usually a * <Polygon> instance) is being coloured. * * 2. A "primary colour" is the main colour of the object, when the * appearance of the object is not affected by texture maps or viewing * distance (that is, distance from the observer to the object). * * Note that the alpha of an <Image> instance (if any), and/or the * alpha of a <Colour> instance (a.k.a. the <Translucency> component * of the <Colour> instance) are not affected by anything other * than the primary colour, even when an image blend colour is present. * * 3. A "distance blend colour" is used to model the distortion of colour * due to distance from the viewer. (For instance, mountains in the * distance appear to be tinted blue, an effect that increases with * increasing distance as long as the mountains are still visible.) * * This is applicable mainly to objects organized by distance from * the viewer - that is, by <Distance LOD Data> link objects - * in level-of-detail aggregations, since the distance that the object * is visible shall be finite. The equation to determine the desired * component of the final displayed colour is * C = PCC*((x-y)/y) + DBCC*(x/y) * where * x is the distance to the object * y is the total distance that the object is visible * PCC is the colour of the PRIMARY_COLOUR <Colour> component * DBCC is the colour of the DISTANCE_BLEND_COLOUR <Colour> component * * Distance blend colour dominates more as viewing distance increases, * while primary colour dominates more as viewing distance decreases. * * 4. An "image blend colour" helps determine the appearance of an object * that has both 1) a <Colour> component and 2) an <Image Mapping Function> * component, the image_mapping_method of which is set to blending. * a) If the <Image> instance is an intensity <Image> instance (that is, * LUMINANCE is part of its signature), the intensity map is used to * modulate between the PRIMARY_COLOUR and IMAGE_BLEND_COLOUR, based * on the values of the texels in the <Image> instance. That is, for * an <Image> instance with a LUMINANCE or LUMINANCE_AND_ALPHA * image_signature, the image blend and primary colours are linearly * combined with the <Image> instance's luminance and its inverse to * determine the displayed luminance. Where the <Image> instance is * bright, its colour combined with that of the DRM object's * Image Blend Colour will dominate. Where the <Image> instance is * dark, the object's Primary Colour will dominate. * b) If the <Image> instance is a 123COLOUR <Image> instance or some * variation thereof, the first, second, and third colour components * of each texel are linearly interpolated between the PRIMARY_COLOUR * and the IMAGE_BLEND_COLOUR. That is, for an <Image> instance with * image_signature = 123COLOUR or 123COLOUR_ALPHA, the image blend * and primary colours are linearly combined with the <Image> * instance's colour and its inverse to determine the displayed * colour. Where the <Image> instance is bright, its colour combined * with that of the DRM object's image blend colour will dominate. * Where the <Image> instance is dark, the object's primary colour * will dominate. * * See also SE_Image_Mapping_Method for further discussion of blending. */typedef union
SE_Integer_Unsigned : 1 | Front_Primary; | ||
SE_Integer_Unsigned : 1 | Front_Distance_Blend; | ||
SE_Integer_Unsigned : 1 | Front_Image_Blend; | ||
SE_Integer_Unsigned : 1 | Back_Primary; | ||
SE_Integer_Unsigned : 1 | Back_Distance_Blend; | ||
SE_Integer_Unsigned : 1 | Back_Image_Blend; | ||
SE_Integer_Unsigned : 1 | Primary_Light_Rendering_Behaviour; | 1 | |
SE_Integer_Unsigned : 1 | Secondary_Light_Rendering_Behaviour; | 2 |
1 The primary colour of the <Light Rendering Behaviour> component(s) of the <Light Rendering Properties> component of a DRM object. It cannot be combined with any other colour mapping.
2 The secondary colour of the <Light Rendering Behaviour> component(s) of the <Light Rendering Properties> component of a DRM object. It cannot be combined with any other colour mapping.
|