The texture resource contains texture image files. Textures are stored as a binary resource within a node. I3S supports JPEG and PNG, as well as compressed texture formats S3TC, ETC2, and Basis Universal. When creating a scene layer using textures for example, a 3D Object scene layer, the appropriate texture encoding declaration needs to be provided. This is done using MIME types such as image/jpeg
(for JPEG), image/vnd-ms.dds
(for S3TC) and image/ktx2
(for Basis Universal). Textures should be in RGBA format. RGBA is a three-channel RGB color model supplemented with a 4th alpha chanel.
The integrated mesh and 3D object profile types support textures. The textures file is a binary resource that contains images to be used as textures for the features in the node. A single texture file contains
In I3S version 1.6, the size property will give you the width of a texture. In version 1.7, the texelCountHint can be used to determine the cost of loading a node as well as for use in texel-resolution based LoD switching. (A texel, texture element, or texture pixel is the fundamental unit of a texture map.) Compressed textures(S3TC, ETC, Basis Universal) may contain mipmaps.
Mipmaps (also MIP maps) or pyramids are pre-calculated, optimized sequences of images, each of which is a progressively lower resolution representation of the same image. The height and width of each image, or level, in the mipmap is a power of two smaller than the previous level.
When compressing textures with mipmaps, the texture dimensions must of size
Individual textures should be aggregated into texture atlases (e.g. 2048 x 2048 pixel). A node can only have one texture atlas. Each individual texture becomes a subtexture. As with all texture resources, the atlas has to be of size
Subtexture pixels are identified by the subimageRegion attribute: [umin, vmin, umax, vmax]. Region information is passed to the shader using a separate vertex attribute, which converts a UV vertex coordinate to a UVR coordinate. R encodes the [umin, vmin, umax, vmax] attribute values into 4 UInt16 values.
Texture coordinates do not take atlas regions into account directly. They range from 0 to 1 in U and V, except when using the 'repeat' wrapping mode. In repeat mode, U and V range from 0 to
Property | Type | Description |
---|---|---|
encoding | string[] | MIMEtype[1..*] The encoding/content type that is used by all images in this map |
wrap | string[] | Possible values for each array string:
|
atlas | boolean | True if the Map represents a texture atlas. |
uvSet | string | The name of the UV set to be used as texture coordinates. |
channels | string | Indicates channels description. Possible values are:
|
{
"encoding": [
"image/jpeg",
"image/vnd-ms.dds",
"image/ktx2"
],
"wrap": [
"none",
"none"
],
"atlas": false,
"uvSet": "uv0",
"channels": "rgb"
}