Multiple skins, change-able ingame?

Posted By: Prooi

Multiple skins, change-able ingame? - 01/13/08 19:50

Hi everyone, I'm new to Gamestudio and started out with the free MED and Lite-C to see what i can do with it, now i bumped on the following problem:

How can someone (if possible) change textures ingame & does the model needs to be "prepared" for it

example:

I have a simple human, textured and all (with multiple textures).

Made a texture for:

1 the hands
2 Sleeves & torso
3 pants
4 boots


Is it possible to change 1 of these textures if certain conditions are met?

like when you equip gloves only the hand texture would change
or when you equip a vest that the sleeves & torso texture would change?

Is this possible? and if so, does anyone know a tutorial?

Thanks for reading
Posted By: Quad

Re: Multiple skins, change-able ingame? - 01/14/08 11:38

i dont know if it works just for a spesific group of model but you can change the skin by

my.skin=2; or something but i think this will change the skin of whole model.

You may try making hands,torso etc. spare models but its harder to bring things together and keep them there. And it doesnt look good.

i wonder this too if its possible to change only a group's skin not the whole model.?

(maybe my.group1.skin ? i dont think so but..)
Posted By: Prooi

Re: Multiple skins, change-able ingame? - 01/14/08 13:56

it certainly would help improve framerate for RPG games, with loads of equipment
Posted By: Nidhogg

Re: Multiple skins, change-able ingame? - 01/14/08 14:41

I think the only way possible would be to create a different full
skin with the change of the clothing you want.
eg: skin0 - would be the original skin
skin1 - would be skin0 with the modification
skin2 - would be skin0 with next modification
and so on and so on until you've got all the skins you need.

In your code you'd have something like

In cscript
Code:
  if (event == switch1) {my.skin = 2;} //Change to skin1



I think that's right but check it anyways...

Good luck


Posted By: Prooi

Re: Multiple skins, change-able ingame? - 01/14/08 15:59

soo if you have
10 different chest pieces
10 different gloves
10 different pants

you need 10x10x10= 1000 different textures, oi!
Posted By: Mare

Re: Multiple skins, change-able ingame? - 01/14/08 16:21

Hmmm.. thats not the right way to do it (I think ) You should make your model naked, and then attach separate models for the chest gloves or pants, as your character collects them in the game. But that leads to another problem:
You would have to animate all the collectable models with all animation frames of your character separately. But i think thats how its done in many games on the market

good luck,
cheers!
Posted By: tindust

Re: Multiple skins, change-able ingame? - 01/14/08 16:31

Mare is right, but you don't have to animate each piece of clothing separately but attach it and have each clothing model follow certain vertices on the player model. Look under "attach" in the manual. Each clothing model can then change its skin individually.

cheers
Posted By: Nidhogg

Re: Multiple skins, change-able ingame? - 01/14/08 17:17

Quote:

soo if you have
10 different chest pieces
10 different gloves
10 different pants

you need 10x10x10= 1000 different textures, oi!




hahahaha I didn't think of that. I was thinking along the lines
of an extra set of each. Maybe this is better answered by someone who has done an RPG or simular. Or even if he can get hold of some code that some kind person has contributed...
Posted By: Prooi

Re: Multiple skins, change-able ingame? - 01/14/08 17:23

i was trying to avoid extra models attachments on the player model to reduce the polygons rendered at the scene and therefor have more models
Posted By: Ready

Re: Multiple skins, change-able ingame? - 01/15/08 10:17

Well its technically the same ammount of polys.
Take your base player model and split it into several objects... then you can change each skin for each model individually.
Never tryed something like this but I'll have to soon ^^
Posted By: Prooi

Re: Multiple skins, change-able ingame? - 01/15/08 13:37

i was told their was something in AUM 40:

pixel_for_bmap and pixel_to_bmap.

ok so you have to make a pretty darn uv skin, and hardcode every pixel for every part. but this way you could do it i think
Posted By: Impaler

Re: Multiple skins, change-able ingame? - 01/19/08 10:13

I am almost certain that is not the way it is done it professional games. I noticed that in morrowind it is very clear (to me) that the head, hair, armour and clothing are seperate objects and it would be possible to use an external modeller(Blender, for example) to give the same bones animation to many different clothes and armour, so they would perfectly fit around the player. As for the changing of type of clothes, face, etc. it is the same model, just with a different texture. It's not easy, certainly, but that is what making an RPG would involve.
Posted By: tompo

Re: Multiple skins, change-able ingame? - 01/19/08 10:46

I think helmet, armour, shoes, weapon etc are different models attached to player's vertex with same animation. So you don't have to change skins just models. Only base looking (naked or skeleton) human still the same. Then you may attach different shaders to different part of armour too
© 2024 lite-C Forums