Home Technical Talk

Interchangeable Equipment

I should start by saying that I've only just gotten into working with 3ds max and wanna break into game modeling. A friend of mine is making a game that involves interchangeable equipment, hair, weapons. At the beginning i set about building a base body mesh and then modeling all the equipment that the character would carry/ wear but then I realized that there would be a LOT of poly's under other poly's that wouldn't be visible. What is the industry accepted 'right' way to do this? Does anyone know what they do in MMORPG's?
index.php?action=dlattach;topic=7710.0;attach=3789;image

Replies

  • McBradd
    Options
    Offline / Send Message
    McBradd polycounter lvl 12
    To give you just one example, the game our studio is working on has the character broken down into slots, so when you change out a shirt, you are actually swapping out the entire torso.

    We've got special skin and hair shaders that the artists apply in those respective areas that fill in what the players chose during character creation. Every short sleeve shirt also comes with arms that have the skin shader applied.
  • Eric Chadwick
    Options
    Online / Send Message
    Yes, hidden polygons are wasteful. So a bare-chested model is usually swapped out with a shirt-chested model, the shirt polygons replacing the skin polygons.

    The seams between these pieces are best cut along natural seams, like the belt line, shoulders, neck, wrists. You can also use bent normals to further hide the seams (see http://wiki.polycount.com/VertexNormal#Model_Seams).
  • Kizmet
    Options
    Offline / Send Message
    Thanks to everyone for your responses! It kinda looks like a got involved in this project to get my feet wet and dove right into the deep end... It also dawns on me that I'll have to re-skin each new component to the skeleton: especially when they move/deform differently (ie plate mail v leather tunic). -sigh-
  • NutShulseNeer
    Options
    Offline / Send Message
    what an awesome post dude.
  • Builder_Anthony
    Youll also have to make armors for each gender and race.You might also want to consider adding a few extra slots in case people want to make extra items like backpacks or robes.If you put the extra slot in there they wont have to do a work around like adding the back pack to the neck slot,They just model it in that slot But it appears on there back.They run out of slots.Its just a workaround.Maybe a ring or neck jewelry.Below is the layout for slots for neverwinter nights.

    Head
    Neck
    Left shoulder
    Right Shoulder
    Torso
    Left Bicep
    Right Bicep
    Left Forearm
    Right Forearm
    Left Hand
    Right Hand
    Belt
    Pelvis
    Tail
    Left Leg
    Right Leg
    Left Shin
    Right Shin
    Left Foot
    Right Foot
  • Kizmet
    Options
    Offline / Send Message
    great post Builder_Anthony! I'll keep this breakdown in mind. I wonder if this is pretty standard for mmorpg's and the like.
  • Bigjohn
    Options
    Offline / Send Message
    Bigjohn polycounter lvl 11
    I'm curious, does anyone know the answer to the memory question? (Which I guess was in another thread, must be 2 threads with this title)

    What I mean is, if you make all unique geometry and textures for something like that, and you end up having hundreds/thousands of potential items, do you also have to make sure that all of that fits within 512MB? (Or however much the graphics card has)
  • Kizmet
    Options
    Offline / Send Message
    Yeah I didn't realize I had to wait for my first post to be approved by a mod- so I posted again. I thought my first post failed. I caught on the second time...
  • Builder_Anthony
    Each armor peice would be considered a seperate peice.At least in the engine im used to.
  • haikai
    Options
    Offline / Send Message
    haikai polycounter lvl 8
    Bigjohn wrote: »
    I'm curious, does anyone know the answer to the memory question? (Which I guess was in another thread, must be 2 threads with this title)

    What I mean is, if you make all unique geometry and textures for something like that, and you end up having hundreds/thousands of potential items, do you also have to make sure that all of that fits within 512MB? (Or however much the graphics card has)

    Generally speaking you would NOT want to be using unique textures for each piece of gear on a single character unless it's all going to be put together into a larger, single texture later. You're going to want to have a way to end up with as few textures as possible whether it be through BLITing or something comparable.

    The size of the textures is an issue, but the bigger problem might be the number of draw calls you'd need if you had unique textures for everything. Especially in an MMO type game where you might literally have hundreds of characters on screen, having more draw calls per character adds up very quickly.

    As far as I understand it, you're mostly concerned with the number of items displayed. You can have thousands of "potential" items, which all MMOs have, but hopefully you're never going to be seeing them all at once.
  • Tickwomp
    Options
    Offline / Send Message
    Tickwomp polycounter lvl 7
    Hi guys, I'm new to these forums, and I'm also tackling the same issue.
    Youll also have to make armors for each gender and race.You might also want to consider adding a few extra slots in case people want to make extra items like backpacks or robes.If you put the extra slot in there they wont have to do a work around like adding the back pack to the neck slot,They just model it in that slot But it appears on there back.They run out of slots.Its just a workaround.Maybe a ring or neck jewelry.


    Could you explain what you mean by slots? You mean like bones/sockets for another mesh to be swapped?
    haikai wrote:
    Generally speaking you would NOT want to be using unique textures for each piece of gear on a single character unless it's all going to be put together into a larger, single texture later. You're going to want to have a way to end up with as few textures as possible whether it be through BLITing or something comparable.

    The size of the textures is an issue, but the bigger problem might be the number of draw calls you'd need if you had unique textures for everything. Especially in an MMO type game where you might literally have hundreds of characters on screen, having more draw calls per character adds up very quickly.

    As far as I understand it, you're mostly concerned with the number of items displayed. You can have thousands of "potential" items, which all MMOs have, but hopefully you're never going to be seeing them all at once.

    Just wondering how you would avoid using unique textures if you've got a mish-mash of equipment? Lets say I've got bracers and gloves from one armor set, a chest piece and boots from a second armor set, and everything else from a 3rd set. Does this mean you've got 3 draw calls minimum (1 for each armor set)?


    As a more general question, when building separate parts for each body slot, do you just keep the edges where 2 parts meet in the same spot? e.g. if i separate legs from the pelvis, I can change the geometry on the legs everywhere else as long as the top open edges meet with the edges of the pelvis? I've been doing something similar to this for a class project but I have no idea if this is "right" or if there's a better way to do it.

    Thanks!
  • greevar
    Options
    Offline / Send Message
    greevar polycounter lvl 6
    Wow, that's a very good question! It's seems like quite the paradox. On one hand, you could make unique textures for every item and end up eating lot of resources, or you could put related items into a shared texture map which would use more RAM. But then if the player uses items from differing texture sets, you have several textures that are only being partially used, in RAM. I think TES III and IV found a way to do this. What's their method?
  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    Maybe they generate texture atlases on the fly?Not sure how efficent that would be, but it´s definately possible.
  • haikai
    Options
    Offline / Send Message
    haikai polycounter lvl 8
    Tickwomp wrote:
    Just wondering how you would avoid using unique textures if you've got a mish-mash of equipment? Lets say I've got bracers and gloves from one armor set, a chest piece and boots from a second armor set, and everything else from a 3rd set. Does this mean you've got 3 draw calls minimum (1 for each armor set)?

    Regardless of how many "items" your character ends up having, the goal is to get all those textures combined into a single texture sample so you don't end up with more draw calls per character.

    I've mentioned the BLIT process before, but I'm not sure if some of you are checking it out. Some variation of this technique is what many games use to handle this.
    Tickwomp wrote:
    As a more general question, when building separate parts for each body slot, do you just keep the edges where 2 parts meet in the same spot? e.g. if i separate legs from the pelvis, I can change the geometry on the legs everywhere else as long as the top open edges meet with the edges of the pelvis? I've been doing something similar to this for a class project but I have no idea if this is "right" or if there's a better way to do it.

    Yea, you're going to have to come up with a system and rules on how to build the pieces to avoid gaps or egregious clipping when swapping pieces. Having "seams" where you must line everything up is probably the most basic way to do it and is pretty common (that's pretty much what we did on Guild Wars 1). I've seen some other games that appear to have two versions of coats and pants (long sleeves tucked into gloves/boots and not tucked in), and I think FFXIV might have something more advanced, but I haven't checked it out myself yet.
  • Tickwomp
    Options
    Offline / Send Message
    Tickwomp polycounter lvl 7
    Ahh Okay. I have heard of a process where on the program side, the engine combines multiple textures into one big texture and it just calls different portions of the same "megatexture" if you will so it only does 1 call. Is this the same thing as the BLIT process? Or is there another way where all the different textures are combined into one sample? Thanks for the input, really helps me wrap my head around this stuff.

    BTW, I LOVE the work on your site :)
  • haikai
    Options
    Offline / Send Message
    haikai polycounter lvl 8
    Tickwomp wrote:
    Ahh Okay. I have heard of a process where on the program side, the engine combines multiple textures into one big texture and it just calls different portions of the same "megatexture" if you will so it only does 1 call. Is this the same thing as the BLIT process? Or is there another way where all the different textures are combined into one sample? Thanks for the input, really helps me wrap my head around this stuff.

    The whole megatexture thing is different. I won't pretend I have any in-depth knowledge on that, but I'll try to explain the BLIT stuff more clearly:

    Let's say you have a single texture for your character and your goal is to have all your item textures appear on this texture. You need to come up with a template for this map dividing it up into BLIT regions (each interchangeable item gets its own region). How you divide this is up to you, but you're going to be stuck with it from this point on, so plan ahead. When you texture your armor set you have to make sure that the UV areas for each item is following the template you came up with.

    So you made a starting armor set and have divvied up the parts as mentioned above, and are ready to make the next armor set. All you have to do on the new armor set texture is make sure that the new pieces fit into their respective BLIT regions as well. Keep in mind that this is a completely different texture so your new boots can take up the full area that the old boots occupied. You are NOT trying to cram in 50 boot textures into the same space at once!

    From the artist's perspective, YOU are making a new and unique texture per armor set, but the GAME is going to BLIT these textures together depending on what the character is wearing. So let's say your character is wearing the first armor set and you want to wear the boots from the second armor set. The engine will cut the boots region from the second armor texture and paste it onto the first armor texture. So even when wearing totally mismatched armor you're always going to have just a single texture at the end of the day.

    That's probably the most basic situation. You can come up with all sorts of exceptions and supplementary tech to further diversify things, but regardless it's probably something you're going to need to figure out with your programmers. To be honest, it's a pain in the ass to work with, and incredibly restrictive. It's not the only way to do this stuff, but the BLIT thing has been around for a while, and is still used.
    Tickwomp wrote:
    BTW, I LOVE the work on your site :)

    Thanks!
  • Tickwomp
    Options
    Offline / Send Message
    Tickwomp polycounter lvl 7
    Awesome explanation, thanks for clearing that up. It does make more sense now :D
Sign In or Register to comment.