How do I swapp clothing and gear on a model?

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
DragonSnail
Kobold
Posts: 27
Joined: Sat Jun 10, 2006 4:12 pm
Contact:

How do I swapp clothing and gear on a model?

Post by DragonSnail »

Is anyone here familiar with making gaming characters and textures, and how to swap different
sets of gear and clothing on a model? How, exactly, is this done?

I know that you can simply swap textures on a model for different clothing, like they do in WoW,
but if I want, say, the green shirt to have white sleaves instead of the green ones- do you make a
seem on the arm of the model and swap only the arm texture? Wont that create a pretty akward look?
How do I make the seem NOT look like a seem, but simply a green shirt with white sleaves? Any way
I texture it, I get the feeling it will come out pretty odd-looking...

Also, I have read somewhere that two 512 textures is faster to load that one 1024 texture. Is this
true? And if so, should I then cut up the whole character model in different parts (sounds awfully
bloody...) to have a small texture file for the arm, another small texture file for the leg,
the hands, feet, chest, head etc, instead of making a texture file with all the body parts
on? I know I will most likely have to do it this way with the face, since the models Im working on
will have a few different sets to chose from, and logically, it should be cheaper to swap a small face
texture than the whole body texture. I assume this is the way its done for hair as well.

I appologize if this thread sounds noobish, I am one, and I make no secret of it. I will also
post this on the blender boards, since it may very well be questions that rather concerns
modeling than game engine matters, but I felt it was good to cover both bases. Thanks in advance
for any help you can give me! :)
Bloodypriest
Goblin
Posts: 223
Joined: Thu Aug 18, 2005 2:54 pm

Post by Bloodypriest »

Yes, two 512 textures are faster to load than one 1024 texture. Because :

512*512*2 = 524288.
1024*1024 = 1048576.

One solution to your problem is, like you described, using submeshes and changing only the texture of these submeshes. As for the weird seams, it depends on how you've created your textures.

Another solution would be to create a texture for every possible combination but beware of combinatorial explosion. Not a good solution if you ask me.

And while we're on the subject of clothing and assuming you have CPU+GPU cycles to burn, you could separate your clothes meshes from your character mesh and physically simulate the interaction of the clothes with your character's body. But you burn additional CPU cycles due to the physics simulation and additional GPU cycles due to the extra meshes. The advantage : you get more realistic clothing.
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

Post by Mikachu »

If you need to use a lot of submeshes, and that you don't switch clothes so often (I doubt you do the switch each frame), then you maybe should consider using StaticGemetry to get everything together (not sure staticgeometry supports skeleton, however, have to check).
And no, you should not load a lot of small textures, because you will need a lot of batches, which absolutely kills framerate. The best way would be to have a unique material, whith a big texture atlas (then you could change dynamically some parts of that big texture).
OgreProcedural - Procedural Geometry for Ogre3D
Post Reply