UVPin

A UVPin Behavior (beUVPin) binds an entity according to its projected position on source terrain and destination mesh. The destination position is the one having the same UV on destination mesh as on the source terrain.

To use a UVPin Behavior, the Terrain Locator associated to the Crowd Manager must be used.

A UVPin behavior in the Behavior Editor


Characters (left) are transformed from a planar ground to a spherical one (right)

UV Pin allows characters to be transformed from a terrain geometry onto a destination mesh. It uses the UV for computing the corresponding transformation

CREATION

  • Behavior Editor / Behavior Library: 
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeUVPin Node
  • MEL command: glmCrowdBeUVPinCmd;

CONFIGURATION

A UVPin Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.

UVPin Attributes

Terrain Locator

Terrain Locator which is used by the behavior. It is used by Entities to adapt their feet to the ground, reach a target with a Go To Behavior and avoid other Entities with the Navigation Behavior. The Terrain Locator can be overriden in each Crowd Field if required.

In Maya Geometry The pinning destination Maya polygons. If several polygons are listed in the "In Maya Geometry" attributes of the Terrain Locator, several destination polygons can be defined in this Behavior (listing order matters!)
Maya Geometry Mode

Specify whether the geometry to pin on is Static (non moving), Dynamic Transform(geometry transform changes each frame) or Dynamic Mesh (Mesh vertices and transform change each frame). Refreshing geometry can take a huge amount of time per frame.


Left: the same characters transformed onto a moving sphere with Dynamic Transform - Right:
Characters are mapped using Dynamic Mesh mode onto a sphere with a wave modifier

Starting / Stopping Duration Attributes

Starting Duration

Time during which the behavior goes from inactive to fully active (in seconds).
Stopping Duration Time during which the behavior goes from active to fully inactive (in seconds).

Advanced Attributes

Evaluation Mode

Specifies if this Behavior should be evaluated before of after the Physics Behaviors.
UV Map Resolution Resolution of the internal texture map used for space change. Increase the size if the terrain is huge and needs extra details.
Orientation Smoothing Orientation Smoothing, when using highly slopped terrain, will reduce orientation jittering and fast direction changes. Smoothing is not done over multiple frames; It is performed thanks to multi-sampling.