Class Name: Image Mapping Function

Superclass - SEDRIS Abstract Base

Definition

Specifies how Images are mapped onto a textured object.

If Texture Coordinates are present on the object to be textured, and if the (s, t) fall outside the ranges of (0, 0) and (1, 1), the rendering system needs to know whether to wrap the Image (repeat the Image values in s or t), or whether to clamp the coordinates.

Primary Page in DRM Diagram:

Secondary Pages in DRM Diagram:

Example

  1. An Image is mapped to a Polygon. The Polygon has Texture Coordinates at 3 or more Vertices, the Image is mapped the Polygon using the Texture Coordinates. The Texture Coordinate represents the location within the Image that lies on top of the Vertex.

  2. A Polygon could have 2 Images mapped to a single polygon. One Image could be the Image displayed for most cases. The second Image, if detail texture mapping is true, would then be the imagery that is added to polygon when the eyepoint is so close to the polygon that the main image texels are no longer useful for texturing the polygon.

FAQs

What is the order of precedence for mapping an Image to a geometric object, e.g. a Polygon?
The Texture Coordinates on the attribute geometry always have the highest precedence. Next, if the attribute geometry has Tack Points, then three conditions could occur.

  1. If there is only one Tack Point, the Tack Point is used to locate the imagery, and the scaling and rotation information from the Image Mapping Function is used.
  2. If two Tack Points are defined, the location and rotation of the imagery is taken from the Tack Points, but the scaling information is derived from the Image Mapping Function.
  3. If there are three or more Tack Points, the position, rotation information is derived from the first three Tack Points. Since Tack Points are unordered, the complete set of supplied Tack Points must define an orthogonal image projection. This is to insure that no matter which three Tack Points are used, the same projection is derived for the imagery.

If the Polygon does not have Texture Coordinates or Tack Points, then Image Anchors in the Image Mapping Function define the location of the image on the attribute geometry. If none of the previous conditions are met, then the Image Anchors in the Image are used. If there are no Texture Coordinates, no Tack Points, no Image Anchors in the Image Mapping Function and no anchor points in the Image, then the image mapping is undefined. It should be noted that the final two cases can be used to create non-orthogonal projections.

How can I create a non-orthogonal projection of texture onto a textured object, e.g. a Polygon?
Since all texture mappings that are a result of texture coordinate mapping at the polygon level are defined to be orthogonal projections, a non-orthogonal projection cannot be created with Texture Coordinates. To create a non-orthogonal projection, the Image Anchor points must be used. These points are defined in the currently scoped 'world' spatial reference frame, and therefore are not required to be in the plane of the Polygon. There is no method to create a non-orthogonal projection in the local spatial reference frame of the Model.

I have a texture map that is applied to an object using a spherical projection. How do I store the center and radius of projection in the Image Mapping Function?
Rather than using Texture Coordinates to tie the Image Mapping Function to the textured object, you must use an Image Anchor. For a spherical projection, the Image Anchor's Locations are interpreted as follows:
  1. origin (the center of the sphere)
  2. direction (point on the north pole of the sphere)
  3. alignment (point at the equator of the sphere)

I have a texture map that is applied to an object using a cylindrical projection. How do I store the center of projection in the Image Mapping Function?
Rather than using Texture Coordinates to tie the Image Mapping Function to the textured object, you must use an Image Anchor. For a cylindrical projection, the Image Anchor's Locations are interpreted as follows:
  1. origin (the center of the cylinder)
  2. direction (point at the center of the cylinder's top)
  3. alignment (point on the cylinder's surface)

Where do I find the rotation and scale of the image mapping when Image Anchors are used?
The rotation and scale of the image mapping can be derived from the Locations of the 3 corners of the Image, i.e., the Location components of the Image Anchor.

When blending, how do you interpret a blend (luminance) value?
1.0 = 100% Primary color, No Blend contribution
0.0 = no Primary contribution, %100 Blend Color

Does an Image Mapping Function apply to both sides of a Polygon, or only the front side? What if I want to represent a wall with brick texture on one side and wallpaper texture on the other?
An Image Mapping Function applies only to the front side of a Primitive Geometry. In the wall example, you would need 2 Polygons, one with brick texture on its front side, facing the outside of the building, and the other with wallpaper, facing the inside of the building.

Any other representation would be lost in a rendering system that used back-face culling.

Constraints

Associated to (one-way)

Composed of (one-way)

Component of (one-way)

Field Elements

SE_ID image_id; (notes)
SE_IMAGE_MAPPING_METHOD_ENUM image_mapping_method; (notes)
SE_IMAGE_WRAP_ENUM image_wrap_s; (notes)
SE_IMAGE_WRAP_ENUM image_wrap_t; (notes)
SE_IMAGE_PROJECTION_TYPE_ENUM image_projection_type; (notes)
SE_FLOAT64 intensity_level; (notes)
SE_FLOAT64 gain; (notes)
SE_BOOLEAN image_detail_mapping; (notes)
SE_TOKEN_SET presentation_domain;

Notes

Component of Notes

Feature

 used to support attributes for derived objects
 That is, the <Image Mapping Function> components are
 used only to specify texture mapping information for
 geometry that is derived from the <Feature> by the consumer.
 These <Image Mapping Functions> must use
 <Image Anchor> components to specify the mapping.

Fields Notes

image_id

 The ID of the image to which this Image-Mapping-Function is associated.

image_mapping_method

 Replace, Decal, Modulate, or Blend. For details on how these methods
 are used, see SE_IMAGE_MAPPING_FUNCTION_METHOD_ENUM.

image_wrap_s

 Clamp or repeat the image in s

image_wrap_t

 Clamp or repeat the image in t

image_projection_type

 Type of projection used when applying the <Image> to textured objects.

 1) If planar projection is specified, the following cases may apply:
     a) The object may have <Texture Coordinates> or <Tack Points>, in
        which case the <Image Mapping Functions and Texture Coordinates>
        rule will apply.
     b) The <Image Mapping Function> may have an <Image Anchor>.
     c) The <Image> may have an <Image Anchor>.

     See <Image Mapping Function> FAQs for how to interpret these cases.

 2) If cylindrical or spherical projection is specified, the object
    must not have <Texture Coordinates> or <Tack Points>. Instead,
    either the <Image Mapping Function> or its <Image> must have an
    <Image Anchor>.

intensity_level

 value between 0.0 and 1.0 that indicates the percent contribution of
 this mapping to the total effect on the textured object (normal value
 is 1.0) Multiply the first, second, and third color coord values within
 the <Image>'s texels by this value.

gain

 value to add to the color data values within the Image

image_detail_mapping

 Boolean that indicates that this mapping function is used to describe
 mapping of "detail" image on the textured object

Prev: Image Lookup. Next: In Out. Up:Index.