Setting up Blend Sequences in Milkshape3D

 

I. The Last Piece of the Puzzle:

I have been utilizing Milkshape3D for TGE art content since I first downloaded the v1.1 demo build and example package. The engine was chosen because of the numerous Independent Developers' requirements; many if not all discussed at the GarageGames.com site and it's open Community Section. I had been a licensee of Milkshpe3D since very early v1.5 builds for constructing my content for some Half-Life I MODs I'd been involved in. Up to that point I hadn't really gotten into scripting at all and didn't need to really, since the hardcode for the shapes, Nodes, & animations was pretty much in place and all that was needed was just adhereing to the format's requirements. Torque would change all that for me much later; but that's a different story and it's not reached it's conclusion yet! The animation systems were somewhat similar, in that there was a reference shape and separate sequences that are compiled into a single object during an Export Process. Milkshape, the workhorse that it is, was capable of exporting both that format[along with a mulititude of others], and this relatively newer to General Public development product of the Torque Game Engine. Seeing the early documentation delivered during team meetings and planning was very encouraging to me, since I had a fairly good grasp of a content creator listed as supported.

It was great news the day the DTSPlus! released; as it extended the core functionality of the exports issuing from Milkshape, namely the ability to generate .DSQ fileTypes to compile at runtime allowing for a common sharing of animation data spread across a number of similarly structured shapes. Then, this functionality was extended further to include Blend type animation sequences. As our design documents listed many pistol type weapons, which strayed from the default player rifle holding pose, I needed to be able to generate the blends necessary to accomplish different holding posture. I had a difficult time correctly setting up the shape and sequence for exporting, spending about 3 whole days always ending in various forms of undesireable results. That was until, while working on a side Milkfarm project, a respected Community Member at GG, gave me some insight into Blends in general and perhaps a way to setup the shape correctly. Needless to say, I jumped at the chance and quickly threw these steps into practice on the spot in my work Scene and finally was able to export it properly for the engine!

Above, the image shows my default "BoxyBoy" shape which has made appearances through my site and especially when dealing with the DTSPlus! default rig. This particular rig is my final copy with all 8 mountPoints included, but it does not vary at all in it's Scene Root pose[see other pages here on the site for details]. It is in the Scene Root, without being in Animation Mode. There are 4 frames in the Timeline. When the steps are completed, this Scene will export a .DSQ sequence setup correctly for the engine and default code. The new pose will be with the player holding a pistol weapon held at Eye level, as an original design requirement of mine was to include the weapons and hands in the player's FOV and appear on the HUD.



II. A Simple Setup:

1. After opening the developers' working Scene[this example uses my proto player shape file which will not be included as a Resource], with the shape in the Root pose at the Scene Root, enter Animation Mode and record a keyframe for ALL of the Joints in the Scene at frame1. This not only establishes our Blend Reference Frame, but also allows the animator to begin utilizing the Operate On Selected Joints Only mode, which is helpful for the fine adjustments needed for smooth motions, imho.
2. Scrub the slider to frame3 of the Timeline and pose the rig in the new weapon's intended look* posture and record a keyframe for the 'middle' or Root default pose. This was upon suggestion, as I had been getting the Blend Reference pose here on earlier failures and not my intended pose. I'm not entirely sure this is needed, but it seemed to work for my example. It also put the weapon perfectly in the HUD, as my design requirements dictated, when in the Root pose.
3. Scrub the slider to frame2 and pose the rig in the extreme UP pose of the look* sequence and record a keyframe for this position. This is the end position of looking up when inside the engine using this player.
4. Scrub the slider to frame4 and pose the rig in the extreme DOWN pose of the sequence and record a keyframe for this position, and this pose becomes the end of movement for looking down as the player. Exit Animation Mode and Save the file as desired.

It's now a matter of using the Sequence portion of the dialog to Add the sequence and it's parameters to the Scene,[which pops with a dedicated dialog and is included in the snapshot above]. Important to note is the Blend Animations portion of the dialog; as this is where the Reference Frame is recorded. Also note, that this reference frame[frame1] did NOT need to be included within the sequence range at all! This was upon another suggestion and with the combination of the two of them, I was able to get the desired results of a proper blending sequence. My newly exported sequence blends ontop of the default actionThread animations just fine; as both the Root poses are the same in both Source files.



III. The End Results:

I apologize up front for speeding to this end without demonstrating that a new *recoil sequence will be needed for utter perfect proofing inside the engine. Or that an actual pistol weapon .DTS would be needed for checking FOV[as in my case, each developers' specs will differ], but this Guide wasn't intended to put a pistol weapon into the engine, merely how to create a proper Blend Type sequence for any additional weapon/objects needed for gameplay involving the player's default code. Having said that...

I included all the necessary assets in their proper repositories, edited the TSSConstructor script for the player shape, and ran the engine. Immediately upon spawning, my code base includes the intended pistol shapeImage mounted to the player, with some ammo for testing. My nearest target appears to be this attractive farm house[.MIS & .DIFF/.jpg's courtsey of Eric 'Esop' Johnson, 3d/Texture artist]. As you can see from the snapshot; with a default straight ahead Root pose, the engine has blended the armThread ontop of the actionThread perfectly; aligning the weapon as I'd intended back in Milkshape3D. Entering freeLook, and operating the up/down values via the mouse, would show the player to be raising and lowering his weapon with his gaze. When I created the down position, I did not give the rotation as much value as up, due to occluding on the player's body by the arms, but the player reacted as I'd intended in my animation. I was at last successful at producing Blend .DSQ from the Milkfarm...examining this shape inside ShowTool Pro, would give indicators of the sequence's Blend parameters in place.

I hope this quick and dirty Guide is able to help the developers' out there utilizing Milkshape3D for their content requirements, and please let this author know of corrections, and improvements in the steps presented here.

 

Your Link

Your Link

Your Link
 
 
 

HOME   ...more Rex   gS2DTS Setup   Mesh Prep   Shape Build   Gallery   Nodes w/o Destruction   Non-destructive Nodes