This article will try to explain the steps needed to create an asset for StarCraft2 from start to finish.
I will try to keep is updated as much as I can.
Things you should know before reading this article:
The article assumes you already know how to model both high and lowpoly meshes
The article is based on trial and error, and the information provided should not be treated as a fact
This article may become outdated, but some of the techniques described will likely still be applicable
The article contains subjective views
May contain nuts
Table of Contents:
Planning your asset
Modelling the highpoly mesh
Modelling the lowpoly mesh
Tweaking the lowpoly mesh
Modifying the StarCraft2 shader
Importing into StarCraft2
1. Planning your asset
When producing an asset with the intent of using it in StarCraft 2 one should keep in mind the scale of the
existing ingame objects, the camera distance, field of view, angle of attach, etc.
Unless the map for which the asset is intended will be using camera model(s) completely different from the original,
you will need to take a few things into consideration before starting work on the asset.
The following assumes that the intended map will use a default(or close to) camera:
The camera has a very high angle of attack(pitch), high distance from the target, and a relatively large field of view. This means that your asset will, mostly, be viewed from above, and will be relatively small.
Adding excessive details to the bottom of the asset would be redundant, and would cause unnecessary loads
on the game engine.
The asset itself should have a higher concentration of details on the top, while the bottom has the minimum
details needed to convey the feeling intended.
You need to consider the silhouette definition very well, as in an RTS game it is likely that there will be a high concentration of assets in a very small area.
Having a clear, readable silhouette and color scheme is key. I urge the readers to avoid glowy bit hell if the asset has bad readability.
That's never helped anything.(see UT3 etc.)
When picking colors for your asset, try to avoid using excessive black or grey, unless necessary, as these colors are very common across all SC2 assets
and may greatly decrease the asset's readability ingame.
2. Modelling the highpoly mesh
When modelling the highpoly you should always keep in mind the scale of the asset.
If you're adding fine details, they will likely look tiny ingame, if they're visible at all.
On the highpoly, you should keep the scale of the details fairly large. They should be clearly visible even if the camera is
far from the model. As with any model, try to avoid concave polygons, and stars. In some cases, pentagons may work very well with corner
3. Modelling the lowpoly mesh
Because of the scale of the model, and camera distance, you can afford to omit some of the larger details from the lowpoly model.
Normal maps should work fairly well at a distance. Try to keep the model in quads(We'll discuss triangulation later), as it makes
the model easier to manage.
A thing to keep in mind is that ngons and stars are VERY bad. Avoid them at all costs. Keep the topology in triangles and quads.
Concave polygons also seem to cause some trouble, but not as much.
4. Tweaking the lowpoly mesh
What you should do is manually check your triangulation, so that you don't have stars in the mesh. After that, set your normals
as you would for baking. The tricky part is that you need to split your model by smoothing groups(this may be done after baking as well, with no adverse side-effects).
Otherwise, when the model gets exported, one smoothing group gets applied to the whole model. This potentially causes the normals to break,
and some serious specularity issues(depending on the model).
Depending on your model, you may need to explode it for baking.
5. Baking normals
There are no special steps for baking.
I strongly advise AGAINST using 3ds Max's baking engine(or any other app's for that matter).
The built-in baking engines are mostly horrible.
I urge people to use xNormal for baking. It's a free program that can bake AO, normals and some other stuff with very high
You don't need to make a projection cage, and you can set ray distances.
You can download xNormal here: http://www.xnormal.net/
I suggest baking AO and then setting the result as overlay with a medium opacity over your diffuse map,
as it gives the model some extra depth.
When creating the diffuse map, do it as you would normally. Try to use multiple layers for each element, as this may come in handy later.
If you want to use team colors, you need to add an alpha channel.
On the alpha channel, white is your original texture, and black is where the team color will appear.
This is where multiple layers come in handy.
You can select sub-elements that you want to retain their color and fill the selection with white(or whatever) on the alpha channel.
The specular map is a bit weird. The color has a huge effect on the model, and the luminosity has a huge impact on the specularity, regardless of what settings you use in the shader itself.
Try to keep the specular desaturated, highly contrasted and very bright. You don't need an alpha channel for this map, but in case it looks off
try adding a pure white alpha.
The normal map is the most retarded of them all.
After you've finished work on your normal map, you need to do the following:
The output of the RGB should look orange. If the normal map seems strange ingame, you should try inverting the green channel and re-importing.
If you are using an emissive map, you should keep in mind that it has a HUGE effect on the look of the model.
It's basically a self-illumination map, that starts glowing when it reaches a certain point.
You can use alpha for team color.
Save the image as DXT3, ARGB, 8 bpp, explicit alpha with NO MIP MAPS.
<sub>StarCraft2 generates its own MIP maps, and if you already have them exported, the overall quality of the image will greatly decrease.</sub>
You may wish to use different settings, but these are the ones I found work best.
First, you'll need to import an existing StarCraft2 model into your modelling package.
Once imported, move it to the side so it doesn't get in the way.
Go to an empty material slot and change the material type to the new StarCraft2 shader.
Specularity and HDR Specular Multiplier both control specularity.
For metallic-like specularity, I have found that 100 specularity and 1.5 HDR specular are decent values.
This may depend on your specular map as well.
The other settings should be pretty straightforward.
Refer to the image below for examples of Specularity and HDR spec values ingame:
With the shader set up, insert your maps into it.
When doing so, make sure to use StarCraft2 Bitmap.
When exporting the asset, delete or hide all other models in the scene.
Uncheck export hidden and frozen objects in the exporter.
The "Initial Texture Path" is where your textures will need to be placed in the StarCraft2 editor for them to be linked to
the model. Make sure you have "Flip UV Y-coord" checked. The animation settings will not be covered, as they are outside the scope of this tutorial.
9. Importing into StarCraft2
When importing, first import the textures.
This will prevent the model from caching itself without textures. After that, save.
This will write the textures to the map and generate MIP maps.
After that, if you haven't already done so, select the textures and rightclick>move them to the directory specified during the export.
Import your model into any directory. The texture path is absolute so you don't need to worry about model location.
You should now have a working model inside StarCraft2. Congratulations!
Things you should know before reading this portion of the article:
This portion assumes you have access to MPQEditor and 3ds Max
This portion assumes you know how to rig a skeleton using bones
This portion assumes you know how to add and modify envelopes using the skin modifier
This portion assumes you have sufficient experience in "natural" movement for animation purposes
This portion assumes you know how to import a .m3 file into 3ds Max and how to manipulate textures inside 3ds Max
This portion absolves UltiDrgn of any fault that you may cause/find
Editing Existing SC2 Models
Picking/Finding a Model
Before you can begin modifying an existing SC2 model, you have to pick an existing model that either /is/ the model you want or /contains/ the model you want. For an example, I'll be going over the entire process of repurposing the campaign's Hyperion model that was used during cut scenes.
Exporting the Model File(s)
Because we chose the Hyperion model, we have to add /Liberty.Story/ as a dependency to whatever map is open. After doing so, open up the Previewer and find the Hyperion. In this case, it's under Assets/StoryModeSets/SM_HyperionExteriorLow , though technically we could have also used the high poly model right above it. After loading the model in the previewer, we should have a screen that looks something like this:
From here, all we have to do is go to File -> Export Model File...
Save it somewhere, then close out the map editor entirely.
Exporting the Texture File(s)
Textures must be extracted from the mpqs themselves. I personally use MPQEditor to extract them. Keep in mind it is ESSENTIAL you open the MPQs in READ-ONLY mode to prevent unwanted/game-breaking changes to occur. As a rule of thumb, most textures will be in Core.SC2Mod.base.SC2Assets, but the campaign MPQ, Liberty.SC2Campaign.base.SC2Assets. Both of these MPQ files can be found in your Starcraft II installation directory under Mods and Campaigns respectively.
Since we chose the Hyperion, which is in Liberty.Story, we have to open up Liberty.SC2Campaign.base.SC2Assets. Once open, navigate down into the Textures folder and find the texture files highlighted below:
We only need the Diffuse, Normal, Specular, and Emissive maps to modify any SC2 model. These in particular are the Hyperion's textures as referenced in the Previewer under the Materials of the model. Once found, export these files to the folder that contains the .m3 file from earlier. Close out MPQEditor when you are done.
After Importing into 3ds Max
After you've imported the .m3 of the Hyperion into 3ds Max, hit the M key to bring up the materials window. From here, you can readd the texture files we extracted earlier. From here, you can do whatever you want to the model, as long as you follow these guidelines:
Any changes to the model must be performed at time 0.
No additional polys/triangles/vertexes/etc can be added to the model, you can only remove them. (Unless you want to reanimate the entire model)
Any attachments added to the model must be linked to the nearest bone and follow standard SC2 naming convention.
Misc. Animation Tips:
Before you start to move ANY bones around, and immediately after tweaking your skin modifier, key EVERY bone at times 0 and 3. Start the first animation at time 3, keeping in mind that the typical SC2 animation is 1.5 seconds long at 1000fps. This means a sequence starting at 3 and ending at 2663 will last about 2.6 seconds.
NEVER overlap the start/end times of the animations. Also, good practice is to leave about 1000 time in-between each animation, but it won't matter in the end.
Make sure every vertex is weighted before animating, and that every piece of geometry has a skin modifier linking to at least one bone.
The FIRST sequence named Stand will be the default stand animation. The same goes for WALK, ATTACK, BIRTH, etc.
Constantly save your work, and remember to keep an eye on the auto-key toggle.
The exporter currently does not like certain transforms on bones during animations. Always check ingame animations via previewer before use. If you find there's an animation that's not working right, try keying every bone every 100 time for the sequence in question. Failing that, do something less complex during the sequence or adjust the IK chain.
Death animations are a SEPERATE model/animation pair.
Use version 1.6b of the exporter until 1.9 comes out.
For Icons & Textures TGA Files works perfect. Just Save your Texture as TGA select 32bits/pixel
Plus while you use TGA Files its more user friendly for crossplatform OS's like Mac OSX, Windows, Linux. Because nVidia DDS Tools = Windows only.
For Icon's, Static Portraits Exporting I recommen TGA or DDS 126.96.36.199 ARGB 32 bpp | unsigned
Note that Starcraft 2 Editor will convert the textures to the right DDS files after.