Navigation
Navigate Navigate Navigate Navigate Navigate Navigate Navigate Navigate

IfcPixelTexture

Definition from IAI: An IfcPixelTexture provides a 2D image-based texture map as an explicit array of pixel values (image field). In contrary to the IfcImageTexture the IfcPixelTexture holds a 2 dimensional list of pixel color (and opacity) directly, instead of referencing to an URL.

The following additional definitions from ISO/IEC FCD 19775:200x, the Extensible 3D (X3D) specification, apply:

The PixelTexture node defines a 2D image-based texture map as an explicit array of pixel values (image field) and parameters controlling tiling repetition of the texture onto geometry. Texture maps are defined in a 2D coordinate system (s, t) that ranges from 0.0 to 1.0 in both directions. The bottom edge of the pixel image corresponds to the S-axis of the texture map, and left edge of the pixel image corresponds to the T-axis of the texture map. The lower-left pixel of the pixel image corresponds to s=0.0, t=0.0, and the top-right pixel of the image corresponds to s = 1.0, t = 1.0.

The following general recommendations for explicit image array format support from ISO/IEC FCD 19775:200x, the Extensible 3D (X3D) specification, also apply:

The Image field specifies a single uncompressed 2-dimensional pixel image. Image fields contain three integers representing the width, height and number of components in the image, followed by width×height hexadecimal values representing the pixels in the image. Pixel values are limited to 256 levels of intensity (i.e., 0x00-0xFF hexadecimal).

  1. A one-component image specifies one-byte hexadecimal value representing the intensity of the image. For example, 0xFF is full intensity in hexadecimal (255 in decimal), 0x00 is no intensity (0 in decimal).
  2. A two-component image specifies the intensity in the first (high) byte and the alpha opacity in the second (low) byte.
  3. Pixels in a three-component image specify the red component in the first (high) byte, followed by the green and blue components (e.g., 0xFF0000 is red, 0x00FF00 is green, 0x0000FF is blue).
  4. Four-component images specify the alpha opacity byte after red/green/blue (e.g., 0x0000FF80 is semi-transparent blue). A value of 00 is completely transparent, FF is completely opaque, 80 is semi-transparent.

Note that alpha equals (1.0 -transparency), if alpha and transparency each range from 0.0 to 1.0.

Each pixel is read as a single unsigned number. For example, a 3-component pixel with value 0x0000FF may also be written as 0xFF (hexadecimal). Pixels are specified from left to right, bottom to top. The first hexadecimal value is the lower left pixel and the last value is the upper right pixel.

HISTORY: New class in Release IFC2x Edition 2.

EXPRESS specification:

ENTITY IfcPixelTexture
SUBTYPE OF ( IfcSurfaceTexture);
Width  :  IfcInteger;
Height  :  IfcInteger;
ColourComponents  :  IfcInteger;
Pixel  :  LIST [1:?] OF BINARY (32);
WHERE
WR21  :  Width >= 1;
WR22  :  Height >= 1;
WR23  :  {1 <= ColourComponents <= 4};
WR24  :  SIZEOF(Pixel) = (Width * Height);
END_ENTITY;

Attribute definitions:

Width  :  The number of pixels in width (S) direction.
Height  :  The number of pixels in height (T) direction.
ColourComponents  :  Indication whether the pixel values contain a 1, 2, 3, or 4 colour component.
Pixel  :  Flat list of hexadecimal values, each describing one pixel by 1, 2, 3, or 4 components.
IFC2x Edition 3 CHANGE  The data type has been changed from STRING to BINARY.

Formal Propositions:

WR21  :  The minimum number of pixel in width (S coordinate) direction shall be 1.
WR22  :  The minimum number of pixel in height (T coordinate) direction shall be 1.
WR23  :  The number of color components shall be either 1, 2, 3, or 4.
WR24  :  The list of pixel shall have exactly width*height members.

Inheritance graph

ENTITY IfcPixelTexture;
ENTITY IfcSurfaceTexture;
RepeatS  :  BOOLEAN;
RepeatT  :  BOOLEAN;
TextureType  :  IfcSurfaceTextureEnum;
TextureTransform  :  OPTIONAL IfcCartesianTransformationOperator2D;
ENTITY IfcPixelTexture;
Width  :  IfcInteger;
Height  :  IfcInteger;
ColourComponents  :  IfcInteger;
Pixel  :  LIST [1:?] OF BINARY (32);
END_ENTITY;