Houdini 20.5 VEX

COP pixel sampling functions

On this page

Color sampling

VEX has several functions for sampling a color from an input image in a compositing node:

cinput

Samples the exact pixel color at the given coordinates from an input image.

binput

Samples a 2×2 grid of pixels around the given coordinates and returns the bilinearly interpolated color.

finput

Returns a fully filtered sampled color at the given coordinates.

Use point sampled input functions whenever you are modifying discrete pixel values, since these functions are much faster.

Use filtered functions whenever you are manipulating UV coordinates.

If you are reading and combinging multiple subsamples, bilinear lookups can produce a similar result to finput but much faster.

Multi-pixel sampling

The ninput function reads the red, green, blue, or alpha component from all pixels in a 9×9 grid. This may be useful for building image manipulation kernels.

VEX

Language

Next steps

Reference