Game Development Community

Putting clothes and armor on characters.

by Sanctus Legacy Online Admin · in Artist Corner · 02/10/2005 (7:56 pm) · 42 replies

Okay- as our team has been working on our project, we're starting to understand why other teams put up a new snapshot every time they get a model in game. It's darned near impossible. Between horrible exporting issues, few to no mainstream tools that support Torque's file formats... *rant, rant*

Anyway, we finally have a character model textured, rigged (mount nodes, level of detail), and animated, and in game. We have tested mount nodes by attaching a weapon to the character's animated arm, and all seems to be well. Thing is, there's a big jump between having a single weapon attached to a single node and what we want.

Before we press on, we really just need to hear from somebody who's done it before- get some advice, talk to some people who know what they're doing.

Our players will have their base model (the "naked" body), and then interchangeable clothing / armor, and we need to know what the best method of implementing this is. Assume, for our purposes, that the player will be able to customize their base model's texture, to allow for variations in skin color and things like tattoos, chest hair, scars- whatever.

Originally, we had envisioned just having everything mounted as seperate models over the body. The shirt would be a seperate model, mounted to the hip, chest, shoulders, elbows, and wrists. The pants would be a seperate model, mounted to the hip, knees, and ankles. Shoes would be seperate models mounted to the ankles and toes. You get the picture. Certain pieces would be layered: chestplates would be larger than shirts, and would also be mounted to the hip, chest, and shoulders, and would lay over the shirt.

If this method works, I would be enthralled. In theory, we could have some hidden-faces culling methods implemented to help out with the framerate, and as long as we have a clearly defined limit for how "thick" shirts can be and how "loose" armor has to be, we would be alright, ne? Again- we don't know, and we haven't tried. We're asking for your advice.

Another option that's popped up is having only a few certain things be mounted: armor, gloves, shoes, and headgear. Things like shirts and pants would be painted on to the body. Question is- is this feasible? We don't want to actually change the body's texture altogether- we still need the player's skin texture for parts that aren't covered by the shirt/pants/whatever. Is it possible to use multitexturing to paint the shirt over the skin texture? If so, what is the FPS damage done?

If this method works, I would not be extremely disappointed, although I think that having "baggy" clothing adds a good deal of style and quality to characters. Of course, we could always have parts of the clothing mounted- like fluffy sleeves or loose collars. The advantage to this method is that we don't have any sort of limitation on how "tight" armor can be.

The last option we considered was simply condensing the shirt, chest armor, and pants into one thing- a "suit" or an "outfit". If this is the case, then we can just have interchangeable bodies altogether, and have parts of the body that are not covered by clothing/armor be UVmapped to the player's skin texture, and the rest UVmapped to the clothing/armor texture sheet. This does allow for both customizable skin tone/design and customizable clothing/armor. We could also add in mounted accessories, as well as gloves, shoes, and headgear.

If this method works, we'd probably save it as a last resort, though. I mean, condensing equipment down that much seems like you're killing the idea of personalization altogether, and we wouldn't want that.


Anyway- your input on each of these ideas, as well as any ideas you may have or methods you have used in the past would be appreciated. We have modelers ready to work on this, as soon as we figure out the process. Thank you very much for the help.
#21
03/10/2005 (8:41 am)
Hey Gents. Nice to see you hitting the same roadblocks I did Artifex =). You have a talented core of people from the looks of things and I'm following your technical design process with intrest.

