“How we make WoWs: Export Automatization and Content Verification” – Part 1

Source: http://m.habrahabr.ru/company/wargaming/blog/241083/

Hello everyone,

what follows is an article from Wargaming technical developer blog. I hope you will find it interesting. I did not translate some of the parts literally to express what the author means better, I hope you can forgive that :)

c0435c715731fe372ddca2675dff53e9

With the private preview of Wows at Gamescom and Igromir, the game release draws ever closer. Currently, we are in the middle of alpha-testing stage and us, developers from the Wargaming studio at St.Petersburg, called Lesta, have a whole bunch of questions to decide. Given that, we already managed to pass a whole lot of obstacles. Below is the account of how we managed to adapt the exporter of our engine to the needs of Wows and how we created the process of content verification.

Standard engine set of tools

Any engine has in its set of tools an exporter of 3D models from various 3D editors to its own data format. Our BigWorld, using which the World of Tanks is made, is no exception. It supports export from 3D Max and Maya. Practically any project does need the adaptation of standard exporters to match the project specifics. In our projects, the specific part are the models of ships.

The first adapted version from Maya was simply “taught” to recognize the more complex structure of the ship scene. A bit of Python control programming was added to the existing C++ code, as well as Maya plugin with wxWidget-based UI. It looks roughly like this:

be3bb554e081a9c29afcd8008749cdc0

The resulting tool had lot to be desired for.

It was possible to export only with the participation of the user, who had to “tell” the exporter the contents of the scene. To use this tool in automated processes (for example automatic content verification during the distributive assembly stage) was out of the question. The exporter needed the user to input data about not-so-obvious parameters, it was slow, it practically did not support scene verification and needed a huge amount of resources to work.

Its architecture was the main issue, when it came to extending its functions in the future. The export was practically an elementary operation (set of spaghetti-functions), which translated data from one structure (loaded Maya scene) to another structure (BigWorld) directly into the physical files. When the serializers and business-logic are implemented “as a monolith” and the data model is simply missing, it’s impossible to add the data processing (pre-/post-processing) and it’s also impossible to code-reuse serializers and data model in other instruments, using their own business-logic. It was impossible to create more complex processes of content production. In time, it became practically impossible to add new functions to the existing code. It was decided to rewrite the exporter “from scratch”, based on new architecture.

Daily Bread

The level of our project increased the needs for quality, complexity and amount of the content. In last couple of years, our studio grew a lot. We now had the option to allocate sufficient resources to tasks, tied to content production. We hired professionals with solid background of architecture development and C++/C# technologies. At the same time, this was the first experience for the exporter developers with using Python and Maya API. That introduced additional risks, that had to be taken into account. We estimated the exporter refactoring to take 2-3 man-months. You can’t be a game designer without being an optimist.

In risks, we included:
- lack of formal requirements
- skill with Python
- complexity of Maya API
- refactoring of the primitives processing algorithm

Much of the actual time was spent on gathering the requirements from informal sources, such as the old developers, who became managers in the meanwhile, acted very “oldschool” about the torsion fields and the code of the existing exporter. These nuggets of knowledge were formalized and put into a set of requirements, specifications and into an UML-diagram in Confluence.

First prototypes have shown the need to use the namespaces concept and Python modules (__init__.py). A mechanism was also developed, allowing the “transparent” use of C++ libraries functions (.pyd).

It’s possible to write an entire book about the complexity and details of Maya API. Every function required a prototype, consulting with 3D-artists and with engine developers (rendering). The standart exporter had its own implementation of large amount of algorithms, for example the polygon triangulation, tansformations of embedded nodes matrix calculation etc. We decided not to use them in favor of Maya API, which sharply increased the exporter performance.

It’s about time to add one new law to Murphy’s laws: Any project you come up with will be ready in no less three times the time you intend for it. But the result was worth it. After all, even our lead artist, responsible for the export of models, found after a few months of work our exporter to be “almost ideal”.

To be continued…

17 thoughts on ““How we make WoWs: Export Automatization and Content Verification” – Part 1

  1. For some reason I thought Wargaming would be 3ds Max people, not Maya, but oh well, guess I was wrong.

        • Having used both I can say they can produce the same final image. Highpoly film assets are, practically speaking, identical to highpoly game assets now. Max and Maya can handle the same tasks. That said, it’s not uncommon to have a bunch of licenses for both platforms. In this case, Maya might be used for the rigging and exporting. Every asset was likely touched by Zbrush, Max, Maya and a host of other applications before it made it to this final export stage….

  2. Heh, I always thought that if something is converted from external format to internal one, it is imported, and from internal to external – exported.
    So this article describes a Maya plugin, and is boring. As for me, they can make their models in anything they want – Notepad, CAD, anything, I don’t really care.

    So – wow, they made a tool that reads a description of polygons and boxes and stuff and writes it in different format.

    • When british fanboys stop asking when the Royal Navy is coming.

      Which means never since it seems it’s such a drama and a first world problem if they have to wait a little more to get their navy in game.

      • Royal Navy has more “rights” to be in a naval game than the Soviet…whose greatest achievement was torpedoing a German civilian ship and killing thousands of innocent people.

  3. Very interesting read!! I like this blog more and more each day, especially since I’m interested in the internals of game development :D

    And for everyone who does not understand anything, this is tool design thread. Very serious.

  4. > It’s about time to add one new law to Murphy’s laws:
    > Any project you come up with will be ready in no less
    > [than] three times the time you intend for it.

    There’s nothing new about that. It’s more of a universal constant.

  5. Interesting, and do they abbreviate wows as wob? I mean world of battleships I think? Just base on project directory or maybe I’m just making this up.