Home Website Youtube GitHub

[Proposal] Facial Rigging System Integration

Hi, I’ve been building a tool for facial rigging that I believe may be interesting to some mGear users so I’m opening this thread to see if there’s any interest in integrating it with the plugin.

The rationale for the tool is that while mGear is pretty amazing at bipeds it’s quite lacking in the facial department IMO. The tool I’m building follows mGear’s data centric approach and I’m pretty much using it as if it were part of mGear anyway, but I’m not too familiar with the mGear’s code so I’m keeping the source as its own standalone set of modules.

The workflow is split into two parts: creating the joints and driving the facial poses.

Creating the joints is done via something anyone using mGear will understand I think. Just draw guides and then serialize the guides, not the rig.

All components follow a workflow I learned from Judd Simantov. The point controller is a locator that is always zeroed out and drives a joint. The eye (should be eyelid really) has the bottom and upper lids rotating from the center of the eyeball to give a nice arc rather than going straight up and down, and the jaw handles constraining a subset of locators to its main driver so that they go follow the jaw while still being zeroed out.

To main tool of the system is the UI to actually build the poses. The workflow is pretty straightforward, add pose to host, set driven attributes, sculpt the pose by moving locators around, capture the pose and then refine, etc.

The final position of each locator is calculated via a custom driver node. The node view is pretty insane. Each driven attribute for a pose is an anim curve, so you can imagine how that explodes pretty fast.

This tool is also designed with a data centric approach in mind where rigs are serialized and they can be rebuilt given that the same locators/hosts exist in the scene.

The actual blending code is pretty simple, but the node is using quite a few optimizations to keep playback responsive and fast (I haven’t gotten channel box sliding to be nearly as responsive as playback unfortunately)

For angular attributes the node handles angular curves without any conversion nodes which is a pretty nice optimization when you’ve got hundreds of angular curves.

A few considerations, first the code is not polished at all. For example mirroring only handles my own side naming convention, and there’s hardcoded paths everywhere. The system has not been proven in production yet, and there are a few core issues to address (mainly laggy channel box on heavy rigs, and capturing poses when a different pose driving the same targets is active leads to jumps due to the way poses are captured)

Just for the record this is not something I could ever integrate into mGear by myself because I don’t have neither the time nor any knowledge of mGear’s architecture but if anyone is interested in integrating it I can contribute the code and try to implement other features.

Not sure if there’s any interest on a system like this, I think mGear’s approach is mostly blendshape oriented, but this is more for games where you need joint based facial rigs and I could never find any solution that didn’t involve heavy use of SDKs, which are IMO not very nice to use at all. If anyone’s got any questions I’d be happy to answer.

3 Likes

this would be a very nice facial setup approach for Mgear. Working mainly for games, I am very interested!

Hi @jignb
Thanks for the ofering to share your facial rigging tool! :heart:
It looks very cool! and useful! and I would like to consider to integrate it on mGear if you are willing to share it.
But I can’t promess anything.
Now a days I am very catious taking any PR, specially new tools like this. Since the code base is big and the maintinece is very time consuming if I am not familiar with the code.
Do you have the tool in a public repo? Also is there a video of the tool in action and/or rig examples?
Thanks!

I’ll be uploading the code soon, I’m in the middle of a refactor because last night I got an idea for what could be causing the channel box lag and I believe I fixed it, here’s a demo Watch 2026-02-18_09-21-51 | Streamable (the jaw is still a big sluggish but I think not too bad considering it’s driving around 300 attributes via the same number of anim curves)

But I’m thinking there may be no need to actually integrate it with mGear after all. Since it’s pretty much built to work with it since it’s what I’m using for bipeds, maybe keeping it as a separate tool maintained by me with some post steps serving as the bridge? I think there’s different potential approaches that avoid dumping all the maintenance burden onto you and your team.

I’ll be uploading the repo to github as soon as I can. I’ll include a demo rig, or even better the data to rebuild it from serialized files, and maybe (maybe) a short tutorial on how to get a basic rig working but I’m not sure if I’ll have the time for that.

3 Likes

I didn’t look closely yet. Do you mean you are using driven keys? I use driven keys sometimes when I just need to quickly drive one thing from multiple sources. But I’d suggest if you are coding it up, to use remapValue nodes and plusMinusAverage or other nodes to combine instead of animation keys. Especially if the relationship is simple and linear.

And possibly combinationShape node for making your own “corrective shapes”. That node can be wired manually to make a new driver fire when two or more are firing.

Got a demo up in github for anyone interested, you can check it out here https://github.com/jign/facial_rigging

In includes

  • All three tools (guides, poses, driver)
  • “instructions” to build it (assuming some level of proficiency)
  • Assets, a demo and a tutorial (10-15 minutes aprox.) with a few videos for some of the steps

Hopefully anyone interested will be able to get it working, hope I didn’t mess it up

I’m not using SDKs at all, but anim curve nodes (which are used by SDKs). I’m not entirely sure how remapValue and averages would work here, the blending logic happens in the driver node.

“Set Driven Key” is the verb/command which sets the connections into an anim curve that is a Driven Key. If you set it up manually, as far as I know, it’s equivalent. There’s no magic in the command.

I haven’t tested it in many years, but I imagine using simpler nodes like remapValue might be more performant. Driven Keys are better when you need to drive actual curves with tangents you can easily shape and tweak.

remapValue gives you min/max values you can easily drive. And you can make the curve ease-in/ease-out if you need. Just ideas.

I see what you mean now. Yes, after playing around with it a remap node could work instead of anim curves, but I’m not entirely sure yet if the tradeoff is worth the big refactor. Having access to tangents is useful and the driver is fast enough, but it’s good to know that if the extra performance really is needed that’s an option.

Releasing your tool as a separated tool that works with mGear is a great idea.
Also there is a way to install tools in mGear as plugins and ingest it on the mGear menu while keeping all separated. When I have time. I will prepare a tutorial on how to do it and sample code.

4 Likes