IFC 4.3.2.20250327 (IFC4X3_ADD2) under development

8.12.3.22 IfcPixelTexture

8.12.3.22.1 Semantic definition

An IfcPixelTexture provides a 2D image-based texture map as an explicit array of pixel values (list of Pixel binary attributes). 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 definitions from ISO/IEC 19775-1 X3D Architecture and base components (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 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 (that is, 0x00-0xFF hexadecimal).
  • 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).
  • A two-component image specifies the intensity in the first (high) byte and the alpha opacity in the second (low) byte.
  • Pixels in a three-component image specify the red component in the first (high) byte, followed by the green and blue components (for example, 0xFF0000 is red, 0x00FF00 is green, 0x0000FF is blue).
  • 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.

8.12.3.22.2 Entity inheritance

8.12.3.22.3 Attributes

# Attribute Type Description
IfcSurfaceTexture (7)
Click to show 7 hidden inherited attributes
IfcPixelTexture (4)
6 Width IfcInteger

The number of pixels in width (S) direction.

7 Height IfcInteger

The number of pixels in height (T) direction.

8 ColourComponents IfcInteger

Indication whether the pixel values contain a 1, 2, 3, or 4 colour component.

9 Pixel LIST [1:?] OF IfcBinary

Flat list of hexadecimal values, each describing one pixel by 1, 2, 3, or 4 components.

Table 8.12.3.22.B

8.12.3.22.4 Formal propositions

Name Description
MinPixelInS

The minimum number of pixel in width (S coordinate) direction shall be 1.

Width >= 1
MinPixelInT

The minimum number of pixel in height (T coordinate) direction shall be 1.

Height >= 1
NumberOfColours

The number of color components shall be either 1, 2, 3, or 4.

{1 <= ColourComponents <= 4}
PixelAsByteAndSameLength

The binary value provided for each Pixel shall be a multiple of 8 bits. And all pixel shall have the same binary length.

SIZEOF(QUERY(temp<* Pixel |
(BLENGTH(temp) MOD 8 = 0) AND
(BLENGTH(temp) = BLENGTH(Pixel[1]))
)) = SIZEOF(Pixel)
SizeOfPixelList

The list of pixel shall have exactly width*height members.

SIZEOF(Pixel) = (Width * Height)
Table 8.12.3.22.C

8.12.3.22.5 Examples

8.12.3.22.6 Formal representation

ENTITY IfcPixelTexture
SUBTYPE OF (IfcSurfaceTexture);
Width : IfcInteger;
Height : IfcInteger;
ColourComponents : IfcInteger;
Pixel : LIST [1:?] OF IfcBinary;
WHERE
MinPixelInS : Width >= 1;
MinPixelInT : Height >= 1;
NumberOfColours : {1 <= ColourComponents <= 4};
PixelAsByteAndSameLength : SIZEOF(QUERY(temp<* Pixel |
(BLENGTH(temp) MOD 8 = 0) AND
(BLENGTH(temp) = BLENGTH(Pixel[1]))
)) = SIZEOF(Pixel);
SizeOfPixelList : SIZEOF(Pixel) = (Width * Height);
END_ENTITY;

8.12.3.22.7 References

Edit on Github


Is this page difficult to understand? Let us know!

8.12.3.22.8 Changelog

8.12.3.22.8.1 IFC4

  • where rule, MinPixelInS
  • where rule, MinPixelInT
  • where rule, NumberOfColours
  • where rule, PixelAsByteAndSameLength
  • where rule, SizeOfPixelList
  • where rule, WR21
  • where rule, WR22
  • where rule, WR23
  • where rule, WR24
  • attribute Pixel type, Changed from "list[1:?] of binary" to "list[1:?] of IfcBinary"