Home Website Youtube GitHub

Custom Component Branching Skeleton

Hi

I’m new to mGear and I’m trying to create a custom component and was wondering is it possible to generate a branching skeleton within a component with the self.jnt_pos.append([]) approach most of the other comonents use to build the skeleton

I’ve tried to replicate several instances that i’ve found elsewhere but I either end up with one chain that doesnt branch or if it does branch then the branch is parented under the root joint and not the joint I specified.

Thanks in advance for any help you can give me.

Rich

1 Like

That’s ambitious. :slight_smile:

Just to check, why not just parent components to each other to make a hierarchy? What exactly are you trying to do by “branching”?

Yeah this is controlled by the parent joint index guide setting. But as far as I know, it only changes the joint parent, and doesn’t actually make the rig follow the new parent. That’s been an issue for a while, and I’m not sure it was ever changed.

Threads related to that:

But an easier workaround than making a custom component would be to just write a post process Python script that finds the parent joint, and fixes the constraint.

In this case I’m essentially trying to build a mechanical spine component that needs some additional joints to facilitate the mechanical articulations. I noticed the the EPIC_arm_01 does manage to branch its twist joints but not exactly sure how its doing it.

If I edit the control_01 to add in 2 extra joints and specify the first joint as the parent of both the other joints I still just get a single chain instead of a branch.

   self.jnt_pos.append(
        [
            self.ctl,  # driver node
            'base',  # joint name / tag
            'parent_relative_jnt',
        ]
    )
    self.jnt_pos.append(
        [
            self.ctl,  # driver node
            'branch1',  # joint name / tag
            'base',  # parent tag
        ]
    )
    self.jnt_pos.append(
        [
            self.ctl,  # driver node
            'branch2',  # joint name / tag
            'base',  # parent tag
        ]
    )

I get this:
image
instead of what I’m trying to get:
image

So, for reasons I havent figured out yet. I do get the branching hierachy so long as I make sure the base joint’s tag is in the jointRelatives dictionary

self.jointRelatives[“base”] = 0

Hi! sorry for the late reply
Yes it is possible.

the self.joint_pos now can be pass as a list of dictionary, list of list still supported for backwards compatibility

self.jnt_pos.append(
                        {
                            "obj": roll_off,
                            "name": "forearm",
                            "newActiveJnt": "elbow",
                        }
                    )

newActiveJnt is the key to refer to the joint relative

2 Likes