Houdini 20.5 Nodes VOP nodes

MtlX Image VOP node

Samples data from a single image, or from a layer within a multi-layer image.

On this page

Samples data from a single image, or from a layer within a multi-layer image. When used in the context of rendering a geometry, the image is mapped onto the geometry based on geometry UV coordinates, with the lower-left corner of an image mapping to the (0,0) UV coordinate (or to the fractional (0,0) UV coordinate for tiled images).

Tips

  • When reading normal maps, set the type to vector3, to ensure colorspace is not applied to the incoming data.

  • MaterialX nodes don’t currently support non-uniform string inputs. Karma can substitute this node with a USD UV Texture; this lets you control an image path with a string primvar.

  • Color space parameters are not yet supported by UsdMaterialX. See the user guide chapter on Materials, for more details on how Karma currently handles color spaces and texture maps.

  • This node looks for primvars:st by default. If you have multiple sets of texture coordinates, use MtlX Geometry Property Value to specify the texture coordinates primvar.

Parameters

Layer

If the file has multiple layers, then the 'default' layer will be used, or 'rgba' if there is no 'default' layer. If no value for layer is provided and the input file has multiple layers, then the 'default' layer will be used, or 'rgba' if there is no 'default' layer.

Note

The number of channels defined by the type of the image must match the number of channels in the named layer.

Common Image Parameters

File Name

The URI or path of an image file.

Warning

UsdMaterialX does not currently support the filename substitution tokens that MaterialX provides.

Default

A default value to use if the given file can not be resolved, or if the specified layer does not exist in the file. The default value must be the same type as the image element itself, and must be a constant color (i.e. it cannot be a varying primvar or some other pattern or image).

If default is not defined, the default color value will be 0.0 in all channels.

Texture Coordinate

The name of a vector2-type node specifying the 2D texture coordinate at which the image data is read. Default is to use the current u,v coordinate.

UV Address Mode

Determines how UV coordinates outside the 0-1 range are processed before sampling the image. Each UV component can be set independently to one of these modes:

Constant

Texture coordinates outside the 0-1 range return the value of the node’s default color or float parameter.

Clamp

Texture coordinates are clamped to the 0-1 range before sampling the image.

Periodic

Texture coordinates outside the 0-1 range “wrap around”, effectively being processed by a modulo 1 operation before sampling the image.

Mirror

Texture coordinates outside the 0-1 range will be mirrored back into the 0-1 range, e.g. u=-0.01 will return the u=0.01 texture coordinate value, and u=1.01 will return the u=0.99 texture coordinate value.

U Address Mode

Determines how U coordinates outside the 0-1 range are processed before sampling the image. Default is periodic.

V Address Mode

Determines how V coordinates outside the 0-1 range are processed before sampling the image. Default is periodic.

Filter Type

The type of texture filtering to use; standard values include 'closest' (nearest-neighbor single-sample), 'linear', and 'cubic'. If not specified, an application may use its own default texture filtering method.

Frame Range

A string 'minframe-maxframe', e.g. '10-99', to specify the range of frames that the image file is allowed to have, usually the range of image files on disk. Default is unbounded

Frame Offset

A number that is added to the current frame number to get the image file frame number. E.g. if frameoffset is 25, then processing frame 100 will result in reading frame 125 from the imagefile sequence. Default is no frame offset.

Frame End Action

What to do when the resolved image frame number is outside the framerange range.

Karma Texture Controls

Starting with Houdini 20.5, this node has a recipe for adding some Karma-specific Texture Map controls.

Texture Blur

Blurs in x and y directions. Blur is measured as a percentage of the image size - so a blur of 0.1 will blur 10% of the image width. Use xblur and yblur if you need different blur amounts in either dimension.

Texture Width

For Houdini native formats, this sets the filter width in both X and Y directions.

For all other formats (loaded by OpenImageIO), this sets the OIIO swidth and twidth options.

CPU MIP Interpolation

Karma CPU support only

For Houdini native formats, this specifies whether RAT files should interpolate between different MIP levels. By default, this is turned off. Turning interpolation on will help remove discontinuities when different MIP levels of a .rat file are accessed. However, the results of texture evaluation will be slightly softer (i.e. blurrier) and will take more time.

There are three possible values for this argument.

0

Disable MIP map interpolation (fastest).

1

Approximate MIP map interpolation (fast).

2

High Quality MIP map interpolation (slower but highest quality).

For all other formats (loaded by OpenImageIO), a value of 0 specifies a single MIP level, any other value specifies trilinear interpolation.

CPU Linear Filter

Karma CPU support only

Specifies the type of anti-aliasing filter to be used for evaluation.

For Houdini native formats, the following value should be a string specifying one of:

"point"

Point sampling (i.e. no filtering)

"box"

Box filter (default)

"gauss"

Gaussian filter

"bartlett"

Bartlett/Triangular filter

"sinc"

Sinc sharpening filter

"hanning"

Hanning filter

"blackman"

Blackman filter

"catrom"

Catmull-Rom filter

For all other formats (loaded by OpenImageIO), specifying the "point" filter sets the OIIO interpolation mode to "closest" and disables MIP mapping. Any other value uses OIIO smart-bicubic interpolation. You can get finer control using the "filtermode" variadic argument (see below).

Outputs

Out

Output from the texture image.

See also

VOP nodes