University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

blending setup problem | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
blending setup problem
December 13, 2015
11:12 pm
Avatar
Member
Members
Forum Posts: 5
Member Since:
May 15, 2015
sp_UserOfflineSmall Offline

Hello,
I am trying to make blending work in a project I have (C++ implementation).
I'm using a Mixamo character retargeted to ChrBackovic.sk. All animations are working great but blending is a problem.
At first, I made a 1D blend to make sure things works properly.

SBAnimationBlendManager* blendManager = new SBAnimationBlendManager();
SBAnimationBlend1D* locomo = blendManager->createBlend1D("locomo");
locomo->setBlendSkeleton("ChrBackovic.sk");

vector<std::string> motions = vector<std::string>();
motions.push_back("ChrMarine@Walk01");
motions.push_back("ChrMarine@Jog01");
vector<double> paramsX = vector<double>();
paramsX.push_back(90);
paramsX.push_back(180);

for (int i = 0; i < motions.size(); i++){
locomo->addMotion(motions[i], paramsX[i]);
}
vector<double> points0 = vector<double>();
points0.push_back(0.5);
points0.push_back(0.2);
locomo->addCorrespondencePoints(motions, points0);

And the bml command:
m_pScene->getBmlProcessor()->execBML("Michael","<blend name=\"locomo\" x=\"90\"/>");

I've also tried diffrent animations and parameters.The two animations are working fine separately without blending but when
the blend is set, after the bml command nothing happens. I have the same results using Rachel without retargeting.
Any help, advice would be great.

December 14, 2015
8:23 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

Your first line creates a BlendManager as a new instance. You should instead be accessing the blendmanager from the scene object:

 

SBAnimationBlendManager* blendManager = scene->getBlendManager();

 

Does making that change make things work?

Ari

December 16, 2015
8:16 pm
Avatar
Member
Members
Forum Posts: 5
Member Since:
May 15, 2015
sp_UserOfflineSmall Offline

Thanks, that was the issue. The blending works only for Rachel now. I am trying to make it work for a mixamo character also. I guess I have something wrong with the mapping. Is there a joint that needs to be mapped in order for the blending to work? Something like a root

December 16, 2015
8:20 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

I use this mapping for Mixamo characters:

 

