Class ZivaRTPlayer
A ZivaRT runtime component that can be attached to a GameObject. When configured properly this will allow for Ziva to be used to deform skin a mesh.
Inherited Members
Namespace: Global Namespace
Syntax
[RequireComponent(typeof(Animator))]
[RequireComponent(typeof(MeshFilter))]
[RequireComponent(typeof(MeshRenderer))]
[ExecuteInEditMode]
public class ZivaRTPlayer : MonoBehaviour, IAnimationWindowPreview
Fields
DrawDebugVertices
Draw the vertices of the imported ZivaRT asset.
Declaration
public bool DrawDebugVertices
Field Value
Type | Description |
---|---|
Boolean |
SuppressGeometryWarningMessages
Don't print out warnings about issues discovered with the mesh, eg: degenerate face UVs.
Declaration
public bool SuppressGeometryWarningMessages
Field Value
Type | Description |
---|---|
Boolean |
Properties
animationRoot
The animation root for which the animation should be applied from
Declaration
public Transform animationRoot { get; set; }
Property Value
Type | Description |
---|---|
Transform |
calculateMotionVectors
Should motion vectors for deformed positions be calculated?
Declaration
public bool calculateMotionVectors { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
enableCorrectives
Whether to apply pre-skinning correctives from the ZivaRT solver (generally used for debugging).
Declaration
public bool enableCorrectives { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
enableSkinning
Whether to apply skinning to the mesh using the ZivaRT solver (used for debugging).
Declaration
public bool enableSkinning { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
gameObjectRoot
The GameObject root for which the animation should be applied from
Declaration
public Transform gameObjectRoot { get; set; }
Property Value
Type | Description |
---|---|
Transform |
implementation
Select which internal implementation is used to perform the deformation. Different implementations have different properties (CPU vs GPU).
Declaration
public ZivaRTPlayer.Implementation implementation { get; set; }
Property Value
Type | Description |
---|---|
ZivaRTPlayer.Implementation |
meshRescale
Scale factor that should be applied to the Ziva RT vertices to match the mesh scaling applied on the imported mesh file
Declaration
public float meshRescale { get; set; }
Property Value
Type | Description |
---|---|
Single |
multithreadedJointUpdates
Should joint transform updates execute on multiple threads? This delays solver execution to LateUpdate
Declaration
public bool multithreadedJointUpdates { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
recalculateTangentFrames
Should the solver recompute target mesh normals and tangents each frame?
Declaration
public RecomputeTangentFrames recalculateTangentFrames { get; set; }
Property Value
Type | Description |
---|---|
RecomputeTangentFrames |
rig
The ZivaRT rig asset used to deform the target character mesh.
Declaration
public ZivaRTRig rig { get; set; }
Property Value
Type | Description |
---|---|
ZivaRTRig |
sourceMesh
Source Mesh that will be deformed by the Ziva Rig. A copy will be created for the deformation which means this source mesh will not be modified directly.
Declaration
public Mesh sourceMesh { get; set; }
Property Value
Type | Description |
---|---|
Mesh |
startExecutionInLateUpdate
Should deformation calculations be started in the LateUpdate phase or normal Update phase?
Declaration
public bool startExecutionInLateUpdate { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
useMeshTransformForRegistration
Apply the local transform of the Skinned Mesh during vertex correspondence registration step.
Declaration
public bool useMeshTransformForRegistration { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
RunSolver()
Runs the ZivaRT solver in it's current configuration. Note that by default the solver is already run if the object containing the ZivaRT component is visible. This method should only be used in advanced scenarios where there is a requirement to explicitely invoke the solver.
Declaration
public void RunSolver()
Explicit Interface Implementations
IAnimationWindowPreview.BuildPreviewGraph(PlayableGraph, Playable)
Appends custom Playable nodes to the Animation window PlayableGraph and sets it up to receive data from the ZivaRT Player.
Declaration
Playable IAnimationWindowPreview.BuildPreviewGraph(PlayableGraph graph, Playable inputPlayable)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | The Animation window PlayableGraph. |
Playable | inputPlayable | Current root of the PlayableGraph. |
Returns
Type | Description |
---|---|
Playable |
Implements
IAnimationWindowPreview.StartPreview()
Notification callback when the Animation window starts previewing an AnimationClip. Makes extra parameters be updated when the Animation window plays or otherwise updates.
Declaration
void IAnimationWindowPreview.StartPreview()
Implements
IAnimationWindowPreview.StopPreview()
Notification callback when the Animation window stops previewing an AnimationClip. Stops extra parameters from being updated when the Animation window plays or otherwise updates.
Declaration
void IAnimationWindowPreview.StopPreview()
Implements
IAnimationWindowPreview.UpdatePreviewGraph(PlayableGraph)
Notification callback when the Animation Window updates its PlayableGraph before sampling an AnimationClip.
Declaration
void IAnimationWindowPreview.UpdatePreviewGraph(PlayableGraph graph)
Parameters
Type | Name | Description |
---|---|---|
PlayableGraph | graph | The Animation window PlayableGraph. |