Not meaning to trivialize the very excellent technical discussions you guys are having here (It's only my own lack of an indepth understanding of the animation process and I apologize for this.) but from a design view 1 thing stood out ahead of everything else doing character customization technical design.. engine load.. Plain and simple.

Torque is an amazing tool. Seriously sickly powerful for a $100 investment. However when designing even a moderately multiplayer online game understand that the object state for every single object in a players sphere of influence will be updating very regularly. This is the number one killer of indie MMOs. Poor datastream design and burdening the rendering engine..

IMO: frame rate and playability preceed extensive customization. If using a particular type of model infrastructure is going to increase the overhead of that player by 2 or 3 times it's an ixnay in my books.

That said however you criteria are different than mine and you guys are doing some great groundwork. I really am watching how this evolves for you with great intrest.

(Insert shameful plug here)
My own project has been shelved pretty much since WoW release. I am developing an intense intrest in it again and think I will dive back into the database side of things. I have increased the size of my server farm now and really want to see if I can maintain a persistant world for any length of time.

I think I am going to drop you a line. The Sanctus Legacy style which I guess in my limited vocabulary I just label as "anime" really doesnt fire me up but if there is some things I can do for/with you and it helps move things along I'd be intrested.

Good luck guys

Mark
#22
03/15/2005 (11:24 am)
We actually aren't using anime for any of the player models, just stylized realism. The concepts however are highly animeish.
#23
03/15/2005 (9:01 pm)
I am interested in seeing how you are building your segmented models?

in that image above (the character) its one solid mesh with accessories added, not seperate arms/hands etc etc (or am i reading this wrong)

how will you cope with issues with gaps between joints (shoulders to arms for example) things like that
#24
03/16/2005 (8:23 am)
Too bad I found this a month after all the action. But I am interested in the problem here about
texturing things like tattoos, chest hair, eyes, and scars. You mentioned that you thought about
doing multitexturing (as in blending various texture channels in game). I am facing the same
problem in our MMOG. We have a fairly large number of different combinations and placings or
such customizations. We have come up with only three possibilities which seem feasible.

1.) Adding small polygons on the surface of the mesh at places for scars, etc and then allowing
the players to select from various transparent textures.
+ does not need multitexturing (ie works in stock TGE)
- small overhead in using transparent textures and added polys (with lots of players on screen)
- could have problems with deforming mesh animations

2.) Using multitexturing.
+ better performance over (1). because multitexturing skips transformations in pipeline
- having to add code to engine (probably substantial)
- possible modifications to exporters (depending on your project)

3.) Custom texture generation. Use imaging library like imagemagick to combine
scars, eyes, etc to base textures. Also good for blending skin color. Then you are
left with a single texture to apply to a dts. This being done in game or out depending
on your customization size and needs.
+ no modifications to engine needed.
+ simple to implement with respect to (2)
+ offers high customization possibilities
+ good performance, better then (1) and (2)
- can result in large number of textures depending on how many differences can be found
in a loaded area

We current are planning on going with (3) for our game. I kinda like (2) but from the looks
of the engine code, it might be tricky to do well. We also have a pretty large performance
constraint, so (3) looks best from that end.

But I am interested in hearing what people think and if you have made any decision on your
game.
#25
03/16/2005 (9:24 am)
@Ashley: We arent using segments.

We use one solid nude mesh, then we retexture lets say a shirt for the area the shirt will be on, when the shirt is equipped, then for things like bracers boots and shoulder pads we mount the mesh over top of the base nude mesh. The nude mesh being conceled by the armor isn't rendered and saves us frame rate.
#26
03/16/2005 (2:43 pm)
You sure about that Paul? I think I must be misunderstanding you. The base mesh is still rendered 100% underneath mount points to my understanding.

Also Re the retexturing, are you using multi textures then? Or do you have like 100 possible textures for different player base clothing combos?

Intrested to hear how its currently being done.

Mark
#27
03/17/2005 (12:30 pm)
-----quote------
I think I must be misunderstanding you. The base mesh is still rendered 100% underneath mount points to my understanding.
-----quote------

Ok lets say that a chest peice is mounted over the chest, then the chest will not render beneth the armor which is covering it. It has nothing to do with the mount nodes, just the armor meshes.

EDIT: It works similar to how a .dif will only render what you see, our coders told us they could get this to work so we believe them for now.

As for textures we will be using multitexturing, swapping, and texture layers. We are still testing all this.

So yeah we aren't 100 percent sure about anything at this point, we are still testing. But if our coders say they will giterdone, then we will go on that for now.

Even if it doesn't work we are only loosing about 100 polys per model fully armored, so our models will still be beneath the 2000 tri cap fully armored.

If it works, awesome, if not, awesome, we loose nothing, and gain everything :)
#28
03/17/2005 (3:57 pm)
Not to ruin anything, but if this "mount" system your speaking of is Torque's mounting system, it limits at 8 mount points per shape(o-7), which can be upped with doing some code changes, but I'd have no idea how. Just figured I'd bring that up so you are aware of it and don't freak out when you get to that stage. :)
#29
03/17/2005 (5:22 pm)
@Tim: Very few of the systems we're using are actually built into Torque. Torque, as it is shipped, is almost worthless for any sort of real game beyond, say, a low-budget First Person Shooter, or a puzzle game. I'm not saying this to be snobby or rude to you, as an employee, any fans of the Torque engine, or our other friends here at GG: it's just a simple truth. Torque was never meant to be used out-of-the-box for any sort of large game: it's just a foundation for game developers to work off of.

