Of the many projects I put on hold back in 2011 (has it really been that long already?), one was based on Starcraft 2. I did a number of tests with this at the time, but some files have inevitably gone missing over the years. I guess it’s a good thing I documented a lot of my prior experiments.
Since I no longer bother with compositing, the first step to machinima involves creating an environment. I’ve learned through the years that it’s better to move assets to a single engine (such as UDK), rather than trying to master 100 different game engines and their tools (all which may change at any time).
There’s been multiple changes to the Starcraft 2 editor since I last used it. It’s a little more difficult to view and extract content, but I’ve spent the past few days refining the process.
The model previewer has been changed, and is now called the Archive Browser. They ditched the MPQ file format that was previously used (which was easy to extract assets from). Models and textures can still be viewed and exported within the editor, but only on an individual basis. I had to make an AutoIt script to automate the export of thousands of textures, which took many hours to complete.
Getting everything into UDK is somewhat tedious and time consuming, but I am working on refining the process. Having this all done with just a few button presses may be possible (in theory), but the development of such automation would eat up a lot of time.
I’ve been making progress with the environment despite the challenges. Everything will continue to come together as more lighting, props, and post-processing effects are added. I still haven’t figured out what’s going on with emissive textures yet, it seems their coordinates are not exported.
The next big challenge will be working with character models and animations again.
Disclaimer: These tutorials were written in 2011. Many of the methods used here may no longer be accurate, but I keeping the information available to hopefully steer people in the right direction.
This is a guide that will cover the basics of how the Starcraft 2 assets can be previewed. This guide is intended for understanding how the cutscenes work.
How to preview models 1) Open the editor and go to File > Dependencies.
2) Click the “Add Standard” button and select everything (there should be 4 items). Click Ok.
3) Go to Window > Previewer
– This is your model viewer. Use the tree on the right side to find models.
– Most of the high quality cinematic character models are in Assets > StoryModeCharacters
– Additional character models can be found in the portraits directory.
Viewing the cutscenes 1) Download the SC2 cutscene files from here. This will allow you to play the cutscenes in the editor. 2) Go to File > Open and select one of the scene files. 3) To select the default camera view, Go to View > Camera, then select the camera with the Cam_Export suffix.
– At the bottom are standard playback controls: play, pause, etc.
– Unfortunately, there’s not much you can do with these cutscenes other than see how they’re put together.
Importing the models into 3D Studio Max 1) The M3 files and textures can be exported using MPQ Editor. The main file containing the assets is “base.SC2Assets” which is located in your SC2 directory under StarCraft II\Campaigns\Liberty.SC2Campaign 2) Download and install Starcraft 2 Model (.M3) Plugins for 3ds Max. 3) Run the 3DS Max script m3_import_v0.30.ms. Select the M3 file and import.
Rendering SC2 Characters in 3DS MAX 1) Import the character into 3DS Max. 2) Add a skylight to the scene and change the rendering options to enable Light Tracer.
From here we will need to redo the materials. The import script uses wrong settings for the materials, so we will need to fix that. 3) Create new materials for each of the textures. Change the “Alpha Source” setting to “None”.
Converting Starcraft 2 Characters to the UDK 1)Import the character into 3DS Max with m3_import_v0.30.ms.
– Most of the characters can be found in StoryModeCharacters > Terran. 2) Select everything and scale by 25000%. Reposition the model as needed.
– Any extra meshes and their bones can be deleted (example: the SM_RaynorCommander model has a gun and shot glass included). 3) Rename the meshes (head, teeth, etc) and apply a unique material ID to each of the meshes.
– Note: While you do have the option to attach the meshes together, doing so would break the face bones needed for facial animation. 4) Export with ActorX. Import the character and the textures into the UDK.
– Some of the character textures use a 2048×2048 resolution. Select TEXTUREGROUP_Vehicle when importing to prevent them from being re-sized.
– Some materials may need their texture coordinates changed (example: SM_FirstOfficer’s shoulder pads).
– The hair materials can be tricky and may require experimenting to find the best look.
– The eyes may need to have a separate material assigned in 3DS Max.
– A script can be used to create a biped rig.
Creating facial animations 1)Select the mouth bones. Link them to the biped head (Bip001 Head). 2) Export the reference PSK in ActorX. 3) Create the FaceFX poses using this guide. 4) Export each face pose as a separate PSK, then import into the UDK as morph targets.
– Rotating the jaw bone will control the teeth.
– You may want to delete the tongue mesh.
Some of the file formats contained in the MPQ files include:
.m3 – Contains meshes and sometimes animations as well.
.m3a – Contains additional animations. It is currently not possible to load these into 3DS Max.
.fxa – FaceFX file. These contain the facial animations.
– The Starcraft 2 Previewer can be used to find the material settings for the .m3 model file.
– The textures are in DDS format and should be converted to something more manageable (like TGA). You can use NConvert, or the save image feature in 3DS Max for this.
– Some textures have duplicates in different sizes. Check to make sure you’re using the highest resolution available (usually 2048×2048).
– Emissive textures will have a coordinate index of 2.