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
 *      object's appearance is not affected by texture maps or viewing
 *      distance (that is, distance from the observer to the object).
 *
 *      Note that an <Image> instance's alpha (if any), and/or a colour's
 *      alpha (a.k.a. <Translucency>) 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> instances -
 *      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> instance and 2) an <Image Mapping Function>
 *      instance, the image_mapping_method of which is set to blending.
 *      a) If the <Image> is an intensity <Image> (that is, LUMINANCE is part of
 *         its signature),  then 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>. That is, for an <Image> with a LUMINANCE or
 *         LUMINANCE_AND_ALPHA image_signature, the image blend
 *         and primary colours are linearly combined with the <Image>'s
 *         luminance and its inverse to determine the displayed luminance.
 *         Where the <Image> is bright, its colour combined with that of the
 *         object's Image Blend Colour will dominate. Where the <Image> is dark,
 *         the object's Primary Colour will dominate.
 *      b) If the <Image> is a 123COLOUR <Image> or some variation thereof,
 *         the 1st, 2nd, and 3rd colour components of each texel are linearly
 *         interpolated between the PRIMARY_COLOUR and the
 *         IMAGE_BLEND_COLOUR. That is, for an <Image> with image_signature =
 *         123COLOUR or 123COLOUR_ALPHA, the image blend and primary colours
 *         are linearly combined with the <Image>'s colour and its inverse to
 *         determine the displayed colour. Where the <Image> is bright, its
 *         colour combined with that of the object's image blend colour will
 *         dominate. Where the <Image> is dark, the object's primary colour
 *         will dominate.
 *
 *      See also SE_Image_Mapping_Method for further discussion of blending.
 */
typedef struct
{
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 Lgt_Render_Bhvr_Primary; (notes)
SE_Integer_Unsigned : 1 Lgt_Render_Bhvr_Secondary; (notes)
} SE_Colour_Mapping;


Field Notes


Lgt_Render_Bhvr_Primary

 The primary colour of a SEDRIS object's <Light Rendering Behaviour>.
 It cannot be combined with any other colour mapping.

Lgt_Render_Bhvr_Secondary

 The secondary colour of a SEDRIS object's <Light Rendering Behaviour>.
 It cannot be combined with any other colour mapping.



Prev: SE_Colour_Data. Next: SE_Colour_Model.


Return to: Top of this Page, Type Index

Last updated: July 16, 2004 Copyright © 2004 SEDRIS