Author Topic: SAF's Dev Diary no. 2 - Thinking in terms of Systems  (Read 682 times)

SilverAgeFan

  • Global Moderator
  • Newbie
  • *****
  • Posts: 13
  • Inf: +4/-0
    • View Profile
    • Awards
SAF's Dev Diary no. 2 - Thinking in terms of Systems
« on: April 28, 2021, 12:34:04 pm »
Hi all. The kid gloves are coming off and the diversified gloves are going on!

Today, in advance of the BIG Ri2 REVEAL, I'd like to take a little time to talk about Glove Diversification (what it is and how it works) and couch that in the notion of thinking about our beloved costume creator library from a systems based perspective.

I know when you read systems based perspective, some of you may immediately think I'm talking about anything but art. And SAF is an artist, not an engineer or coder. Believe it or not, systems informed art making became quite a thing in the fine arts over the last 50 years--be it social or environmental systems, self-propagating artworks or things that eventually become subsumed by the space around them, or even temporary interactions of a happening that then ricochet through an environment.

But enough high minded speak. Let's get down to what this means here on Rebirth and in our costume creator. Hopefully by now, you've all gotten a chance to play with some of the new content offered in Rebirth Issue 1 - Guardians Rising. One major cosmetic component of our new release is what we are calling Glove Diversification.


This new feature allows you on about a dozen different glove options to now mix and match things like wristbands and bracers or small 3d gloves and elbow pads with a majority of our existing glove and wrist pattern library, essentially creating hundreds of new costume parts. While working on a smaller project, I recognized an opportunity within the way our game engine allows for compound textures to take a systems approach and potentially open up a multitude more options than I would if I had to craft every single new option by hand.

Here is an explanation of how glove diversification works:

As you may already know, every 3d object you see in game has a texture applied to it. Every texture is actually a composite of several graphic files, stacked on top of each other. There is the base texture that has things like shading for fabric folds and rivets and a touch of figure shadows. Then there is the normal map which is a fancy name for a more modern version of a bump map, a graphic used for more detailed shading and determining the shininess of a surface. And lastly, you have the dual color map. This is what gives you the player the ability to set different colors to different parts of a costume. Those patterns you select for your tights? All of them are dual color maps. Those new cape patterns? Dual color maps with an alpha channel cut out. Chest emblems? Same thing.

What you might not have known is that the City of Heroes engine allows you to combine two of each of these in what CoH devs sometimes refer to as tricks, texture tricks, or X_ textures. These X_ textures also have a few additional options, like adding a multiply layer (commonly used for reflections) and a glow map. Things like the Metallic and Bioluminescence textures already were using these fancy X_ textures.

In order to combine two sets of textures, we have one more graphic. A mask. If you've ever done any intermediate or beyond Photoshop work you've probably encountered a mask. But if you haven't, here is a quick explanation of how they work.

Take any two arbitrary images.


Pretend each of these images represents a stack of in game textures I described earlier, the base texture, the normal map, and the dual color map. Then say you wanted to combine parts of these images in the same way CoH does it. To do so, you'd need to make a black and white graphic for your mask layer. This is as good an example of a mask graphic as any.


When applied to the two stacks of textures, the blended channels using that mask would look like this:


With this in mind, I want to loop back one last time to the glove diversification. In a very similar way, I found that I could take what were more basic single stacks of textures and use masks (some already in game, some custom) and get them to relatively quickly play nice with other existing textures in game. It took a decent amount of time and care to set the files up. As well as a bit of a curatorial eye to weed out combinations that just didn't makes sense in certain contexts. But the ultimate result is a new costume sub-system that allows us to have small gloves and tai padding on our stoney characters!


And of course since I was already deep in X_ texture land, it seemed like a no brainer to create a few custom graphics to add glows and metallic sheens to some of the options where it made sense.


An addendum to this all: If you've played with the Glove Diversification, you may have noticed the conspicuous absence of a few prominent texture options for wrists, such as Metallic, Muscular Bodysuit Shiny, and Chainmail. These are absent because unfortunately, the way these textures create their luscious surfaces require usage of BOTH stacks of textures. So it is like the game is combining one picture of lemons with another picture of lemons (only adding a slight, selective reflection to the second stack of lemons). In the end, there is NO ROOM for the puppies! Which means no diversification for those specific textures.

And an EDIT: All this is possible because Paragon in their wisdom or by chance decided to standardize how most of the costume parts textures unwrap. For example, the knuckles and fingers fall in exactly the same place on the texture map for almost every glove in game! (Except the dreaded Sport gloves which are mapped to a boot texture because :o ?!)

What's next for systems based costume improvements after Glove Diversification?

Glove diversification is only the first big step in opening up hundreds if not thousands of new options for Rebirth's costume creator. In coming issues, I will where possible, be proliferating the technique to other costume parts. We also have some more obvious asymmetry work planned including asymmetric boots and gloves which have been proven elsewhere to be fully possible--albeit with a bit of labor on the geo models to split the left and right pairings.

But the big news, which I can't reveal quite yet, is we have something really special coming to Rebirth with Issue 2. The astute forum reader may have already discovered an image or two of this feature tucked away in plain sight on this forum. But for those of you not wanting to engage in the egg hunt, I promise my NEXT diary will be all about this new feature that represents not only a Rebirth first, but a first across the entire CoH community!
« Last Edit: April 28, 2021, 01:53:36 pm by SilverAgeFan »

Draggynn

  • Newbie
  • *
  • Posts: 39
  • Inf: +16/-0
    • View Profile
    • Awards
Re: SAF's Dev Diary no. 2 - Thinking in terms of Systems
« Reply #1 on: April 28, 2021, 12:52:35 pm »
Thank you so much SAF for taking the time to put this together.  I found it to be a fascinating and enjoyable read and did an excellent job of enlightening on the way our costumes are constructed.  Especially interesting about the Sport glove, do I see boots for hands in the future?  ;)
@Draggynn: Storm Summoning Psychic Defender and Badge Hunter, formerly a resident of Virtue
See my collection of commissioned art: https://www.deviantart.com/drag-gynn

SilverAgeFan

  • Global Moderator
  • Newbie
  • *****
  • Posts: 13
  • Inf: +4/-0
    • View Profile
    • Awards
Re: SAF's Dev Diary no. 2 - Thinking in terms of Systems
« Reply #2 on: April 28, 2021, 01:07:37 pm »
Especially interesting about the Sport glove, do I see boots for hands in the future?  ;)

haha! no!! But I do want to eventually loop back to glove diversification for a second round. It would take custom mask maps on all the other models I've identified for the system, but I'd love to liberate those spider plates from the Sinister gloves for use with other parts!

All told I took notes on like 15 more possible candidates for the system in gloves alone.

As far as boots (for boots, not gloves!  ;) ), I anticipate those getting diversified after we've implemented asym boots on Rebirth.