Meta_Texture

A Texture contains image data that is referenced by materials.

The texture data is expected to be provided in DDS format. Alternatively a script or plugin may use the following API functions to populate the DDSData automatically from an image file:

The C API may also convert an arbitrary blob of pixel data to DDS using VRBlobToDDSProperty

Public Types


Values for Idx_ColourSpace.

ColourSpace_Default

Colours assumed to be in whichever colour space currently defined by the application (Symbols - C: "ColourSpaceDefault", Lua: __Texture_ColourSpaceDefault)

ColourSpace_sRGB

Colours are in the sRGB gamma-corrected colour space (Symbols - C: "ColourSpacesRGB", Lua: __Texture_ColourSpacesRGB)

ColourSpace_LinearRGB

Colours are in the linear colour space (Symbols - C: "ColourSpaceLinearRGB", Lua: __Texture_ColourSpaceLinearRGB)


enum Content

Values for Idx_Content.

Content_Colours

Texture contains colours (Symbols - C: "ContentColours", Lua: __Texture_ContentColours)

Content_BumpMap

Texture contains either a greyscale height map, or RGB encoded tangent-space normals (Symbols - C: "ContentBumpMap", Lua: __Texture_ContentBumpMap)

Content_NormalMap

Texture contains RGB encoded object-space normals (Symbols - C: "ContentNormalMap", Lua: __Texture_ContentNormalMap)

Content_AlphaTest

Texture contains large transparent regions and will be alpha tested (Symbols - C: "ContentAlphaTest", Lua: __Texture_ContentAlphaTest)


Values for Idx_Encoding.

Encoding_RGB_XYZ

Green is the up vector (Symbols - C: "EncodingRGBXYZ", Lua: __Texture_EncodingRGBXYZ)

Encoding_RGB_XZY

Blue is the up vector (Symbols - C: "EncodingRGBXZY", Lua: __Texture_EncodingRGBXZY)


enum IDX
Idx_Filename

string - File name of the texture. See main description for information about how this property is used.

Idx_Minify

Minify (int) - The minify filter to apply to texels that when viewed are smaller than a pixel

Idx_Magnify

Magnify (int) - The magnify filter to apply to texels that when viewed are larger than a pixel

Idx_WrapU

Wrap (int) - The wrapping mode to use when the U coordinate is outside of the 0.0 - 1.0 range

Idx_WrapV

Wrap (int) - The wrapping mode to use when the V coordinate is outside of the 0.0 - 1.0 range

Idx_ColourSpace

ColourSpace (int) - The colour space of the texture. A non-default value may involve automatic internal conversion to the colour space used by the application.

Idx_DDSData

vector - Raw DDS data (including DDS headers)

Idx_DDSModifiedTime

int64 - The time the DDSData was last modified. Unix epoch (seconds since Jan 1 1970), stored as two 32-bit ints (LO,HI)

Idx_Content

Content (int) - The usage that this data is intended for

Idx_Encoding

Encoding (int) - The encoding of the data when it is intended to be used for normal mapping

Idx_AnisotropicDegree

int - The degree of anisotropy to use when sampling the texture. A value of 1 means isotropic (fastest)

Idx_Transform

mat4w - Transform to apply to texture coordinates

Idx_MapChannel

int - The texture channel to use from the mesh (see Meta_VertexAttrib)

Idx_LODBias

float - Adjust the mipmap level to make the texture appear sharper or smoother when viewed from a distance when in Trilinear filtering mode

Idx_AlphaRef

float - The alpha reference for mipmap generation when Content=AlphaTested


enum Magnify

Values for Idx_Magnify.

Magnify_None

No texture filtering (Symbols - C: "MagnifyNone", Lua: __Texture_MagnifyNone)

Magnify_Bilinear

Bilinear texture filtering (Symbols - C: "MagnifyBilinear", Lua: __Texture_MagnifyBilinear)


enum Minify

Values for Idx_Minify.

Minify_None

No texture filtering (Symbols - C: "MinifyNone", Lua: __Texture_MinifyNone)

Minify_Bilinear

Bilinear texture filtering (Symbols - C: "MinifyBilinear", Lua: __Texture_MinifyBilinear)

Minify_Trilinear

Triliniear texture filtering (Symbols - C: "MinifyTrilinear", Lua: __Texture_MinifyTrilinear)


enum Wrap

Values for Idx_WrapU and Idx_WrapV.

Wrap_ClampWhite

Returns a white texel when texture coordinate outside texture area (Symbols - C: "WrapClampWhite", Lua: __Texture_WrapClampWhite)

Wrap_ClampEdge

Return the texel from the nearest edge when texture coordinate outside texture area (Symbols - C: "WrapClampEdge", Lua: __Texture_WrapClampEdge)

Wrap_Repeat

Wrap texture coordinate around when outside texture area, so the texture is tiled in this direction (Symbols - C: "WrapRepeat", Lua: __Texture_WrapRepeat)

Wrap_Mirrored

Wrap texture coordinate around when outside texture area, mirroring the texture across boundaries (Symbols - C: "WrapMirrored", Lua: __Texture_WrapMirrored)

No Results.

Getting StartedArchitectureBest PracticesHow ToAdvanced TopicsChangelogvrtree_cppCoreForeign Function InterfaceMetanodesMigrationsObserversPropertiesTreeUtilitiesAPI DefinitionsVR ExchangePluginsLua API