Geometry (beta)

Used to sample Geometry data.
Parameters
Parameter | Description |
---|---|
Geometry | The input object. |
Mode | Please see the table below for detailed description on the difference modes. |
Attribute | The name of the attribute to sample when in Attribute mode. |
Modes
Mode | Description |
---|---|
Closest Point | Return the closest point on the input geometry. |
Closest Normal | Return the closest normal on the input geometry. |
Vector To Closest Point | Returns a vector from the current point to the closest point on the input geometry |
Distance | Returns the distance between the current point and the closest point on the input geometry |
Face Index | Returns the index of the closest face on the input geometry |
Attribute | Returns the sampled attribute value on the input geometry, where the attribute name is provided in the Attribute parameter |
Example
If you want to see the completed example you can download yeti_geometrySamplerExample.ma
To get started you can start your scene with a Yeti node assigned to a sphere and a simple graph.

A cube can be created and added to the Yeti graph via the Input Objects tab in the Attribute Editor.

A Geometry sampler node can be created and set the Geometry to the newly added pCubeShape1
and set the Mode to Vector To Closest Point. This will compute a vector from the current vertex to the closest point on the object.

Now we can use this vector to displace the points onto the object. First we create a Displacement node and add the result of geometry0
to the Direction parameter of displacement0
.


The Direction parameter is set to Normalize by default, but if we set this Off and then set the amount to 1.0 you will see all of the point will be displaced to the surface of pCubeShape01
.
To make this more visible we can set the Amount parameter to an expression $strandu
which will modulate the effect along the length of the fibre.

This is a dynamic effect, so as the sphere or cube move the fibres will always be trying to find the closest point on the surface.