Skip to content

primuvconvert

vector2  primuvconvert(<geometry>geometry, vector2 uv, int prim_num, int mode)

vector2  primuvconvert(<geometry>geometry, vector2 uv, int prim_num, int mode, float tolerance)

float  primuvconvert(<geometry>geometry, float uv, int prim_num, int mode)

float  primuvconvert(<geometry>geometry, float uv, int prim_num, int mode, float tolerance)

geometry

A string specifying a geometry file (for example, a .bgeo) to read from. When running inside Houdini, this can be an op:/path/to/sop reference.

uv

Curve coordinates to convert. Can be a float or a vector2. The function returns the converted coordinates.

prim_num

The primitive number of the curve on which to convert the coordinates.

mode

One of the PRIMUV_space_TO_space constants listed below. You can import the constants from $HFS/houdini/vex/include/math.h.

REAL domain is based on the number of curve segments (0 to nSegments). A segment can hold multiple control points based on the curve degree. UNIT domain is the REAL domain normalized to fit in 0 to 1. UNITLEN domain maps the curve based on its length but normalized (0..1). LEN domain maps the curve based on its length (0..CurveLength).

Constant nameInt value
PRIMUV_REAL_TO_UNIT0
PRIMUV_REAL_TO_UNITLEN1
PRIMUV_REAL_TO_LEN2
PRIMUV_UNIT_TO_REAL3
PRIMUV_UNIT_TO_UNITLEN4
PRIMUV_UNIT_TO_LEN5
PRIMUV_UNITLEN_TO_REAL6
PRIMUV_UNITLEN_TO_UNIT7
PRIMUV_UNITLEN_TO_LEN8
PRIMUV_LEN_TO_REAL9
PRIMUV_LEN_TO_UNIT10
PRIMUV_LEN_TO_UNITLEN11