You can simulate physics on your avatar’s hair, clothes, and body parts with a little bit of scripting and the help of High Fidelity’s Flow technology. The concept of “Flow” simply mimics the natural movement of hair and other attachments on your avatar. You can easily change your avatar’s flow settings using the Flow App. In order to use the Flow App, your avatar must contain flow threads.
In order to use the Flow technology, your avatar must contain flow threads, which are sets of connected joints in your avatar. Each flow thread must comply with the following rules:
- The first joint is connected to an existing avatar joint, such as “Hips”.
- Every joint in the thread should be named
sim[TYPE][INDEX], where TYPE defines a group of joints that share a common physics setup and INDEX is an integer. For example, if the thread is used to simulate a skirt, all the “skirt” joints are named flow_skirt_01, flow_skirt_02, etc.
While experimenting, feel free to use Mannequin with Hair, whose hair has flow threads already configured.
Download and run the Flow app to configure your flow settings.
The Flow app will show up as an icon on your HUD or tablet. Click this icon to open the Flow app.
The Display panel affects how your avatar looks while the Flow app is open. Using these options, you can choose to view meshes and collisions to help you determine what your final flow configuration will look like.
|Avatar||Hides or displays the avatar mesh.|
|Collisions||Activates or deactivates collisions.|
|Debug||Hides or displays the debug shapes.|
|Solid||Enables either a solid or wireframe display for debug shapes.|
The Joints panel lists all of the available flow threads, and lets you configure the behavior of your joints.
|Radius||Determines the thickness of segments and knots (needed for collision testing).|
|Gravity||Sets the how each joint will respond to gravity. A positive value will lift your joints in the air, while a negative value will respond to gravity and be pulled towards the ground. Larger values will cause the movement to happen more quickly.|
|Stiffness||Defines how susceptible the flow threads are to movement.|
|Damping||Determines how easily the bones oscillate or move around the joints.|
|Inertia||Changes the rotational velocity of the bones.|
|Delta||Controls the amount of time between each joint movement.|
The Collisions panel controls the collision spheres that define the interactions between flow threads and the joints in your avatar. Each collision sphere is positioned using an existing avatar joint and offset: as you increase the radius of a collision sphere, you increase the distance between the flow thread and the joint. You can only have a maximum of 4 collisions defined for your avatar.
|Radius||Controls the collision sphere radius.|
|Offset||Controls the collision sphere offset.|
|Flow App||This app lets users easily update Flow settings without the need for scripting or advanced knowledge of avatars.||flowAppCpp.js|
|Mannequin with Hair||This avatar is properly rigged to work with Flow. Use this as an example for your own avatar models.||Mannequin with Hair|