Skip to main content

Meta_Texture

Module: Metanodes / Definitions

A Texture contains image data that is referenced by materials. More...

#include <meta_importables.hpp>

Public Types

TypeName
enumColourSpace { ColourSpace_Default, ColourSpace_sRGB, ColourSpace_LinearRGB }
Values for Idx_ColourSpace.
enumContent { Content_Colours, Content_BumpMap, Content_NormalMap, Content_AlphaTest }
Values for Idx_Content.
enumEncoding { Encoding_RGB_XYZ, Encoding_RGB_XZY }
Values for Idx_Encoding.
enumIDX { Idx_Filename, Idx_Minify, Idx_Magnify, Idx_WrapU, Idx_WrapV, Idx_ColourSpace, Idx_DDSData, Idx_DDSModifiedTime, Idx_Content, Idx_Encoding, Idx_AnisotropicDegree, Idx_Transform, Idx_MapChannel, Idx_LODBias, Idx_AlphaRef }
enumMagnify { Magnify_None = 9728, Magnify_Bilinear = 9729 }
Values for Idx_Magnify.
enumMinify { Minify_None = 9728, Minify_Bilinear = 9729, Minify_Trilinear = 9987 }
Values for Idx_Minify.
enumWrap { Wrap_ClampWhite = 33069, Wrap_ClampEdge = 33071, Wrap_Repeat = 10497, Wrap_Mirrored = 33648 }
Values for Idx_WrapU and Idx_WrapV.

Detailed Description

struct 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:

  • Lua: vrReloadTextures
  • C: VRFileToDDSProperty

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

Public Types Documentation

enum ColourSpace

EnumeratorValueDescription
ColourSpace_DefaultColours assumed to be in whichever colour space currently defined by the application (Symbols - C: "ColourSpaceDefault", Lua: __Texture_ColourSpaceDefault)
ColourSpace_sRGBColours are in the sRGB gamma-corrected colour space (Symbols - C: "ColourSpacesRGB", Lua: __Texture_ColourSpacesRGB)
ColourSpace_LinearRGBColours are in the linear colour space (Symbols - C: "ColourSpaceLinearRGB", Lua: __Texture_ColourSpaceLinearRGB)

Values for Idx_ColourSpace.

enum Content

EnumeratorValueDescription
Content_ColoursTexture contains colours (Symbols - C: "ContentColours", Lua: __Texture_ContentColours)
Content_BumpMapTexture contains either a greyscale height map, or RGB encoded tangent-space normals (Symbols - C: "ContentBumpMap", Lua: __Texture_ContentBumpMap)
Content_NormalMapTexture contains RGB encoded object-space normals (Symbols - C: "ContentNormalMap", Lua: __Texture_ContentNormalMap)
Content_AlphaTestTexture contains large transparent regions and will be alpha tested (Symbols - C: "ContentAlphaTest", Lua: __Texture_ContentAlphaTest)

Values for Idx_Content.

enum Encoding

EnumeratorValueDescription
Encoding_RGB_XYZGreen is the up vector (Symbols - C: "EncodingRGBXYZ", Lua: __Texture_EncodingRGBXYZ)
Encoding_RGB_XZYBlue is the up vector (Symbols - C: "EncodingRGBXZY", Lua: __Texture_EncodingRGBXZY)

Values for Idx_Encoding.

enum IDX

EnumeratorValueDescription
Idx_Filenamestring - File name of the texture. See main description for information about how this property is used.
Idx_MinifyMinify (int) - The minify filter to apply to texels that when viewed are smaller than a pixel
Idx_MagnifyMagnify (int) - The magnify filter to apply to texels that when viewed are larger than a pixel
Idx_WrapUWrap (int) - The wrapping mode to use when the U coordinate is outside of the 0.0 - 1.0 range
Idx_WrapVWrap (int) - The wrapping mode to use when the V coordinate is outside of the 0.0 - 1.0 range
Idx_ColourSpaceColourSpace (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_DDSDatavector<char> - Raw DDS data (including DDS headers)
Idx_DDSModifiedTimeint64 - The time the DDSData was last modified. Unix epoch (seconds since Jan 1 1970), stored as two 32-bit ints (LO,HI)
Idx_ContentContent (int) - The usage that this data is intended for
Idx_EncodingEncoding (int) - The encoding of the data when it is intended to be used for normal mapping
Idx_AnisotropicDegreeint - The degree of anisotropy to use when sampling the texture. A value of 1 means isotropic (fastest)
Idx_Transformmat4w - Transform to apply to texture coordinates
Idx_MapChannelint - The texture channel to use from the mesh (see [Meta_VertexAttrib)
Idx_LODBiasfloat - Adjust the mipmap level to make the texture appear sharper or smoother when viewed from a distance when in Trilinear filtering mode
Idx_AlphaReffloat - The alpha reference for mipmap generation when Content=AlphaTested

enum Magnify

EnumeratorValueDescription
Magnify_None9728No texture filtering (Symbols - C: "MagnifyNone", Lua: __Texture_MagnifyNone)
Magnify_Bilinear9729Bilinear texture filtering (Symbols - C: "MagnifyBilinear", Lua: __Texture_MagnifyBilinear)

Values for Idx_Magnify.

enum Minify

EnumeratorValueDescription
Minify_None9728No texture filtering (Symbols - C: "MinifyNone", Lua: __Texture_MinifyNone)
Minify_Bilinear9729Bilinear texture filtering (Symbols - C: "MinifyBilinear", Lua: __Texture_MinifyBilinear)
Minify_Trilinear9987Triliniear texture filtering (Symbols - C: "MinifyTrilinear", Lua: __Texture_MinifyTrilinear)

Values for Idx_Minify.

enum Wrap

EnumeratorValueDescription
Wrap_ClampWhite33069Returns a white texel when texture coordinate outside texture area (Symbols - C: "WrapClampWhite", Lua: __Texture_WrapClampWhite)
Wrap_ClampEdge33071Return the texel from the nearest edge when texture coordinate outside texture area (Symbols - C: "WrapClampEdge", Lua: __Texture_WrapClampEdge)
Wrap_Repeat10497Wrap texture coordinate around when outside texture area, so the texture is tiled in this direction (Symbols - C: "WrapRepeat", Lua: __Texture_WrapRepeat)
Wrap_Mirrored33648Wrap texture coordinate around when outside texture area, mirroring the texture across boundaries (Symbols - C: "WrapMirrored", Lua: __Texture_WrapMirrored)

Values for Idx_WrapU and Idx_WrapV.