Nodes/MKRShift_Nodes/Face Performance Rig Build Neutral
ComfyUI Node

Face Performance Rig Build Neutral

Build the calm, neutral face your rig needs before any motion lands on it

By criskb·Created 7 months ago·Updated 5 months ago· 0
Face Performance Rig Build Neutral
    • neutral_rig_json
    • summary
    reference_landmarks_json{}
    image_width0
    image_height0
    settings_json{}

    Before you can push motion onto a face rig, the rig needs a resting state - the neutral face everything else is measured against. MKRFacePerformanceRigBuildNeutral is the MKRShift node that builds that neutral rig, either from canonical defaults or from a set of reference landmarks you supply. It's the foundation step of the pack's face-performance rig lane, and the output is what every subsequent retarget stage assumes exists.

    If you've used the pack's other performance nodes, the shape will feel familiar: landmarks in, a JSON rig out. But where the others process motion, this one establishes identity - the geometry that says "this is this character's face," so deltas can be applied on top of it later.

    How it works

    Inputs are refreshingly few:

    • reference_landmarks_json - a JSON object keyed by landmark name, each value a two-element [x, y] array. This is your character's face. The build then normalizes the landmarks, and anything you don't supply falls back to the canonical default positions.
    • image_width / image_height - both default 0. If your landmarks are in pixel space, set these so the node can normalize to the standard 0..1 space. The author's docs are explicit: leave them at 0 when your landmarks are already normalized. That's a "leave it alone unless you know why" pair, and it's refreshing that the node says so.
    • settings_json - overrides for FaceRigRetargetConfig, including the canonical landmark positions themselves. Advanced knob; {} to start.

    The result (neutral_rig_json) contains the normalized landmarks, an identity_mode (the rig records whether it was built canonical or from a reference), the landmark order, and an expressive_completeness score - a 0..1 measure of how much of the expected landmark set your reference actually covered. That score is the thing to check if you supplied sparse landmarks: if it's low, large parts of the face are running on defaults, and the retarget will be correspondingly generic.

    The summary output is genuinely informative - it reports the identity mode, landmark count, and that completeness score, so you don't have to open the JSON to know what you got.

    Where it fits

    This is the "before" to MKRFacePerformanceRigApplyDeltas's "after": build the neutral rig once, then feed it motion frames and get retargeted landmarks back. It preserves the rig's identity geometry and layers motion on top - which is only as good as the neutral it was built from, hence the completeness score.

    Installing and caveats

    Standard pack install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/criskb/MKRShift_Nodes
    

    Restart ComfyUI, or ComfyUI Manager search "MKRShift_Nodes". No extra Python dependencies.

    Two things worth knowing. First, reference_landmarks_json must be a JSON object (dict), not an array - the validator will tell you if you hand it a list. Second, the whole face-performance lane is aimed at structured-data pipelines, and this node specifically is for people who already have landmark data (from a face tracker, an SDK, or a rig). If you're arriving from a Google search hoping this is an image-based face model - it isn't. It's the rigging-stage component of an experimental pipeline, and there's no community chatter about it yet, so the docs and source are your only guides.

    CategoryMKRShift Nodes/Performance/Pose

    Inputs (4)

    NameTypeDefaultDescription
    reference_landmarks_jsonSTRING{}
    image_widthINT00–16384
    image_heightINT00–16384
    settings_jsonSTRING{}

    Outputs (2)

    NameTypeDescription
    neutral_rig_jsonSTRING
    summarySTRING