Houdini 20.5 VEX

Geometry functions

On this page

Overview

In Houdini, geometry is made up of primitives, with the most common primitive being a polygonal faces. Each corner of a polygonal face is a vertex. To keep individual faces together as part of a surface, vertices of separate faces can be fused together as a point. When a point moves, Houdini automatically moves each of the point’s vertices as well.

Geometry traversal

  • You can use vertexpoint to get from a vertex to its point.

  • You can use pointvertex to get from a point to its first vertex and vertexnext and vertexprev to iterate through the list of vertices sharing that point.

  • To iterate through the vertices of a polygonal face, use primvertexcount to get the number of vertices, then you can use the primitive number and a counter from 0 to primitive count› - 1 to refer to the vertices.

  • A vertex number is the 0-based index of a certain vertex of a primitive. A linear vertex number is the 0-based index of a certain primitive across all the geometry. It is just a slightly more convenient way to refer to a vertex with one number instead of two (primitive number and vertex number). You can use vertexindex to get a linear vertex number from a primitive number and a vertex number. Use both vertexprim and vertexprimindex to convert the other way, from a linear vertex number to a primitive number and a vertex number.

Returns

Function

Argument(s)

Point number

vertexpoint

Linear vertex number

Linear vertex number

pointvertex

Point number

Linear vertex number

vertexnext

Linear vertex number

Linear vertex number

vertexprev

Linear vertex number

Linear vertex number

vertexindex

Primitive number, Vertex number

Number of vertices

primvertexcount

Primitive number

Primitive number

vertexprim

Linear vertex number

Vertex number

vertexprimindex

Linear vertex number

VEX

Language

Next steps

Reference