University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Script to Automatic Rigging model | 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
Script to Automatic Rigging model
August 20, 2015
5:43 pm
Avatar
Member
Members
Forum Posts: 14
Member Since:
July 25, 2015
sp_UserOfflineSmall Offline

i've an dae model and i need to auto map bones to send by bonebus each of them. so, i downloaded from mixamo an model.
Till now i did manually (Automatic Rigging) of Smartbody manual and its BML (maleLocomotion) works fine.
What i need is create and script to excute an automatic rigging automaticlly to my model  without processed manually each step of (Automatic Rigging) procedure.
Someone knows where and how can i create an script for this?

August 21, 2015
12:07 am
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

You should be able to do something like this:

 

from AutoRig import *

assetManager = scene.getAssetManager()

 

assetManager.loadAsset('c:/users/shapiro/path/to/my/mesh.ply')   # path to your 3D model

 

pawn = scene.createPawn("myCharacter ") # create an object

setPawnMesh(myCharacter, "mesh.ply")  # attach the mesh to the object

 

autoRigManager = SBAutoRigManager.getAutoRigManager()

autoRigManager.buildAutoRiggingFromPawnMesh(“myCharacter”,0, myCharacter.sk', myCharacter.dae') # convert the object+mesh into a rigged character

saveDeformableMesh('testAutoRig.dae', myCharacter.sk', "c:/users/shapiro/myscans/") # save out the COLLADA file

quit()

August 24, 2015
7:12 am
Avatar
Member
Members
Forum Posts: 22
Member Since:
August 23, 2015
sp_UserOfflineSmall Offline

Ari, 

I use this method to convert .obj file to .dae and .sk,  but why I only get .dae file?  No error message in command window.

Below is my code:

------------------------------------------------------------------------------------

 from AutoRig import *
assetManager = scene.getAssetManager()

assetManager.loadAsset('C:/Users/paullong/Desktop/testFormat/heny_body.obj') # path to your 3D model

pawn = scene.createPawn("heny") # create an object
setPawnMesh("heny", "heny_body.obj",0.1) # attach the mesh to the object

autoRigManager = SBAutoRigManager.getAutoRigManager()
autoRigManager.buildAutoRiggingFromPawnMesh('heny',1, 'heny.sk', 'heny.dae') # convert the object+mesh into a rigged character
saveDeformableMesh('heny.dae', 'heny.sk', "C:/Users/paullong/Desktop/testFormat/") # save out the COLLADA file

------------------------------------------------------------------------

 

Thank you!

Paul.

Ari Shapiro said

Access denied - ajax nonce check failed

Do you need to log in? (Log in)