Jan27

Dynamic Multi-Layer Texturing in Action Arcade Wrestling 2

Categories // AAW2 Development Series

Creating a dynamic high performance texturing system

A little over a year ago I was contracted by Dave Horn, the creator of the Action Arcade Wrestling series, to help transfer the game to the awesome SunBurn Engine and implement a few things like the UI and Save/Load functionality just to name a few.
Dave had a functionality in mind where the Wrestler had customizable clothes, skin and face features using a blend shader. Though this worked it used way too many resources, memory and performance wise because it had to sample from about 14 textures to composite the final result every frame. After thinking of ways to reduce the performance hit I had an idea to pre-composite all 14 layers into 1 pre-rendered result texture which is then applied to the Wrestler.
Using that technique, I effectively eliminated any performance hits that the custom shader brought and was able to use the default SunBurn shader. The compositing of all the layers is done during load time and is therefore unnoticeable to the player. The only exception to this is in the Create-A-Wrestler mode in AAW2, here the player has the ability to edit each layers texture and color. Each time a property is changed the layers are re-composited and the result is applied to the Wrestler for previewing. This had to be handled carefully to avoid memory issues and not stall the game for too long.
The result of this work can be seen in this video:
More on the work in AAW2 coming soon, please comment on what you think of this post and what you would like to see next.

Comments (6)

  • Jesse

    Jesse

    19 September 2013 at 00:42 |
    Very interesting with regards to the texture combining! I wish I had read this before I had to work long hours to stumble upon this for myself in my game.

    My only difficulty is doing so fast on a 256x256. I cant seem to get it under 70 ms
  • Ujen

    Ujen

    19 September 2013 at 05:13 |
    Hi Jesse, I'm happy this post helped you out !

    Are you re-compositing the final material every frame?
    If so then this approach is not ideal, A shader will be quicker in theory.
    • Jesse

      Jesse

      19 September 2013 at 15:59 |
      Hey UJEN,

      I generate the textures pre-match. I have 32 textures split between four areas (head,arms,upperbody,lowerbody) and so I bake all of the textures together during the loading process. Great performance boost in-game without the layers (especially when multiple wrestlers are involved), but added a couple of seconds per wrestler to loading. The loading speed is still very fast, but there's no doubt that it could be better with assembly or like you said; a shader.

      This technique is also flagged - meaning the editor still uses the layers, but the matches use this feature. It was the only way I could keep the editor running quickly enough for my liking.
      • Ujen Tchoukhrov

        Ujen Tchoukhrov

        19 September 2013 at 16:10 |
        Got it, that's exactly what we used in AAW2 on Xbox.

        In the next version i'm completely redoing this system to make it even more flexible and faster, my initial idea is to use a compute or a simple pixel shader to composite each layer in the Editor and when exiting Edit mode the final composite gets saved in the save file, this way no pre-compositing is needed during match load. And in the Editor this will allow for very decent performance. There are a number of other features that this allows, but i can't talk about them just yet. In a future blog though ;)
        • Jesse

          Jesse

          19 September 2013 at 16:28 |
          Fantastic idea - caching what was made unless parts are changed takes it a step further, for sure!

          Anyways as someone in the same boat, I'm a fan of your work - keep it up and I look forward to the upcoming versions.
          • Ujen Tchoukhrov

            Ujen Tchoukhrov

            19 September 2013 at 16:36 |
            That's good to know, will do.

Leave a comment

Please login to leave a comment. Optional login below.

Twitter Feed

RT @ChikaraAAW: Almost ready for the Creation Application BETA test. For those of you who donated to the level of the “Edit Mode Beta Teste…

Eugene Tchoukhrov Eugene Tchoukhrov