Sharing our progressive morph Script with the community

Hello guys,

Lately we have been working with morph targets for our characters. We usually use progressive morph targets in max to create accurate in between morph targets for animations with a flexible setup.

Unfortunately real time engines/FBX do not support this setup as is from 3d applications (in our case Max). So things like morphing eye blinks, jaw movements and other such facial animations cannot be possible without resorting to extra setups.

We created this Maxscript to help with this process.

For those who are not familiar with progressive morph’s definition, you can find some quick info at the bottom of this page.

Progressive morphing performs a tension-based interpolation, similar to the TCB animation controller, that creates smooth interpolation through each intermediary targets. This means that you can’t just take the similar number of targets (usually 3) and apply them on the usual channels of a morpher and go through them in turn and expect to see same results, instead the motion would be wobbly and
inaccurate due to the intermediary blending not using the same method of interpolation.

This is why you need to have more in between blend shapes or morph targets in order to more accurately match the progressive one in addition to many extra channels created vs one channel control for all targets, which could be a big hassle to animate without some custom controls and scripts.

Regarding this script:

Hopefully the image below explains what it does.

PMorph.gif

Extra info:
Internally it creates a usual progressive morph setup from your 3 targets and does the extra in-betweens for you (5 or 6 depending on the setting you choose), it sets them up on the morph channels of your target mesh and more importantly creates a wire setup exposed by a helper object in the scene with a single spinner that goes through all the channels for you. This way you can have your custom UI linked to this one spinner in order to animate all morphs automatically.

The file comes with a simple example scene to test it out.

Limitations:
This was made according to our requirements and is provided as is hoping it will help some of you guys if you need it, some of the limitations are:
1 - Only works with three morph targets for the progressive.
2 - Creates 5 or 6 in final targets (not less not more).
3 - Has not been tested on max 2015 and below but should be fine.

Wow! This is so useful and will save me a huge amount of time and head scratching. Thanks for shareing. This is briliant!

Unreal 4 does have progressive morphing via way of the Alembic format. You animate any object at the object level or vertex level and export/import into UE4 and the importer will create an individual target for each frame animated. Better still it even imports the animation take used to make the transform.

Just saying

:slight_smile: Other than work for offline non realtime renders/cutscenes or TV/film production requirements, Alembic is sadly useless or impractical in actual video game production pipeline or workflow, maybe good for some Debris FX assets here and there. This script was created to address realtime in-game character aniamtion requirements which need progressive morphs and exported via FBX format.

Edit: Then again last I checked anything with Alembic+UE4 was 3 years ago, unless something drastically changed since then.

Well I’m just commenting on the idea that UE4 does not support progressive morphing when it does. Morphing is morphing so how that would be impractical in a video game? I used 3ds Max to create a series of flapping flags using cloth simulation and exported to UE4 as a progressive series of morphs using Alembic used in a real time networked based game. No magic it’s old school vertex animation.

Granted more tools the better.

By the way FBX does support point cache data, which is an Autodesk feature, and my guess why Epic chose Alembic.

Sure you are right in that case.

I mentioned it can be used for Debris or such assets these include flags and other similar one time or loopable FX, but I mentioned Alembic or point cache in general is pretty much impractical for game characters, which is why we still use bones and skin + Morph :). Progressive was never meant to be vertex animation simply to have better control over morphs on a skinned character in UE4.
For vertex I would even try to avoid alembic and try to use material vertex bake when i can (granted its got limitations with polycount) but Alembic has been so buggy and slow in UE I am scared of using it in production unless I must.

I think Epic is dropping FBX in the future and going all out USD for everything. That would be a great choice once all programs start supporting it and unifiying their formats like this.

Ah OK gotcha

I can only hope you are still checking this thread, but I have a problem with this script. On the surface, it seems just like what I need, since doing an eye blink on a cartoonish eye with bones and normal morphs feels like a fool’s errand.

However, I cannot export it as FBX. Everytime I try it on the sample scene you provided, the export window gives me the complaint that “The plug-in has detected one or more animation controllers that cannot be directly supported. Using the Bake Animation option may better address these limitations. The following nodes are affected:
-MorphMaxTarget”

Of course, bake animation doesn’t work either. In both instances, the imported mesh in Unreal has no morph targets. The animation itself works perfectly well in 3D studio Max, I just cannot export it. Note, I am using 3D studio Max 2023, and have selected FBX2020 as the format. However, FBX2015 format didn’t work either, so I am pretty sure that isn’t the problem.

Anything I am missing here? Because I am pretty desperate at this point, after a mountain of attempts of animating an eye blink all ended up in failure. At the moment, I am trying to just use your algorithm directly, but it would be nice if you could point me to a workflow where I can get your system to properly export.