Hello there! Have you ever wanted to do vertex animations? Well so have I! And recently thanks to some help from some friends, I have figured out how to do them!
Valve's Maya Plugins (The SMD exporter. At this time it seems this does not work with DMX)
I'm going to be doing this tutorial with a cloth simulation. This can be applied to things other than cloth though.
Create a super thin box and subdivide it into however many divisions you want
Create your cloth simulation. I'm not going to go into detail about how to use nCloth. There are a ton of tutorials out there.
-snip this step, unneeded-
Select the items you want exported, and then click on the mel box in the bottom left, and type this (you need to modify it to your needs)
IF YOU DO NOT HAVE A DRIVE DEFINED, THE SMD GETS SAVED TO GOD KNOWS WHERE. ALSO MAKE SURE YOU USE / AND NOT \ OR ELSE IT WILL FAIL TO EXPORT.
Go to the directory where you saved the smd file, you should see 4 files. Two smds, a vta, and a qci. Create your qc (do not include $model or else you'll end up with a double mesh). Make sure you add "$include FILENAME.qci" into the qc.
Compile the qc. I'm not sure what versions of studiomdl work. For example, SFM's compiles it fine, but Portal 2's throws an error. I'd just use SFM's.
Open SFM and spawn your model.
You should see 2 sliders. One should be MODELNAME, the other MODELNAME_multi. THe MODELNAME slider turns the simulation on and off. MODELNAME_multi runs the simulation.
Go into the graph editor. At the frame you want your simulation to start set a keyframe. Set MODELNAME to max and MODELNAME_multi to minimum. Go however many frames your simulation was in, set a second keyframe, and slide MODELNAME_multi to the max.
Scrub through the frames and your simulation should be playing! Congrats!
Make sure you don't have a $body or a $model for the simulation inside of the QC. It's done for you in the qci.
Make sure you're using / and not \. Also make sure the directory exists.
And now an example of what can be done with this:
Ignore the double mesh. This was made while I was figuring this stuff out.
Here's my hair simulation, the smds, the vta, and the qci.