C# Class KinectStreamConverter.Rigging

Allow to make an automatic merge from the pinnochio application The technique is similar to the one used for the PM_heatWeigh plugin
Exibir arquivo Open project: loic-lavergne/mckineap

Public Methods

Method Description
AutomaticRigging ( string modelPath, Assimp.Scene scene ) : void

Generate weights and skeleton Nodes from Nothing. It takes a scene with a single model and generates inside a NodeArchitectures/Associated Bones/Vertex Weights

AutomaticRiggingFromSkeleton ( string modelPath, Assimp.Scene scene, Assimp.Animation skeletalAnim, Assimp.Node rootSkeletalAnim ) : void

Generate weights and skeleton Nodes from an assimp skeleton Node. However pinocchio does not looks to be very good with that Method. It takes a

ChangeRiggingPath ( string projectPath ) : void
ExportToPinocchioFormat ( string projectPath, Assimp.Animation anim, Assimp.Node rootNodeAnim, int i, int frameIndex ) : void

Export a skeleton.out file that can be used by Pinocchio

Rigging ( ) : System

Private Methods

Method Description
AddVertexToBone ( Assimp.Scene mainScene, int vertexId, int boneId, float boneWeight ) : void

Make a vertice dependent of a Bone

BuildBones ( Mesh mainMesh, Assimp.Node rootNodeAnim ) : void
BuildBonesWeight ( Assimp.Scene mainScene ) : void

Creation of bone structure from the weight.out file 1) Initialize and build every bones (and associate them to a nodeAnim) 2) Associate Each Vertex inside the firstMesh to a Bone)

BuildFrameAnimation ( Assimp.Animation anim, Assimp.Node rootNodeAnim, Matrix4x4 curMat, int frameIndex, string &result ) : string
BuildNodesFromSkeleton ( string skeletonPathFile ) : Assimp.Node
BuildPinocchioAnimation ( Assimp.Animation anim, Assimp.Node rootNodeAnim, int frameIndex ) : string
InitTmpDirPath ( ) : void
LaunchPinocchioBinary ( string modelPath, string exportedSkeletonPath ) : string

A synchronous call to pinocchio

StackMatrix ( Matrix4x4 parentMatrix, NodeAnimationChannel nodeAnim, int frameIndex ) : Matrix4x4

Stack a new matrix on the current one from information available inside the NodeAnimationChannels

Method Details

AutomaticRigging() public method

Generate weights and skeleton Nodes from Nothing. It takes a scene with a single model and generates inside a NodeArchitectures/Associated Bones/Vertex Weights
public AutomaticRigging ( string modelPath, Assimp.Scene scene ) : void
modelPath string The original model Path
scene Assimp.Scene The scene with the model
return void

AutomaticRiggingFromSkeleton() public method

Generate weights and skeleton Nodes from an assimp skeleton Node. However pinocchio does not looks to be very good with that Method. It takes a
public AutomaticRiggingFromSkeleton ( string modelPath, Assimp.Scene scene, Assimp.Animation skeletalAnim, Assimp.Node rootSkeletalAnim ) : void
modelPath string The original model Path
scene Assimp.Scene
skeletalAnim Assimp.Animation
rootSkeletalAnim Assimp.Node
return void

ChangeRiggingPath() public method

public ChangeRiggingPath ( string projectPath ) : void
projectPath string
return void

ExportToPinocchioFormat() public method

Export a skeleton.out file that can be used by Pinocchio
public ExportToPinocchioFormat ( string projectPath, Assimp.Animation anim, Assimp.Node rootNodeAnim, int i, int frameIndex ) : void
projectPath string
anim Assimp.Animation
rootNodeAnim Assimp.Node
i int
frameIndex int
return void

Rigging() public method

public Rigging ( ) : System
return System