Morphs
We will be using "Blender" as it is the most widely used free modelling program, but the guide mostly applies to every other program.
FBX file format
Exporting the mesh
- Create the shape keys
Export
in FBX format, making sure to include the mesh and armature.
Adding the morphs in ModelDoc
Morphs are animation-driven, even if morphs appear when importing the model, you won't be able to use them until there's at least 1 animation.
Import the Mesh in ModelDoc
Add any animation, use the model itself if it doesn't have/use any.
Add a material that supports morphs (in "Material Editor" check the
Morph Supported
box under "Animation").
If you go to "Morph Explorer" and press Enable Manual Slider Control
you will be able to manually drive the sliders, this is only a debugging tool, if you want to then see the animations drive the sliders, press Allow animation to drive sliders
.
Exporting Morph Animations in Blender
The animations are stored in the mesh, this guide will not go over how to create them, as it is commonly used and already widely covered.
Create your shape key animation
Export
in FBX format, making sure to include the mesh and armature.Import the animation in Modeldoc as a "Simple Animation".
This will be the final result:
Note the morph sliders moving because of the animation, they are not limited by 0 and 1.
DMX file format
You will need the "Source Export Tools" plug-in.
Exporting the mesh
Same as FBX
Go to "Scene Properties" and then "Source Engine Export", change "Export Format" to "DMX"
Use the latest DMX version, as of writing this it's "Binary 9" and "Model 22"
Select the checked "MeshName.dmx" under "Source Engine Exportables" (in my case "citizen.dmx", check if unchecked)
Go to "Flex Properties" and press
Generate Controllers
Press
Export
to export the model.
Legacy Source 1 Morphs
This part of the guide was originally made by user Divined as its own page.
Exporting the morphs
After importing your .qc into Blender, simply bring up your head along with the .vta and select both and export it as a DMX like below:
Importing morphs in ModelDoc
Importing the morphs into ModelDoc is the same as importing any other mesh, just import the .dmx as a new mesh and your morphs will appear on the bottom right under morph explorer. If you want to play around with them, simply enable manual slider control.