jointMapManager = scene.getJointMapManager()
mixamoMap = jointMapManager.createJointMap("mixamorig")
mixamoMap.setMapping("mixamorig_Hips", "base")
mixamoMap.setMapping("mixamorig_Spine", "spine1")
mixamoMap.setMapping("mixamorig_Spine1", "spine2")
mixamoMap.setMapping("mixamorig_Spine2", "spine3")
mixamoMap.setMapping("mixamorig_Neck", "spine4")
mixamoMap.setMapping("mixamorig_Head", "skullbase")
mixamoMap.setMapping("mixamorig_LeftShoulder", "l_sternoclavicular")
mixamoMap.setMapping("mixamorig_LeftArm", "l_shoulder")
mixamoMap.setMapping("mixamorig_LeftForeArm", "l_elbow")
mixamoMap.setMapping("mixamorig_LeftHand", "l_wrist")
mixamoMap.setMapping("mixamorig_LeftHandThumb1", "l_thumb1")
mixamoMap.setMapping("mixamorig_LeftHandThumb2", "l_thumb2")
mixamoMap.setMapping("mixamorig_LeftHandThumb3", "l_thumb3")
mixamoMap.setMapping("mixamorig_LeftHandThumb4", "l_thumb4")
mixamoMap.setMapping("mixamorig_LeftHandIndex1", "l_index1")
mixamoMap.setMapping("mixamorig_LeftHandIndex2", "l_index2")
mixamoMap.setMapping("mixamorig_LeftHandIndex3", "l_index3")
mixamoMap.setMapping("mixamorig_LeftHandIndex4", "l_index4")
mixamoMap.setMapping("mixamorig_LeftHandMiddle1", "l_middle1")
mixamoMap.setMapping("mixamorig_LeftHandMiddle2", "l_middle2")
mixamoMap.setMapping("mixamorig_LeftHandMiddle3", "l_middle3")
mixamoMap.setMapping("mixamorig_LeftHandMiddle4", "l_middle4")
mixamoMap.setMapping("mixamorig_LeftHandRing1", "l_ring1")
mixamoMap.setMapping("mixamorig_LeftHandRing2", "l_ring2")
mixamoMap.setMapping("mixamorig_LeftHandRing3", "l_ring3")
mixamoMap.setMapping("mixamorig_LeftHandRing4", "l_ring4")
mixamoMap.setMapping("mixamorig_LeftHandPinky1", "l_pinky1")
mixamoMap.setMapping("mixamorig_LeftHandPinky2", "l_pinky2")
mixamoMap.setMapping("mixamorig_LeftHandPinky3", "l_pinky3")
mixamoMap.setMapping("mixamorig_LeftHandPinky4", "l_pinky4")
mixamoMap.setMapping("mixamorig_RightShoulder", "r_sternoclavicular")
mixamoMap.setMapping("mixamorig_RightArm", "r_shoulder")
mixamoMap.setMapping("mixamorig_RightForeArm", "r_elbow")
mixamoMap.setMapping("mixamorig_RightHand", "r_wrist")
mixamoMap.setMapping("mixamorig_RightHandThumb1", "r_thumb1")
mixamoMap.setMapping("mixamorig_RightHandThumb2", "r_thumb2")
mixamoMap.setMapping("mixamorig_RightHandThumb3", "r_thumb3")
mixamoMap.setMapping("mixamorig_RightHandThumb4", "r_thumb4")
mixamoMap.setMapping("mixamorig_RightHandIndex1", "r_index1")
mixamoMap.setMapping("mixamorig_RightHandIndex2", "r_index2")
mixamoMap.setMapping("mixamorig_RightHandIndex3", "r_index3")
mixamoMap.setMapping("mixamorig_RightHandIndex4", "r_index4")
mixamoMap.setMapping("mixamorig_RightHandMiddle1", "r_middle1")
mixamoMap.setMapping("mixamorig_RightHandMiddle2", "r_middle2")
mixamoMap.setMapping("mixamorig_RightHandMiddle3", "r_middle3")
mixamoMap.setMapping("mixamorig_RightHandMiddle4", "r_middle4")
mixamoMap.setMapping("mixamorig_RightHandRing1", "r_ring1")
mixamoMap.setMapping("mixamorig_RightHandRing2", "r_ring2")
mixamoMap.setMapping("mixamorig_RightHandRing3", "r_ring3")
mixamoMap.setMapping("mixamorig_RightHandRing4", "r_ring4")
mixamoMap.setMapping("mixamorig_RightHandPinky1", "r_pinky1")
mixamoMap.setMapping("mixamorig_RightHandPinky2", "r_pinky2")
mixamoMap.setMapping("mixamorig_RightHandPinky3", "r_pinky3")
mixamoMap.setMapping("mixamorig_RightHandPinky4", "r_pinky4")
mixamoMap.setMapping("mixamorig_LeftUpLeg", "l_hip")
mixamoMap.setMapping("mixamorig_LeftLeg", "l_knee")
mixamoMap.setMapping("mixamorig_LeftFoot", "l_ankle")
mixamoMap.setMapping("mixamorig_LeftToeBase", "l_forefoot")
mixamoMap.setMapping("mixamorig_LeftFootToeBase_End", "l_toe")
mixamoMap.setMapping("mixamorig_LeftToe_End", "l_toe")
mixamoMap.setMapping("mixamorig_RightUpLeg", "r_hip")
mixamoMap.setMapping("mixamorig_RightLeg", "r_knee")
mixamoMap.setMapping("mixamorig_RightFoot", "r_ankle")
mixamoMap.setMapping("mixamorig_RightToeBase", "r_forefoot")
mixamoMap.setMapping("mixamorig_RightFootToeBase_End", "r_toe")
mixamoMap.setMapping("mixamorig_RightToe_End", "r_toe")

You can see it working here:

 

 

Ari