Fun with Starcraft 2, 3ds Max and After Effects: Part 1

I’m the type of person who will eagerly attempt to teach myself all there is to know about a subject when my interest is piqued. Sometimes, I’ll even forget that I had originally set out to do some other task before the insatiable quest for knowledge struck. Lately, I’ve wanted to give myself some matchmoving projects to work on and I thought of the Starcraft 2: Heart of the Swarm “Global Invasion” video as well as the well done video for Dreamhack Valencia from a year or two ago. No doubt these videos are pretty damn ambitious and took quite a few man-hours to produce. I’m no expert in 3D modeling and animation, so I’m going to try to see how far I can take it with my existing knowledge and what I can learn along the way. I suppose the first thing I should do is figure out how I’m going to come up with models and animations. Since I come from a video production and editing background, I’d love to get these assets into a software package I’m familiar with like Adobe After Effects. After Effects isn’t exactly suited for 3d animation, but with the introduction of Video Copilot’s Element 3D plugin, the 3d capabilities of After Effects have been expanded quite a bit. Element 3d allows for the import of 3d .OBJ files where they can be skinned, rendered and composited within After Effects. First I’ll need to get the actual assets out of the Starcraft 2 MPQ file that is installed with the game. For that I can use  Ladik’s MPQ Editor which extracts all the M3 model files and DDS texture files from the Starcraft 2 MPQ. The SC2 modding community over at SC2 Mapster have many tools for importing/exporting and creating game assets for various Blizzard games. They have a pretty good set of M3 import/export scripts for 3DS Max that I can use to import Blizzard’s proprietary M3 models out of the Starcraft 2 game assets into 3ds Max where I can export an OBJ file that will work for me in After Effects. There are a wide array of models within the game that range from low polygon count units that are used during gameplay and high polygon actors and sets used in the storymode cutscenes. After a while of browsing through the game assets, I figured that the “Recovered Adjutant” high polygon model would make a good test subject for pulling a model into After Effects.

I am selecting and separating the various sections of the adjutant model that use different texture maps.

Selecting and separating the various sections of the adjutant model that use different texture maps within 3DS Max.

After importing the model into 3ds Max, I need to separate the various pieces of the model into groups that use certain textures so that the model can be properly retextured within Element 3d in After Effects. In the adjutant’s case, there are separate texture/normal/specular maps for the head, chest, and the rest of the torso. I separate the sections by converting the overall model into an editable mesh, detaching the sections from the model, then assigning each section a standard material.

Applying a "Standard" material to each piece of the mesh I have detached so that it can be skinned properly later on in Element 3d.

Applying a “Standard” material to each piece of the mesh I have detached so that it can be skinned properly later on in Element 3d.

After the model is prepped, I export it as an .OBJ file. Next, I’ll grab all the textures associated with the model. I’m looking for .DDS files with the naming convention that start with “sm_adjutant …”  “sm” stands for “Story Mode” files with this prefix usually are related to the high polygon models that are used in the campaign mode cutscenes. All the game textures can be found in the “textures” folder. Using Nvidia’s Texture Tools for Photoshop, I’m able to open each DDS texture file and export them as a JPG file that I can use in Element 3d. Now I can head over to After effects and start importing/texturing the model. Once I set up a new After Effects composition and apply the Element 3d plugin to a new solid, I head into the “Scene Setup” for the element 3d effect.

I select the individual pieces of the model, then apply the associated textures.

I select the individual pieces of the model, then apply the associated textures.

Here in the Element 3d scene setup window I select each segment of the mesh and apply the “diff” textures (this has the color information for the model), specular textures, normal maps and emission maps (this has the glowing bits for the model).

The red box on the left indicates the emissive map texture that applies to this particular model. The red box on the right shows the tweaks that can be made within Element 3d in order to make the Illuminated pieces of the model (show in the red circles) more apparent.

The red box on the left indicates the emissive map texture that applies to this particular model. The red box on the right shows the tweaks that can be made within Element 3d in order to make the Illuminated pieces of the model (show in the red circles) more apparent.

For this particular model, the eye texture map has a few selections for colors. To accomodate for this, the texture selection is trimmed within the Element 3d texture loading window and the color of the eye is chosen by offsetting the selection.

Eye colors were tweaked through the UV Offset and UV Repeat coordinates

Eye colors were tweaked through the UV Offset and UV Repeat coordinates

In addition to the adjutant model, I also grabbed the adjutant chamber that can be found in the Hyperion Med Lab set within the story mode sets and textured that as well. Now that I have the models in After Effects I can have some fun lighting everything as if it were a real-life movie set.

Once the models are all textured, I can then go about lighting the scene in After Effects.

Once the models are all textured, I can then go about lighting the scene in After Effects.

Below, you can see the result I came up with after a little bit of time dressing the scene with lights and some particle effects. I have also included a little animation of the Starcraft 2 logo that I pulled out of the game assets as well.

This is about as far as I’m going to go for this first part. I’m going to spend a little more time familiarizing myself with Element 3d and 3ds max and also see what kind of models I can dig up out of the SC2 assets that would look good in a matchmoving project. I also am 6 missions away from finishing the SC2 Heart of the Swarm campaign, so I better get on that as well. In part 2, I’ll try find an appropriate Starcraft 2 model and see if I can perform some crude animations with it and maybe composite it into some live action footage (which may spill over into a part 3? Who knows.)

BRB, going to Korea

It’s time once again to pack my bags and break out the passport, because I’m off to South Korea.
While I’m spending the holidays away from home, I’m not necessarily spending it away from family. I’ll be visiting my wife’s family and attending my sister-in-law’s wedding. Also, since this is my first visit to South Korea, I’m pretty much obligated to meet her entire extended family (kinda like the 8th rule of Fight Club). It’s not that I don’t want to meet the family, it’s just that I have to make a good first impression with so many people… so the pressure is on. Also, did I mention that I’m going to be the only white guy (in a hanbok) at the wedding?
Let me illustrate the situation using professional actor(s):
A white guy in a hanbok
Yes, he stole the Declaration of Independence, but he also stole our hearts. I can only hope to do the same while in Korea (the part with the hearts).