Share

sample_texture

Sample a texture object.

Sampling behaviors

Sampling UDIM and other texture-atlas formats (here referred to simply as UDIM) have a slightly different behavior from single images. These differences have to do with how out-of-bounds samples work.

Single images use "clamp" style wrapping for out of bounds samples. This means out of bounds pixels will return the closest pixel on the image, giving the appearance that the image's edge pixels are stretched beyond the UV grid.

UDIM patterns are stricter with sampling. A location outside of the [0-1) are considered to belong to other image tiles. Therefore samples that belong to tiles which are missing will return zero values on samples. Note that this means that samples on UDIM images must be within the [0-1) value, samples on 1.0 will be interpreted as belonging to the next tile.

Other sampling settings

The other sampling settings from sample_texture_file are not on this node as these are set on the texture object, so that the texture itself can specify how it is to be sampled. This includes the interpolation of the image.

Inputs

texture

This is a texture object, which is a format of one or more images mapping to a UV space. This can be created from a file using read_texture.

uvs

The list of uv coordinates where to sample the texture.

property

The pixel property to sample on the images. Note, only float4 images are currently supported.

Outputs

sampled_data

The sampled data, converted to floating point RGBA values, and stored in a 1D array.

Was this information helpful?