PixelTexture creates a 2D-image texture map using a numeric array of pixel values. Texture maps have a 2D coordinate system (s, t) horizontal and vertical, with (s, t) texture-coordinate values in range [0.0, 1.0] for opposite corners of the image.
The PixelTexture node belongs to the Texturing component and requires at least level 1, its default container field is texture. It is available since VRML 2.0 and from X3D version 3.0 or higher.
1 2 3 4 5 6 + X3DNode + X3DAppearanceChildNode + X3DTextureNode + X3DSingleTextureNode + X3DTexture2DNode + PixelTexture
Author-provided prose that describes intended purpose of the url asset.
- Many XML tools substitute XML character references for special characters automatically if needed within an attribute value (such as & for & ampersand character, or " for “ quotation-mark character).
Defines image: width, height, number_of_components per each pixel value, and list of pixel_values. Note that width and height are pixel count, and allowed values for RGBA number_of_components in each pixel value are 1 (intensity), 2 (intensity alpha), 3 (red green blue), 4 (red green blue alpha-opacity).
- It is easier to understand hexadecimal values for each pixel, but integer values are also allowed.
- The array of pixel values has length = (width*height).
- The full list of integers in this field has length = (width*height + 3).
- The order of initial values in PixelTexture and PixelTexture3D image arrays are different. Example: intensity [1 2 1 0xFF 0x00] Example: intensity-alpha [2 2 1 0 255 255 0] Example: red-green-blue [2 4 3 0xFF0000 0xFF00 0 0 0 0 0xFFFFFF 0xFFFF00] Example: red-green-blue-alpha [2 2 4 0xFFFFFFAA 0xFFFF00AA 0x11111111AA 0x787800AA]
Whether to repeat texture along S axis horizontally from left to right.
Whether to repeat texture along T axis vertically from top to bottom.
Single contained TextureProperties node that can specify additional visual attributes applied to corresponding texture images.
- This is a good way to bundle image(s) into a single scene file, avoiding multiple downloads.
- X3D-Edit includes PixelTexture image-conversion import capabilities.
- Can contain a single TextureProperties node.
- Insert Shape and Appearance nodes before adding texture.
- X3D Scene Authoring Hints, Images and Videos
- If a texture is opaque, omitting values in the alpha channel can help avoid rendering artifacts related to transparency.
- Texture coordinates are reapplied (or else recomputed if textureTransform field initially NULL) whenever the corresponding vertex-based geometry changes.
- Texture mapping
- X3D Architecture 17.2.2 Lighting model
- Aggregate file size can grow dramatically.
- See ComposedCubeMapTexture and TextureBackground for special containerField values.