Class Name: Image Mapping Function
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
- 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.
- 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.
- 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.
- 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.
- 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:
- origin (the center of the sphere)
- direction (point on the north pole of the sphere)
- 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:
- origin (the center of the cylinder)
- direction (point at the center of the cylinder's top)
- 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)
Notes
Component of Notes
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
The ID of the image to which this Image-Mapping-Function is associated.
Replace, Decal, Modulate, or Blend. For details on how these methods
are used, see SE_IMAGE_MAPPING_FUNCTION_METHOD_ENUM.
Clamp or repeat the image in s
Clamp or repeat the image in t
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>.
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.
value to add to the color data values within the Image
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.