Starcraft 2

By now most of my regular readers probably know that I’m going to pause working at the university by then end of February and start working full-time for Limbic soon after. That means I’ll also start to blog more, again.
By now most of you also have heard the exciting news that the Starcraft 2 Beta launched last week. As I have done many times before, I couldn’t resist to dig a little into the game data formats and see what I could find. Of key interest to me is the .m3 model format that is being used in SC2. It’s a natural evolution of the Warcraft 3 .mdx format, and the World of Warcraft .m2 format.
Since I can think, I’ve been dissecting formats of games that I liked from a technical point of view, in order to learn how they accomplish those great games (some prime examples are Half Life, Quake 3, Black&White;, Warcraft 3, World of Warcraft). Hence, for the sake of the good old times and out of pure curiosity, I couldn’t resists opening up the SC2 files in my Hex Editor and dig a little around. To my surprise, the .m3 format is quite a bit different from .mdx and .m2. It didn’t take too long though to find myself through the file and extract the meaningful bits of data I needed to get a better understanding of the whole thing. So far I can say that I already love the SC2 engine, even more than the WC3 and WoW engines.
Here are two examples of cool models I rendered with my python tool, only vertices+normals for now (Hatchery and Hydralisk):

If someone is interested in my findings or if I find more time to make the tool more worth-while, I may upload it somewhere (github, probably) and I’m happy to share my insights with anyone interested.

5 thoughts on “Starcraft 2

  1. Hello volcore, good work man on rendering the model geometry. I have a question. I'm trying to find the vertice/normal information within the file format but nothing leaps out at me. I'm thinking it might be in the U8 section, perhaps compressed down into 8 bits, but that seems silly to do for things like vertices. Any help would be great thanks <3

  2. Hey, yes.

    The format is quite tricky and def. one of the more complex ones that I've fiddled with. It also took me a while to figure out the right vertex format. Essentially you are right, the vertex data is in the U8__ section and it comes in two different flavors. I hope I can write something up soon. Stay tuned.

Leave a Reply

Your email address will not be published. Required fields are marked *