Model Troubleshooting
ModelDoc is a very powerful, but incredibly mysterious beast. And it has some weird quirks that probably make a lot of sense for how Valve's models work, but maybe aren't normal to us modders. So here's some quick troubleshooting steps if you're having issues with certain features.
Basic ModelDoc Function
As a refresher, ModelDoc uses a node-based system for putting together models, but maybe not in the way you'd think. Nodes are stored in the Outliner, which is organized by Categories, each with their own unique settings and properties that are worth taking a once over.
To preview your model as you're working on it, you have to manually compile it, using the button.
To add a mesh to your model, you will need to right click the Outliner, and add a Mesh Node to your model. This can be done by either finding the desired mesh node (usually RenderMeshFile) or more easily, clicking the "Add Meshes..." button which does the same thing.
Now, click the "Compile Model" button and your model should render! Usually though, your model won't spawn with its textures, as it'll look for materials that aren't there. To override your materials from the FBX file, add a new node called "DefaultMaterialGroup" which will override your default materials.
Making Morphs/Flexes Work
By default, morphs (or shapekeys) will not appear to work in the ModelDoc editor. Morphs can be imported using .FBX or .DMX, ideally the latter if you can because .DMX retains more data. For models with morphs, Valve requires three things:
- A Mesh with Morphs
- A Material with "Morphs Supported" ticked on
- An Animation
To accomplish this, the best way to go about it is to set up your model with a DefaultMaterialGroup node, directed to a material with morphs enabled. Then, give it an EmptyAnim node, so it has some animation. Now, morphs will work.
You can technically preview your morphs using the Morph Explorer in ModelDoc, but it requires you to recompile every time you adjust them. This seems to be a glitch, as the ol' Model Editor didn't have this requirement.
Missing Bones/Joints on Import
If you're missing bones on import, don't fret. Valve has a weird default setting on ModelDoc that will aggressively cull bones that have no skinning. You can disable this by, in the outliner, selecting "Show Empty Categories" then selecting BoneMarkupList near the bottom. Select "Bone Cull Type" to be "None", or "Leaf" if you prefer and your favorite modeling software exports them against your wishes.