---

That said, perhaps I should clarify a little bit more on the system we're intending to use, for the sake of those who may be confused, and also to confirm with Paul Fassett that we're on the same page.

The first thing that will be rendered is the headless, footless, and handless "nude" model. This model is UVed to a handful of textures: one for the torso area (including upper arms), one for the legging area, and one for the arms. Since it is UVed to multiple textures, we can apply specific textures to one area and not another.

Now, let's take that idea a step further, and throw multitexturing into the mix. -If- what our coders are telling us is worth anything, we can apply four layers [via multitexturing] to any polygon, and only be "docked" once for multitexturing on 99+% graphics cards. Each section of the "skin" can have 4 textures layered on to it, and the result might be something like this:

Torso:
-Skin
-Scars/Tattoos/Markings
-Shirt
-Armor

Legs:
-Skin
-Scars/Tattoos/Markings
-Pants
-Armor

[Lower] Arms:
-Skin
-Scars/Tattoos/Markings
-Sleeve of long gloves or long shirt
-Armor

The next thing to be rendered would be the bald head, hands, and feet, which would, similarly, have four textures applied to them. Each of these pieces is mounted on to the nude body, to allow for interchangeability. (Customizable heads, gloves/gauntlets, shoes/boots)

Head:
-Skin/Eyes
-Scars/Tattoos/Markings
-Facial Hair / Makeup
-Armor/Mask

Hands:
-Skin
-Scars/Tattoos/Markings
-Gloves/Gauntlets
-[Unused]

Feet:
-Skin
-Scars/Tattoos/Markings
-Shoes/Boots

After that, either hair or headgear would be rendered, mounted to the head.

Finally, anything that cannot be covered by multitexturing is mounted to the now-textured base model. This would include things like skirts, shoulderpads on armor, portions of loose clothing...

---

Anyway, that's what we're -looking- at. We haven't tested, yet: we're just trying to get this out there to hear from some of you: especially since it seems some of you are interested in hearing our results. We over at Trill
#30
03/18/2005 (6:53 am)
I guess my first comment would have to be in regards to TGE being "worthless for any sort of real game beyond, say, a low-budget First Person Shooter, or a puzzle game." It is true that TGE is a foundation to build something from. But I do not think I would go so far. Games are purely to provide entertainment. If a game succeeds in that, I would consider it a "real game." Take BZFlag for example, it is simple and has some pretty low-end graphics, but it is great fun and tons of people play it. I consider it a "real game" even though its engine is much less then TGE.

----

Secondly, in regards to the multitexturing. I am not sure if your coders have looked at the multitexturing in the TGE mesh, it is already using some multitexturing (hope it is ok to mention that in a public forum). Therefore if you are trying to only use 4 layers, you will have to scrap some of what is there, and I don't think you would want to for your game. But the actual limit on the number of multitexture layers you can have is system dependent, the minimum is 2 and the max is set to GL_MAX_TEXTURE_UNITS_ARB. Also some cards will only "dock" you once for each set of 4 layers because of the limits in the combiners, so after that you might be "docked" again. This is all OGL, not sure about DX though. Don't get me wrong, I think multitexturing is a great thing, it is just something to consider if you are concerned about performance. We decided to go with generating our custom textures before hand because of the number of objects we are rendering on screen. But that is not feasible if the number of textures per load area is a crazy amount.

----

Finally, the occlusion culling. If you pull that off I would be interested in hearing about how you do it. Often culling algorithms have a high overhead for trying to cull something so small. But I am only familiar with a handfull of occulsion culling algorithms. Do you know which one(s) you would use for that yet?
#31
03/18/2005 (7:27 am)
Quote:Torque, as it is shipped, is almost worthless for any sort of real game beyond, say, a low-budget First Person Shooter, or a puzzle game. I'm not saying this to be snobby or rude to you, as an employee, any fans of the Torque engine, or our other friends here at GG: it's just a simple truth.

you know.. this is pretty insulting. I just wanted to mention this as this is the type of attitude that will end up getting you no help. When I first saw this thread, I am sorry I did not haev time to post, as I had some ideas of how to tackle this..

after reading this little gem, I am glad that I did not post. Seems like you guys have everything under control. Good luck!
#32
03/18/2005 (9:54 am)
@Joe:

*nods*

