Greetings! Hopefully this is in the relevant sub-forum. I have an inquiry about Shape Keys( more commonly known as morphs ) and utilizing their data in Torque 3D.
What a Shape Key( or morph ) will allow us to do is have various arrangements of vertexes in a mesh object. So, just by altering the Shape Key value( i.e. 0.0f - 1.0f ) a mesh can be deformed, squashed, stretched, you name it. I am using meshes with various Shape Keys which hold settings like eye scale, jaw width, etc. for character customization.
As far as I could gather, Torque3D has no support for such Shape Key/morph data. I couldn't find any place in the T3D source in which this was implemented. So this leads me to:
My Implementation - Blending
Since I couldn't find any way to utilize Shape Key/morph data in Torque 3D, I went about trying to figure out how I could adjust a mesh's vertex data on the fly. What I came up with was a sort of 'brute force' method that just uses Torque's existing Blend functionality.
So, what I've done is made bones in the model that will adjust certain vertex groups. Then I've keyframed animations to hold the bone's info, like: all the way up is eyeScale 1.0f and all the way down is eyeScale 0.0f.
Then I just added those animations to the player object, set all the variables up on a GUI, and set the player to blend those animations into the "base" one.
What I've described above seems to work fine. I've extended the GuiObjectView to support all of this( plus much more =P ) and all seems to be okay.
My question is whether or not there is some negative reason I had to increase the max count of threads on ShapeBase objects to blend in a bunch of "customization animation threads".
I'd just like to be sure, before I go much farther on this path, that all those simultaneous threads won't be a problem for some reason later. I mean, I manage all the threads( seemingly ) without errors so far and haven't noticed any sort of immediate performance hit. Bear in mind each animation I've blended in this way is extremely minimal in the data it contains. i.e. Only one bone controlling data for one value at a time, like location X or scale.
So, has anyone else encountered this and found a good approach? Is there Shape Key/morph support already embedded in Torque I hadn't noticed?