Texture Icon

asTexture

A texture lookup node with full control over OSL’s texture() call.


Parameters


Texture


Filename
The texture filename
Atlas Type

The texture atlas type, it can be one of

  • None (ordinary texture, the default)
  • ZBrush [1]
  • Mudbox
  • Mari [2]

Note

Though a full reference of UV tiles is outside the scope of this document, it suffices to say here that the ZBrush UV tiles pattern is in the form u<N>_v<N> with the tiles starting at 0, whilst Mudbox shares the same pattern but starts at 1. Mari uses the form <UDIM>. All a user needs to do is to point at the filename and choose the respective texture atlas type, and this node should take care of doing the appropriate string substitutions. See also the Maya documentation on UV tiles.

Color
The default color to use if the texture lookup fails for any reason.
Alpha
The default alpha value if there is none in the texture file, or if the lookup of the alpha channel fails for any reason.
Starting Channel
The starting channel for the texture lookup. For an RGBA texture, the starting channel is 0, which is also the default.
S Blur Amount
The amount of blur along the s texture coordinate, defaulting to 0.
T Blur Amount
The amount of blur along the t texture coordinate, defauling to 0.
S Filter Width
A scaling factor for the size of the texture filter as defined by the differentials or implicitly by the differentials of the s texture coordinates, with a default value of 1.0. A value of 0.0 turns off texture filtering.
T Filter Width
A scaling factor for the size of the texture filter as defined by the differentials or implicitly by the differentials of the t texture coordinates, with a default value of 1.0. A value of 0.0 turns off texture filtering.
S Wrap

The texture wrapping mode along the s direction, which can be one of

  • Default (the texture system default)
  • Black
  • Periodic
  • Clamp
  • Mirror
T Wrap

The texture warpping mode along the t direction, which can be one of

  • Default (the texture system default)
  • Black
  • Periodic
  • Clamp
  • Mirror
Interpolation Method

The texture interpolation method, which can take the following values

  • Smart Cubic (default)
  • Cubic
  • Linear
  • Closest

See also

This link on texture filtering for more details.

Color Management

Enable CMS
Toggles the color management options on or off.
Input Transfer Function

Applies an Electro-Optical Transfer Function, or EOTF, to the input texture, linearizing it. It can take the following values

  • None/Raw
  • sRGB
  • Rec.709
  • Gamma 2.2
  • Gamma 2.4
  • Gamma 2.6 (DCI)
  • Rec.1886 [3]
  • Rec.2020
RGB Primaries

It allows the user to set the RGB primaries that define the color space of the input texture, and can take the following values

Rendering RGB Primaries

It allows the user to set the RGB primaries of the rendering or working space, and it should match the choice of rendering/working space of the renderer. It can take the following values

  • sRGB/Rec.709
  • Rec.2020
  • DCI-P3
  • ACES
  • ACEScg

Texture Coordinates

UV Coords
The uv texture coordinates.
UV Filter Size
The computed filter size for the uv texture coordinates.

Outputs

Output Color
The color resulting from the Features Mode choice.
Output Alpha
The alpha resulting from the Features Mode choice, usually luminance of the color only.
Output Single Channel
The output when the texture lookup is made on a greyscale image.

Footnotes

[1]For the ZBrush and Mudbox case, the UV tiles are assumed to be separated by underscores.
[2]This note assumes however, that the UDIM pattern will always come last before the filename extension. That is, if you are using an animated sequence or frames of an animated sequence, then the padded frame numbers must come before the UDIM pattern. I.e, <filename>.<padded frame numbers>.<UDIM>.<extension>.
[3]See ITU-R BT.1886 recommendation for details on the electro-optical transfer function.
[4]Because it makes no sense whatsoever to use colorimetry on non-color information or data, such as normal maps, or Z depth, motion vectors, and so on.
[5]sRGB shares the same CIE xy chromaticity coordinates with ITU-R BT.709/Rec.709 , hence this node refers to the RGB primaries shared by these two color spaces as sRGB/Rec.709.
[6]See encoding characteristics of AdobeRGB specification.

References

[DFD+15]Haarm-Pieter Duiker, Alexander Forsythe, Scott Dyer, Ray Feeney, Will McCown, Jim Houston, Andy Maltz, and Doug Walker. Acescg: a common color encoding for visual effects applications. In Proceedings of the 2015 Symposium on Digital Production, DigiPro ‘15, 53–53. New York, NY, USA, 2015. ACM. URL: http://doi.acm.org/10.1145/2791261.2791273, doi:10.1145/2791261.2791273.
[Ini11]Digital Cinema Initiatives. Rp 431-2:2011 - smpte recommended practice - d-cinema quality #x2014; reference projector and environment. SMPTE RP 431-2:2011, pages 1–14, April 2011. doi:10.5594/SMPTE.RP431-2.2011.
[oMPAS12]The Academy of Motion Picture Arts and Sciences. St 2065-1:2012 - smpte standard - academy color encoding specification (aces). ST 2065-1:2012, pages 1–23, April 2012. doi:10.5594/SMPTE.ST2065-1.2012.
[SCW14]M. Sugawara, S. Y. Choi, and D. Wood. Ultra-high-definition television (rec. itu-r bt.2020): a generational leap in the evolution of television [standards in a nutshell]. IEEE Signal Processing Magazine, 31(3):170–174, May 2014. doi:10.1109/MSP.2014.2302331.