Hello, everyone. I am working on developing a free and open source plugin I am calling AWOC or Avatar Wardrobe Organizer and Colorer. Probably need a better name but that's pretty much what AWOC hopes to accomplish. AWOC solves a common problem in game development. Let's say you have 3D model with 10 unique outfits that are split into several different parts like helmet, gloves, torso, etc. And each one of those parts has areas that you would like to be able to color dynamically. You can load up the avatar, turn off the meshes you don't need, and apply materials to the meshes you want to show. But now you have a separate draw call for each mesh and materials laying around everywhere.

And what if you want to have a dozen or 100 of these avatars running around in your game world? You would have to instantiate your avatar over and over, turn off the meshes you don't need, add materials, animations and on and on. It's a big task and if you are just hiding the meshes so you can turn them back on later, you now have a hundred copies of every mesh floating around.

AWOC is still in early development but the idea is that you will have slots, meshes, materials, animations, recipes, and wardrobes. Slots are a way of telling AWOC where you want an item equipped. For example, lets say we have the following slots: helmet, hair, and beard. If you want to equip a helmet, you just tell AWOC which helmet you want to equip and AWOC takes care of removing the previous helmet before equipping the new one. Also, slots can have hide slots. So in the case of the helmet, we could add the slots for hair and beard to the helmet slot as hide slots and when AWOC equips the helmet, it automatically un-equips the hair and beard slots. When you remove the helmet, AWOC automatically re-equips the hair and beard.

When AWOC builds your avatar, it automatically combines all the meshes you have equipped into a single mesh. This saves draw calls but comes at a cost. All of your UVs will also be compressed into one. Eventually, I'd like AWOC to automatically combine all the materials into one huge material and offset the UVs for each mesh but that will probably be one of the last things I work on. For the foreseeable future, you will need to offset your UVs yourself before you create an AWOC.

Materials will consist of an albedo texture and any number of overlay textures. Overlay textures are just images with either a black or transparent background and a white or red mask. When you create a new AWOC, all of the pixel information for all of your overlays will be read into a single array that will be used to apply color, metallic, emission, etc. This way, AWOC only has to read pixel information in the editor. When your game runs, it will only have to set pixels on the new texture.

Recipes are where you bring everything together into something you can use. A recipe will consist of a slot, any number of meshes, and a material. You can preset colors here or change them dynamically at runtime. If you add more than one mesh, the first mesh becomes the primary mesh and will always be equipped when you equip this recipe. The other meshes become options you can specify when you create the AWOC in your game. Say, for example, you have a chest plate with a belt and you'd like the belt to be optional. You add the chest plate as the primary mesh and then add the belt to the recipe. Now, if you load this recipe, by default, it will include the belt but you will have the option to turn the belt off if you want. This keeps you from having to create and manage a chest_plate slot and a chest_plate_belt slot.

FInally, Wardrobes are just collections of recipes. So instead of loading the helmet recipe, gloves recipe, torso recipe, etc. separately, you can load an entire wardrobe with a single line of code. You will also have the option to export the material into a file with all the colors, metallics, etc. baked in to make loading an entire wardrobe more efficient.

As I have said, AWOC is still in early development. I worked on it for a while in Unity but then Unity went and stabbed a rusty spear through my trust and roasted it over a raging fire until not even ashes were left so I began porting to Godot. So far, things are going much more smoothly in Godot. As of now, slots and meshes are working in the editor. I still have a little code cleaning to do before moving on to materials.

Once things get a little more settled, I'll do a video on how to use AWOC. For now, feel free to download it and play around with it. Just know that AWOC is free and open source so I can't be held liable if AWOC ruins your project or your life.

