Share

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 a float3 or array<float3> to specify the positions — typically, this is the point_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 to sample_field_with_proxies for faster performance. In such a case, you can remove the unwanted values from the point_position array and connect an array with the remaining indices into proxy_property_indices.

Was this information helpful?