Sample fields
After creating a field, you must sample it. This means evaluating its value at one or more positions so that you can use those values in your calculations.
Use
sample_field
to evaluate a scalar or vector field. Connect afloat3
orarray<float3>
to specify the positions — typically, this is thepoint_position
property of some geometric object.Use
sample_field_with_proxies
to evaluate a proxy field. In addition to the field and positions, you must connect the point-based or volume geometry with the property that the proxy field uses.When you are working with objects with very many points and you want only a few points to be affected by the field, you might want to filter the
point_position
array before connecting it tosample_field_with_proxies
for faster performance. In such a case, you can remove the unwanted values from thepoint_position
array and connect an array with the remaining indices intoproxy_property_indices
.