Game Development Community

Skinning Question

by Ronald J Nelson · in Torque Game Engine · 11/03/2005 (12:11 am) · 14 replies

Even though there has been other posts on how to reskin a model, I know there have been a lot of changes in 1.4 so I am asking.


All I want is the ability to apply a different skin to a model at a selection screen much like was done in Nitro. What sort of command would I need to accomplish this?

#1
11/04/2005 (9:42 am)
I don't know an answer off the top of my head, but just for clarity's sake I wanted to point out that what you are asking about is switching textures, not skins. "Skinning" is more accurately used to describe the process of putting a mesh under the influence of a skeleton.

Just, you know, FYO. :)
#2
11/04/2005 (10:58 am)
Might be more accurate to say 'Switching Skins'? I am only taking this from the selection screen on Tribes 2... I always considered a skin to be every texture for an object packed into one texture file.
#3
11/04/2005 (11:38 am)
Semantics sheesh. Ok switching textures then, how please?
#4
11/06/2005 (8:42 am)
All I want to know is how can you choose what texture is assigned to an object from the scripts?

I can't see how this would be done normally since most objects have the texture assigned to them when they are created.
#5
11/09/2005 (6:49 am)
Ok I needed to add onto this question. Has anyone been successful in making a system where a player's custom vehicle texture(skin) is visible to others in a multiplayer game?
#6
11/09/2005 (8:31 am)
While I haven't seen this in action yet I know there is a resource for swaping out the textures on an object. Just do a search for that. I know the team that just put out the Krabbits World demo have a 'paper doll' effect in their GUI where you can customize the clothing textures on the player models. You could contact them for advice on 'how to'. Their dev shot is still on display.
#7
11/09/2005 (8:38 am)
You use the nomenclature of the texture files to enable them to be switched out. export the model using "base.****" as the texture name, where **** is the name of the object or some identifier. Then make your alternate textures different names of the same thing, like "jungle.****", "snow.****" etc. Then there is a command in Torquescript that changes the textures. I can't remember the command though. The Soldier Pack has a script with a little gui for doing this from within the mission editor.
#8
11/27/2005 (1:40 am)
Thanks I got all of this to work and then some.
#9
11/27/2005 (4:56 am)
What's your solution? Can you post what you did?
#10
11/27/2005 (6:39 am)
Same, I've gotten a fully functional model selection screen, (so you can have say, 7 of the same style models but each with a different texture to make for the appearance of changing color) but a texture changing one would come in handy as well.
#11
11/27/2005 (9:09 am)
Sorry to hijack the Thread, but it seems relevent:

Does this setSkinName() work if the shape in question has mulitple textures on the shape and not just a single texture, for example; a face, torso, legs separate textures? I haven't worked a shape up yet to try this. I am in the process of setting up a player shape in Milkshape to demonstrate this technique, albeit with a single base.texture[to simulate Team play], but with 3 other colors besides the base.

Right now I have base.player.png, red.player.png, green.player.png, & gold.player.png; this I feel will work very well. Now, for a Multi Textured shape, would it be something like this:
base.face.player.png
base.torso.player.png
base.legs.player.png

red.face.player.png
red.torso.player.png
red.legs.player.png

green.face.player.png
green.torso.player.png
green.legs.player.png

gold.face.player.png
gold.torso.player.png
gold.legs.player.png
Thanks!
#12
11/27/2005 (11:12 am)
Make sure you do the scripting listed here.

www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4051

If you want to make it interchangeable You will have to set up a system to select it. If you want to make it visible in a multiplayer game there is a bit more to do.

For me, I made the skin a player specific thing and sent it as a connection argument. Its not as easy as that sounds, but that is the basic way you do it.

If you want custom player created skins for all to see in a multiplayer game, good luck there. I did it, it is possible.
#13
11/27/2005 (11:48 am)
SetSkinName() is by default a networkable command. i.e it gets ghosted to all clients if called by the server. So to expand, its a server command which when issued, will affect all clients. So you don't require any 'good luck' or other complications to make it work in multiplay, it already does.

@Rex, yes it works with multiple textures on a single object. Calling %obj.setSkinName('red'); will change all textures in that object that have the base.xxxx naming convention.
#14
11/27/2005 (2:47 pm)
However, if you want to only effect an individual, the method I stated would be necessary. Duncan is right in his method too, especially if you want to set up some sort of team based skin.