Game Design Music and Art

Interchangable Body Parts – Mene-Mene

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
I've seen many games in which you can customize your character, so I know its possible. But how does it work?

------------------
MM out-

Lava
Member

Posts: 1905
From:
Registered: 01-26-2005
I think they either have different models, stretch the vertices or they are animated and somehow they make the character stay with that animated state.

------------------

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Are you talking about 2d or 3d?

I did a short writeup recently about how it works for isometric games. You can find that one right here.

As far as how it works with 3d games, I've never done it myself.

--clint

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
I have seen your Isometric write up HanClinto, I'm talking about 2d, BB to be exact. Didn't your Isometric require models?

------------------
MM out-

Faith_Warrior

Member

Posts: 490
From: So.Cal.
Registered: 09-05-2006
Few ways to do it. I'm using at least two methods for my mmog project. For the player models the textures are swappable. So I have six choices for a face texture and six for the body for each character model. For my hair (all my characters are default bald) they get gubbins. Basically the hair is a separate model (gubbin) that attaches to the bone structure in the head (pre-defined). Same goes for armor, weapons or what not, these are models that are attached to the character. Also you can swap out body meshes for new ones, so a character can use a kilt and then swap it out for another mesh that pants fit for when they activate the particular inventory icon that shows that style of pants(or by other methods). So basically how it works is that each item has an ID number, all of them do. So if I go to my database structure it has a player character with a string of ID data that the character is using. It's just a matter of reassigning the ID numbers for each particular position.

I guess different engines handle it differently though, this is using BlitzBasic. I've been looking into torque but it's much different and far more complicated/limited to make/use character models.


oh this is for 3D though, you didn't specify, oh well...

[This message has been edited by Faith_Warrior (edited November 03, 2006).]

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Hey Mene-Mene,

Well, my writeup was about both parts (modeling and 2d games). You're right -- mostly it was about how to set up Blender to export the needed graphics. But those graphics are all exported to 2d now, and I can use them in a 2d game engine.

Basically, you just have to make multiple passes to draw your sprites, where you draw each of the customizable parts individually in layers.

So you don't need to have your graphics coming from a 3d renderer like in my isometric example -- I was just giving one example. But the principle of combining the graphics is still the same.

--clint

Faith_Warrior

Member

Posts: 490
From: So.Cal.
Registered: 09-05-2006
That's all just animated in transparent layers, right? I recall a long time ago having a conversation with one of the Ultima Online art staffers that it was all layered and that each cell had to be independently animated which took much more time than simply using a 3D rendering engine/model like what they eventually switched to.
HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
Yeah, that's the way I did it. It's just different animated sprites that are overlayed on top of each other with transparency.
dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
clint - do you set your images up so that the colour value of that image can be set in code? So that you could have any 'base' colour you wish, by setting it in code, rather then requiring a new image for say changing the colour of the hair from red to blue, you could just have that changed in code (setting the colour of the hair).

A similar method is used for basic particle systems, so that you have a white particle base texture, and then can change that colour so that you can have say fire, water, etc, by just changing the texture colour...

------------------
www.auran.com

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
quote:
Originally posted by dartsman:
clint - do you set your images up so that the colour value of that image can be set in code? So that you could have any 'base' colour you wish, by setting it in code, rather then requiring a new image for say changing the colour of the hair from red to blue, you could just have that changed in code (setting the colour of the hair).

I do have it set up so that I can make those kinds of sprites without too much trouble, but on-the-fly tinting like that is really up to the game engine. Since I was trying to work with browser-based javascript, there's not many reasonable ways to achieve what you've described (there are a few, but they're all fairly involved).

But yeah -- that's totally a great way to do it if your game engine supports it.

dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
oh right, yeah I was thinking from a more opengl/directx view. As with directx you can set the colour (tint) easily of a sprite/texture. I have no idea when it comes to Javascript... lol

------------------
www.auran.com