I crossed the line between opinionated exaggeration and insult, and I know the guys have put a lot of hard work into this engine, so I owe you guys an apology.

I suppose replacing "real game" with "very large or complex game" would be more accurate, and I really should refine my statement to be something more along the lines of: "We're making a lot of changes to Torque, anyway, so let's not worry about what Torque supports by default."

I really did not intend to sound arrogant or insulting.



@Marc:

You have an excellent point that I strongly agree with: fancy graphics are not what make a "real game" or even a "good game". I definitely picked the wrong set of words. Torque has everything that's needed for a good game, right out of the box. It just does not have everything that's needed for a very large or complex game, or an MMO, for that matter.

As far as multitexturing goes: "prepainting" textures sounds like a very tactful method, aside from the pseudo-loading time you mentioned before. Mmmm.... if one was willing to invest the time and effort, they could add support for both options, and allow the user to select, no? If so, then users with higher-end graphics cards could let the textures be layered in-game, while users with lower-end graphics cards could choose to prepaint their textures.

We will definitely keep the prepainting method in mind, as it's quite tactful, and allows a lot of room to play, once you get past the time it takes to create the textures.

As far as the occlusion culling goes, we'll definitely keep you guys up to date. Again, I'm under the impression that it's probably not going to be feasible, as occlusion culling is very heavy on the processing time. But if we -do- come up with something, we'll let you know.
#33
03/18/2005 (11:09 am)
Justin, why you Sh&%ing up my thread :)

Torque is by no means useless, you just have to have coders to make anything beyond a fps. Having access to source code alone is worth the 100 dollar price for admission.

Exporters could be a little better, but thats another topic for another time :P

As I have said before, I modeled the humans with occlusion not working in mind. Our base models are all under 1800 tris, the female I believe is about 1680 with a head, so thats not bad considering.

If we can get occlusion to work that would be amazing but I am not counting on it. I don't know of any games that have it, and am not depending on this to make our game work.

Excuse our directors rudeness, sometimes his fingers type things his brain didn't want them too.
#34
03/18/2005 (11:50 am)
^____^

I'll just return to my dark corner, now.
#35
05/05/2005 (11:11 am)
Just my two cent on this.

I read somewhere on GG that if you have a mesh and apply two textures to it you end up duplicating that mesh ,ie a mesh of 100 polys with 2 textures is now 200polys.

If so then then only way to have multitextures on a Object is to split the object into pieces and have diffrent textures on each piece.

Once a model had been ripped into sections it would then been rigged as a bunch of parts, mind you you can't attach all the pieces together for rigging this will negate the customizing option later. So if you can rig multipule meshes together, you will end up exporting each piece of the mesh out. In the game you would need a way to get all the piece reambled on the skeleton. Mind you I am thinking in terms of MAX's Bones and Skin modifier. Correct me if I am wrong on this.

Seams would not be a huge problem as long as the seams/edge loops have the same number of verts in the same place this will work fine.

Like I said just my two cent and I have yet to dig deeper into Torgue so I might end up correcting my self about the above here in a few more months.
#36
05/05/2005 (12:01 pm)
Christopher: I think you may have misunderstood what you read... If you flag a texture as "double-sided", it basically duplicates the polygons and flips the normals, so you then have twice as many polygons. I don't think using multiple textures on a model has any effect on the number of polygons.
#37
05/05/2005 (12:17 pm)
Are there any issues that I should be aware of if I use a multi/Sub-object material on my model?

In fact there is. Using Multi/Sub-Object materials on your models can affect the performance of the engine. When you have multiple textures on your model the engine must draw (and keep in memory) and instance of node on the model for each texture that is applied to it. So if you have 2 textures applied to a node and that node is 500 polygons, the engine will actually have to draw 1000 polygons and also keep that data in memory. As such although you can do it, you should be aware of the consequences involved in texturing this way and know that it is highly recommended to use only 1 texture per model

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4878.
#38
05/05/2005 (12:55 pm)
Interesting! You learn something new everyday. :)
#39
05/07/2005 (7:23 pm)
@Sanctus

I agree very much with you. I understood what you ment from your first post. I think it's obvious that a game made from a crumpled up paper ball could be fun. That's obviously not what you ment. I completely agree that Tourque is a foundational tool, and should not be consided an end-all-be-all tool.
#40
04/27/2006 (12:22 pm)
What a great thread, what ever came of this. Becouse this is the SAME system i have written up and am gearing up to start testing.