tex
expression function
Returns the interpolated color of a point on an on-disk texture map.
Replaced by: hou.pixelColorInFileByUV
Usage
tex(filename, U, V, color_type)
Textures can be 1, 3 or 4 channel images containing 8-bit, 16-bit or floating point data.
color_type can be one of:
-
r, R, or D_CR = Red channel
-
g, G, or D_CG = Green channel
-
b, B, or D_CB = Blue channel
-
a, A, or D_CA = Alpha channel
-
h, H, or D_CHUE = Color hue
-
s, S, or D_CSAT = Color saturation
-
v, V, or D_CVAL = Color value
-
l, L, or D_CLUM = Color luminance
This function will interpolate colors smoothly between pixels. For the non-interpolated version, use texni.
When the color component asked for doesn’t match the format of the image, some default behaviour will be taken.
Examples
tex("Mandril.pic", $BBX, $BBY, r).