Query data on geometric objects
Geometry queries let you sample data from geometric objects, such as the interpolated value of vertex colors across a mesh's surface. A query returns locations or component indices on an object, and then you use those results to look up the corresponding values of one or more existing properties.
High-level queries involve two separate steps, which can be performed in different sections of a graph:
The first step is to use one of the high-level queries in the
Geometry::Query
namespace:The second step is to use the output of the query to access values of one or more properties on the geometry. Depending on the query, it might return locations, point indices, or both.
- Use a
sample_property
node to get data from locations across a mesh's surface or along strands. See Sample geo properties at locations. - Use the returned indices to access the values in the data array of a geo property directly. See Getting and setting properties of geometric objects.
- Use a
You can also use the basic building blocks in the Geometry::Query
namespace to create custom queries for special purposes. This can be more efficient, for example, if you want to find closest locations as well as points in radius on the same geometry, or want to find locations within a for_each
or other type of loop. See Create custom geometry queries.