Get Geometry Sample
 
 
 

Categories

  • Geometry Queries

Description

Outputs one random location on a geometry for each element in the set. Locations are "glued" to the surface of a geometry so that they stay in the same relative position even as the geometry transforms and deforms, unless you recompute and reset the locations' values at different frames.

This node is similar to the Generate Sample Set node, which generates a set of random locations based on its rate value and typically connects to an Add Point node. However, this node generates exactly one location for each set element. For example, if we're storing the location generated on each point of a point cloud, the number of locations generated will be the number of points in the point cloud.

In addition, you can also narrow from where the locations on polygon mesh geometries will be emitted by using the Filter attribute.

Parameters

Emission Type

Where locations are created:

  • Point returns locations on geometric points.

  • Surface returns locations on the surface of a geometric object (polygon mesh or NURBS surface).

  • Volume returns locations within a the volume defined by a geometric object.

Reference

A reference to an attribute used for filtering locations. If the emission type is set to "Surface", you can specify a portion of the surface; if the emission type is set to "Point", you can specify the points.

The current types supported for the attribute are: Boolean, integer and scalar. Integer and scalar values are clamped to a minimum of 0 and a maximum of 1.

A value of 0 (or false for Boolean) means the corresponding vertex or triangle is discarded from the set of locations. Scalar values between 0 and 1 are used as weights when the emission type is set to Surface: a triangle will emit N% of the locations that it would have emitted without filtering where N is equal to the weight of the triangle multiplied by 100.

The current attribute contexts supported when emitting from a surface are:

  • vertex: the weight of a triangle is the average of the weights of its three vertices.

  • polygon: the weight of a triangle is the value of the attribute at the center of the triangle.

  • polynode: the weight of a triangle is the average of the weights of its three polynodes.

Explore

Click to select the reference from an explorer. You can only choose attributes that are valid at the locations.

Pick

Click to launch a picking session and select a reference from a viewport, explorer, or schematic view.

Invert

Inverts the filtering condition. When this parameter is on, the actual filter will be 1 minus the value of the attribute.

Ports

Inputs

Seed

Defines the sequence of random numbers used. If you require that two nodes generate different sets of values with the same parameters, simply assign them different seeds.

Time Varying

Whether to generate different locations at each frame.

Geometry

The geometry on which the locations are generated.

Outputs

Samples

The locations generated.