This tutorial will teach you how to make non-interactive sequences (NIS) using MilkShape 3D and the NIS export plugins found here.
It is assumed that the reader is familiar with using MilkShape 3D (henceforth referred to as MS3D), importing meshes, skinning them, and animating them. Further, the reader must be able to export ship meshes from HODs using CFHodEd (or any other program). It is also assumed that the reader is able to use the plugins (they both show up in the menus, and the copy of MS3D the reader is using is registered).
First, The plugins must be downloaded and setup, if this step has been done, then skip it.
For this, you need to copy "msNISExporter.dll" and "msHW2NISAttrib.dll" to your MS3D folder. Run MS3D and goto File->Export. There you should see "Homeworld2 NIS
Exporter" and in Tools, you should see "HW2 NIS Attributes". The former plugin is the actual export plugin, while the latter is a helper plugin, that lets you assign properties to various objects using comments feature of MS3D. For your reference, the following image shows both menus:
Next, you must Plan the scene and decide the ships that will be used.
Here, for purposes of demonstration, we will make a NIS that shows two Hiigaran interceptors coming out of the frigate bay of a Hiigaran carrier. This requires two ships, the carrier and interceptor. Open these ships in CFHodEd, and export their meshes. Here, since there are only three ships, we will export LOD0 of both ships (you may want to use a lower LOD, if you have many ships and if MS3D lags due to too many polys). Once you export the ships, feel free to merge all their parts, this will ease the part where you make the NIS itself, although you may skip this part.
Then, Import the ships in MS3D and setup the ships before going into animation mode.
Here's where a little planning will help. Since we'll have a carrier and two interceptors, we might as well parent them under a master joint that will co-ordinate their movement, incase we need to make some tweaks. So, create a joint first (name it anything, this example will use "joint1").
Then, create another joint, although you can name it anything, this example will use "Hgn_Carrier". Import the carrier mesh into MS3D. Select the joint, then the carrier mesh, then go to joints tab and click assign. This will bind the joint to the carrier group. Now, since both are selected, move the carrier somewhere else (we still need to import one more ship). Remember to move the joint ("Hgn_Carrier") with the carrier mesh, otherwise you'll mess up the next part. Something like this:
Repeat the procedure for importing the interceptor, twice, creating joints named "Hgn_Interceptor1" and "Hgn_Interceptor2". Your final preview should be something like this:
If you're wondering the reason for doing this, it's simply convinience -- the ease for importing more ships whenever needed.
The next step is Animating the joints.
Again, if the NIS scene was properly planned, and you know how to animate joints in MS3D, this step is fairly easy. First switch to animation mode by pressing the button in the lower right part of the screen. Next set the number of frames. Since this NIS we're creating will be 20 seconds, at 30 frames per second, we'll need 600 frames. So set the frame count to 600 in MS3D. Something like what's shown in this image:
Since this NIS is being created to show the basics, the NIS has been kept simple. Since the NIS will be showing two interceptor launching from the frigate bay of a carrier, the first frame will be moving the carrier into position and the interceptors in the carrier. The resulting first frame will be something like this:
Notice how the joint connection turned yellow indicating that a keyframe has been defined at this frame. Also, see how the meshes move with the joints (in animation mode, remember). If they don't it means that you forget to assign a part\vertices to the joint.
Next, in this example, we will animate the last frame. Move the carrier forward, say, by 200 units and the interceptors still farther. Something like this:
But as you might have noticed, playing the animation, this NIS doesn't look like a NIS, and the way the interceptors fly seems impossible for a fighter. Whats missing is the rotation: the joints need to be rotated. After doing that and playing the animation, it still looks reasonable. Here's how it looks after rotating at the last frame:
The next step is to Setup the camera(s).
A camera is defined by having a joint whose name is prefixed with "CAM_". So, for this example, create a camera called "NISCam" (so that the name of joint will be "CAM_NISCam"). Animate the camera joint. This animates the position of the camera. You might want to create another joint which would be the camera's target (i.e. where the camera would look at, but in this example, the look-at target is one of the interceptors. How to set this will be explained a bit later). This is what I did:
The last and final step in making the NIS is Setting up the attributes for various objects.
Here's where the utility DLL (msHW2NISAttrib.dll) comes into play. It allows you to edit the attributes of selected objects. Since we haven't assigned any attribute to any object, we'll have to do this for all. So select all objects and run the plugin (not in animation mode).
Here's the kind of windows that you'll see:
First for the NIS attributes: You may want to change the FPS (frames per second) to make the whole NIS faster or slower, but any other purpose for this is unknown.
Next, for the "joint1": Set SobGroup Type to "None", this is just a helper.
For the "Hgn_Carrier" joint: Set SobGroup Type to "ship" and SobGroup Name to "Hgn_Carrier". This makes it a Hiigaran carrier in-game.
For "Hgn_Interceptor1" and "Hgn_Interceptor2" joints: Same as the above step, except make them interceptors, not carriers.
Finally, the camera, "CAM_NISCam": Set it's center of interest to any one of the interceptors, here, it will be "Hgn_Interceptor1".
Now for events:
Go back to NIS attributes tab and click on 'Event Editor'. Here add a 'cameraCut' event, and select the only camera, "CAM_NISCam" at frame 1.
Click OK, then Yes in the next dialog to save all settings.
Do not forget to save your MS3D file before every export.
The NIS is ready and can be exported now.
Export the NIS. For purposes of demonstration, this NIS will be exported as "nis01a" to be played as soon as the first mission starts.
The exporter will display a message box showing that the NIS has been exported. A window will pop up showing the result. Clicking OK will close the window. So if you want to see the export log better do so before clicking OK!
Start HW2 campaign to test the NIS:
And here is the MS3D file itself: http://rapidshare.com/files/405280516/tutorial.ms3d