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
Values for Idx_ColourSpace.
Colours assumed to be in whichever colour space currently defined by the application (Symbols - C: "ColourSpaceDefault", Lua: __Texture_ColourSpaceDefault)
Colours are in the sRGB gamma-corrected colour space (Symbols - C: "ColourSpacesRGB", Lua: __Texture_ColourSpacesRGB)
Colours are in the linear colour space (Symbols - C: "ColourSpaceLinearRGB", Lua: __Texture_ColourSpaceLinearRGB)
Values for Idx_Content.
Texture contains colours (Symbols - C: "ContentColours", Lua: __Texture_ContentColours)
Texture contains either a greyscale height map, or RGB encoded tangent-space normals (Symbols - C: "ContentBumpMap", Lua: __Texture_ContentBumpMap)
Texture contains RGB encoded object-space normals (Symbols - C: "ContentNormalMap", Lua: __Texture_ContentNormalMap)
Texture contains large transparent regions and will be alpha tested (Symbols - C: "ContentAlphaTest", Lua: __Texture_ContentAlphaTest)
Values for Idx_Encoding.
Green is the up vector (Symbols - C: "EncodingRGBXYZ", Lua: __Texture_EncodingRGBXYZ)
Blue is the up vector (Symbols - C: "EncodingRGBXZY", Lua: __Texture_EncodingRGBXZY)
string - File name of the texture. See main description for information about how this property is used.
Minify (int) - The minify filter to apply to texels that when viewed are smaller than a pixel
Magnify (int) - The magnify filter to apply to texels that when viewed are larger than a pixel
Wrap (int) - The wrapping mode to use when the U coordinate is outside of the 0.0 - 1.0 range
Wrap (int) - The wrapping mode to use when the V coordinate is outside of the 0.0 - 1.0 range
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.
vector - Raw DDS data (including DDS headers)
int64 - The time the DDSData was last modified. Unix epoch (seconds since Jan 1 1970), stored as two 32-bit ints (LO,HI)
Content (int) - The usage that this data is intended for
Encoding (int) - The encoding of the data when it is intended to be used for normal mapping
int - The degree of anisotropy to use when sampling the texture. A value of 1 means isotropic (fastest)
mat4w - Transform to apply to texture coordinates
int - The texture channel to use from the mesh (see Meta_VertexAttrib)
float - Adjust the mipmap level to make the texture appear sharper or smoother when viewed from a distance when in Trilinear filtering mode
float - The alpha reference for mipmap generation when Content=AlphaTested
Values for Idx_Magnify.
No texture filtering (Symbols - C: "MagnifyNone", Lua: __Texture_MagnifyNone)
Bilinear texture filtering (Symbols - C: "MagnifyBilinear", Lua: __Texture_MagnifyBilinear)
Values for Idx_Minify.
No texture filtering (Symbols - C: "MinifyNone", Lua: __Texture_MinifyNone)
Bilinear texture filtering (Symbols - C: "MinifyBilinear", Lua: __Texture_MinifyBilinear)
Triliniear texture filtering (Symbols - C: "MinifyTrilinear", Lua: __Texture_MinifyTrilinear)
Values for Idx_WrapU and Idx_WrapV.
Returns a white texel when texture coordinate outside texture area (Symbols - C: "WrapClampWhite", Lua: __Texture_WrapClampWhite)
Return the texel from the nearest edge when texture coordinate outside texture area (Symbols - C: "WrapClampEdge", Lua: __Texture_WrapClampEdge)
Wrap texture coordinate around when outside texture area, so the texture is tiled in this direction (Symbols - C: "WrapRepeat", Lua: __Texture_WrapRepeat)
Wrap texture coordinate around when outside texture area, mirroring the texture across boundaries (Symbols - C: "WrapMirrored", Lua: __Texture_WrapMirrored)