Home Website Youtube GitHub

Spiderverse Joints unlock

Hi,

i just finish an animation with spider verse and now i want to import that into Unreal engine. But while baking the keys to the joints i realized the rig comes with locked joint. And now if im trying to unlock the joint it doesn’t let me do. please suggest me how can i unlock the joints hierarchy so that i can bake and import into engine.

Hello @Seema_Rajput welcome to the Forum!

I don’t think that the joints are locked. At least not on the version I have of the rig. By default mGear builds the joints and connects them to the rig and sets the transform attributes to nonkeyable. Normally this does not affect the FBX export for a game engine. I do this often. When you select the spine_C0_jnt_org and do an FBX export Maya’s FBX export mechanism will take care of baking the joints without any issue.

Hello Jerome. Thank you:)

Well I have tried like how you have mentioned. But again I’m ending up with no animation in the engine. I have followed many tutorials and tried exporting my animation from Maya in different ways, all with no success yet. Did you manage to export spider verse rig with animation in the engine?

mGear is fully in-game friendly. I have no issues at all exporting fbx to Unreal. As Jerome said, bones are not locked, just “constrained”. I use game exporter tool in Maya to export bind pose and animations. To avoid Maya exporting unwanted nodes I manually parent the root of the bone hierarchy to the scene root, not under the rig/groups. This way exports only bones and totally clean, matching to my bind pose. In game exporter you have plenty of options, bake is one of them. I export using a set, that contains all deformers/bones and also untick connections box, so only exports the bone hierarchy. This is a super solid workflow, as game exporter also stores path and name for your models and animations, re-exporting is just a single click away.

Hope it helps.

Milio.

Needless to say that this will only export bone skinning deformations and also, if correctly setup, blendshapes. Nothing else is any how compatible with real-time engines (unless you use alembic cache files). Not sure what Spiderverse rig is having on top of the basic bone deformers but either way skinning and bone animation should come through perfectly fine using game exporter.

Cheers.

1 Like

As Jerome pointed out, the joints are not locked, but they are non-keyable by default. That’s why you are not seeing any animation on Unreal Engine after baking animation to them. You might want to run this code on your scene to change those attributes on all the joints. It’s what we are doing before baking, as we are not using the FBX exporter to bake:

joints = mc.ls(type = 'joint')
attrs = ['translateX',
			 'translateY',
			 'translateZ',
			 'rotateX',
			 'rotateY',
			 'rotateZ',
			 'scaleX',
			 'scaleY',
			 'scaleZ']
	for i in range(len(joints)):
		for j in range(len(attrs)):
			mc.setAttr('{}.{}'.format(joints[i], attrs[j]), k = True, l = False)
2 Likes

I would just like to take the opportunity to rewrite your script a little bit, if I may.

You don’t need to iterate over the range of the length of something. You can iterate directly over the joints and attrs.

import maya.cmds as mc
joints = mc.ls(type = 'joint')
attrs = [
    'translateX',
    'translateY',
    'translateZ',
    'rotateX',
    'rotateY',
    'rotateZ',
    'scaleX',
    'scaleY',
    'scaleZ',
]
for joint in joints:
    for attr in attrs:
        mc.setAttr('{}.{}'.format(joint, attr), keyable=True, lock=False)

Also it is best to write out the entire flag in a command, (keyable=True, lock=False) especially when helping others. The shortened version is not worth the loss in clarity.

3 Likes

Much more clear! Thanks for chiming in, @chrislesage!

Thanks for the suggestions guys. I’m really grateful for this forum. Having said that I’m successfully able to import spider verse into unreal via game exporter.

1 Like