UV Lookup

Builds a texture by reading another texture at the coordinates a UV map provides.

Outputs

NameTypeDescription
OutputTextureThe input, rearranged by the UV map, at the size of the UV map.

Inputs

NameTypeDescription
InputTextureThe texture to read from.
UV MapTextureFor every output pixel, where to read in the input. Red is across, from 0 at the left edge to 1 at the right, and green is down, from 0 at the top to 1 at the bottom.

Parameters

NameTypeDescription
UV ChannelsSwizzleWhich two channels of the UV map are the coordinates, across and then down. A 0 holds that coordinate at the left or top edge.
Tiling XEnumWhat is read where a coordinate lies left of 0 or right of 1. None gives transparent, Repeat wraps around to the other side, Mirror reads the texture flipped and Clamp repeats the edge pixels.Choices: None, Repeat, Mirror, Clamp
Tiling YEnumWhat is read where a coordinate lies above 0 or below 1, with the same choices as Tiling X.Choices: None, Repeat, Mirror, Clamp
FilteradvancedEnumHow the input is read between its pixels. Nearest keeps hard pixels, and Linear Nice keeps edges next to transparency clean.Choices: Nearest, Linear Fast, Linear Nice
FormatadvancedEnumThe pixel format of the output. Auto keeps the format of the input.

The UV Lookup operator rebuilds a texture from a map of positions. Every pixel of the UV map says where to read in the input, and the output pixel gets the color found there. Use it for lens effects, projections onto odd shapes, or any warp you can draw as a map. Where Displace nudges pixels away from where they were, UV Lookup says outright where each one comes from.

A map that runs from black at the top left to red at the right and green at the bottom reproduces the texture as it is. With Tiling on Repeat, a map that runs from 0 to 3 repeats the texture three times.

An 8 bit map can only point at 256 positions across and 256 down, which shows as steps on a large texture. Set the Format of the operator that makes the map to a 16 or 32 bit float format for a smooth result.

See also Displace.

Keywords: warp, remap, distort, coordinates, uv map, lookup, projection, lens