You can check out the project at https://github.com/standstilldigitalmedia/AWOC

    4 days later

    This project has been moved from GDScript to c#. WelcomePane and SlotsPane have been converted and all code that currently works has been documented.

    • xyz replied to this.

      Give us some pictures to look at 🙂

      There isn't a whole lot to see yet. I will be doing a video once there is more to see. For now, the WelcomePane looks like this.

      WelcomePane

      Here, you can create a new AWOC or load an existing AWOC. Once an AWOC has been created or loaded, the navigation buttons on the left get activated and you are switched to the SlotsPane.

      SlotsPane

      Here you can add, remove, and edit slots. Slots are just a way of telling AWOC which meshes can be equipped where. In the image above, this AWOC has 3 Slots: Helmet, Beard, and Hair. Clicking on the Helmet button opens the the little control area with the name edit, save, delete, and view buttons. Clicking the view button opens the "Slots to hide when equipped" area. In the AWOC above, when a Recipe equips a mesh in the Helmet slot, any equipped meshes in the Helmet slot or the Hair slot will be automatically unequipped. If the helmet is removed, the Hair slot will automatically be re-equipped.

      MeshPane is still in the process of being converted to c# but here is a screenshot from before the conversion started.

      MeshesPane

      Once you have loaded a .glb file, AWOC will go through and find the skeleton and rebuild it on a new object. Clicking on the closed eye next to a mesh name will cause that mesh to be copied from the original source file to the new object and parented to the new skeleton and then shown in the preview menu. Clicking on the open eye will do the opposite. The controls at the bottom of the preview window can be used to rotate the model, move the camera around, and zoom in and out.

      I will be working on the panes in the order of the buttons in the left navigation. So up next is Meshes. This code is already written in GDScript but is only partially converted to c#. The conversion from GDSCript to c# has revealed many design flaws so far and I don't expect MeshesPane to be any different. In the example above, the mesh object's center is offset for some reason. Maybe converting to c# will reveal why.

      Thank you so much for your interest in this project. I am working on AWOC every spare second I can manage. AWOC is and always will be free and open source. I hope that one day it will be useful to the Godot community.

      • Toxe replied to this.

        standstill Avatar Wardrobe Organizer

        This is a highly interesting project. The ideas could be useful for creating a character generator. Some of the suggestions overlap with how I was going to do things, and others are original.

        This project has been moved from GDScript to c#.

        And that, unfortunately, is a drawback. Curious — why?

        Partially similar was realized in games from Illusion:

        And that, unfortunately, is a drawback. Curious — why?

        I have over a decade of experience with c# and about 2 months of experience with GDScript. Why is c# a drawback?

          standstill Why is c# a drawback?

          1. C# is not a natively language for Godot. Hence a lot of problems:

          Note that C# support is still relatively new, and as such, you may encounter some issues along the way.

          1. As far as I understand, a module made in C# cannot be included in the normal version of the engine.

          Your project is very interesting for me. Because it could be included in my project. (Only there we are not talking about hundreds of characters.) But:

          1. I don't have enough fantasy to imagine how the clothing system (Wardrobe) could be separate from the character generator.
          2. it is impossible to include a C# module in a regular engine. I could be wrong here, but I see separate modules for the regular version and mono.

            Tomcat As far as I understand, a module made in C# cannot be included in the normal version of the engine

            From what I gathered when I first started looking into Godot, Godot 4 has vastly improved c# support and the goal is to eventually combine both editors into one. I've honestly gone back and forth on which language to use. I want this plugin to be useful to the community. GDScript would allow more people to use it but c# is more mature and robust and enforces good programming habits better than GDScript. I honestly didn't expect to get this far this quickly. I figured c# would be fully integrated by the time I was finished.

            Tomcat I don't have enough fantasy to imagine how the clothing system (Wardrobe) could be separate from the character generator.

            AWOC is a character generator

            Toxe The color scheme reminds me of codex conversations from Metal Gear Solid.

            I bought the original Metal Gear on the NES from a friend with birthday money before I even owned a NES. It was the first thing I ever purchased with my own cash. I planned on playing it on other people's NES until I could get my own. My mom somehow got us a NES a month or two later.

            EDIT: Forgot to mention that MeshPane has been converted to c# and is working well enough to preview. Still needs some work but the basics are in place.

              standstill I want this plugin to be useful to the community.

              Of course it will be useful… for those who use C#, and there are quite a few of them.

              AWOC is a character generator

              It's not quite clear from the description.

                Tomcat It's not quite clear from the description.

                Sorry, I am so close to this project, I made some assumptions when I was describing it. Everything you do in the AWOC editor window is stored in a resource file. The idea is that you would be able to reference this resource file from within your game and call a function like BuildAvatar(RecipeList) or BuildAvatar(Wardrobe). These functions would return a Node3D object with only the meshes you specified rigged and parented to a skeleton that is the same as the source skeleton. Materials and animations will also be applied based on the parameters of the hypothetical BuildAvatar function. You could do things like ColorMaterial(MaterialName, MaterialOverlayName,255,0,0,255) and it would color the section specified in MaterialOverlayName of the material specified in MaterialName the color red. The AWOC editor window is just where things get configured. The actual job of AWOC is to give you the ability to dynamically customize an avatar in your game.

                EDIt: In hindsight, character creator may mean something different to you than it does to me. I guess in the truest sense, AWOC is not a character creator but rather a character customizer. In my defense, the objective is to create a character avatar.

                a year later

                Some projects are scrapped and RIP. Maybe it makes sense to delete their threads completely so that they don't clog up the forum and mislead good people?

                  Tomcat i think it should remain, who knows, maybe the dev just took a vacation and will be back with updates.. its good enough for someone reply at the bottom to tell people that this project is done for..