making multiple skins for one model

making multiple skins for one model

Re: making multiple skins for one model Posted by half-dude on Fri Jun 17th 2005 at 9:07am
half-dude
580 posts
Posted 2005-06-17 9:07am
580 posts 76 snarkmarks Registered: Aug 30th 2003 Occupation: male Location: WH
Ok first off I know I've made lots of enemys here recently so I may not get any responces to this thats ok.

So in y mod Im planning to have alien slaves that have different colored collors. I know already how to make the skin but I dont know how to make sub-skins so I can specify which one I want to use. I know Neil Monke did that with They Hunger, and I think it has something to do with the QC file but the tut doesnt cover HL1.

Can anyone lend a hand?
Yes I spell bad, but remimber Mighty are the stupid.

Check out my drawings at http://half-dude.deviantart.com/
Re: making multiple skins for one model Posted by fishy on Fri Jun 17th 2005 at 12:41pm
fishy
2623 posts
Posted 2005-06-17 12:41pm
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
Re: making multiple skins for one model Posted by Fjorn on Sat Jun 18th 2005 at 2:45am
Fjorn
250 posts
Posted 2005-06-18 2:45am
Fjorn
member
250 posts 25 snarkmarks Registered: Jun 5th 2004 Occupation: Student/Amateur Writer Location: California - USA
I think he is asking about HL1 models, not Source models...
Signature? What signature!?
Re: making multiple skins for one model Posted by fishy on Sat Jun 18th 2005 at 3:25am
fishy
2623 posts
Posted 2005-06-18 3:25am
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
it's the same code that gets added the the .qc file to have multiple skins in hl1 as it is in hl2, with the small difference of the file extension of the texture, which also gets mentioned in the other thread.
i eat paint
Re: making multiple skins for one model Posted by mrod on Fri Jun 24th 2005 at 1:22am
mrod
30 posts
Posted 2005-06-24 1:22am
mrod
member
30 posts 3 snarkmarks Registered: May 30th 2005
why dont you just make a seperate model for each collar color, then
code the fgd to have flags in the entity properties for what model to
use?

(im no coder, so dont ask me how to do that)
Re: making multiple skins for one model Posted by fishy on Sat Jun 25th 2005 at 1:34am
fishy
2623 posts
Posted 2005-06-25 1:34am
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
<DIV class=quote>
<DIV class=quotetitle>? quoting mrod</DIV>
<DIV class=quotetext>why dont you just make a seperate model for each collar color, then code the fgd to have flags in the entity properties for what model to use?</DIV></DIV>

Anyway, as half-dude asked for some clarification, I went and wrote a mini-tut that basically goes over what's already been said, but tries hard not to get too complicated. So.......


Adding extra skin choices to existing Half-Life models is a fairly simple task for anyone with a working version of Milkshape. The first thing to be decided, is what model is to be edited. In this example, I'll use the old islave.mdl, which still lives in my sierra/half-life/valve/models folder.

User posted image

The plan is to make the green chrome bits on its neck and arms available in four colours. I don't want to mess around with my actual game model, so I've put a copy of it in a new folder (slave tut) on my desktop. If you're following this, then I suggest you do the same. I've also had to copy islave01.mdl, islave02.mdl and islavet.mdl, which contain animations and textures. Not all original models use these extra files, but be sure not to miss them when they are there, because the decompile will fail without them.

Decompiling the model in Milkshape is as simple as clicking on Tools>Half-Life>Decompile Normal HL MDL File, and then browsing to the model in the dialogue that pops up. There's an option to choose what's to be decompiled, so select everything; reference, sequences, textures and qc. All are needed if the model is to be compiled again. Milkshape outputs them to the same folder that the model that's being decompiled is in, which is another good reason for doing this away from your game directory, because there can be a LOT of files generated. For the purposes of this tut, we only need to look at two of these files though. The .qc and the green chrome texture.

This model has lots of seperate textures for its various parts, which is quite rare. Most models would have all of the textures crammed onto a single image. Using multiple textures allows each texture to have its own 256colour pallette, allowing a greater overall colour range for the model. But even if the textures for this model had been crammed together, the green chrome texture would still need to be seperate. This is because the chrome effect on Half-Life models is only possible by using a texture with the word chrome somewhere in its name. I want the same chrome effect for the replacement colours, so they need to be named as such.The original green texture file that I want to change turns out to be named Chrome_1.bmp. To keep things simple, I'll name the replacements chrome_2.bmp, chrome_3.bmp and chrome_4.bmp

To make the extra textures, all I done was open chrome_1.bmp in PSP, and used the colourize funtion on copies of it to make these;

User posted image

N.B. All textures used in Half-Life models MUST be 256colour (8bit).bmp files, with sides of a power of 2. (32, 64, 128, 256)

To use these new textures, the .qc file will need some extra commands. Open the .qc file, either with Notepad or some other text editor, and you'll find a list of commands that studiomdl.exe will execute, much the same as a .bat(batch) file lists commands for your map compile tools to execute. If you scroll down to near the bottom, you'll find a line that says //30 sequences. Make a little space above that line and insert the following code;

<DIV class=code>Code:<PRE>

$texturegroup "skins"

{


{ "chrome_1.bmp" }


{ "chrome_2.bmp" }


{ "chrome_3.bmp" }


{ "chrome_4.bmp" }


}

[/pre]

The $texturegroup
[color=white]"skins" command [/color]lets the compiler know that whats coming next is a list of textures to be changed for each skin. Each texture(colour coded in my fine example :razz: ), or groups of textures that are applied to a 'skin' are contained in their own set of curlies, and the whole list gets contained in another set. The first texture referenced must be the texture that the model originally wore.

If I'd wanted the models to have eyes that changed colour with the chrome bits, I could take the eye texture, Eye1.bmp, and make colourized copies of that. If I named the coloured copies as eye2.bmp, eye3.bmp, and eye4.bmp, then what I would add to the .qc would look like this;

$texturegroup "skins"

{

{ "chrome_1.bmp" "eye1.bmp" }

{ "chrome_2.bmp" "eye2.bmp" }

{ "chrome_3.bmp" "eye3.bmp" }

{ "chrome_4.bmp" "eye4.bmp" }

}

There would appear to be only one more thing that needs changed in the .qc file before the model will compile as desired. Near the top there is a line that reads $externaltextures. Delete this line so that the extra textures can be compiled into the model. Save the .qc file, and head back to Milkshape.

Tools>Half-life>Compile QC File

If you've been a good boy and didn't cry on your birthday:P, then you should have a new islave.mdl, islave01.mdl and islave02.mdl. These all need to stay together in the same folder as each other, wherever that may be, but you can safely delete everything else.

User posted image

i eat paint
Re: making multiple skins for one model Posted by half-dude on Sat Jun 25th 2005 at 8:26am
half-dude
580 posts
Posted 2005-06-25 8:26am
580 posts 76 snarkmarks Registered: Aug 30th 2003 Occupation: male Location: WH
OMG Fishy!

You really should make that into a offical tut here on the site, it was a much better explanation then before. Heck!, I didnt even know you had to use Milkshape :razz:

Anyway Thanks alot Fish I owe you :smile: I would like to use these in the mod if you dont mind.
Yes I spell bad, but remimber Mighty are the stupid.

Check out my drawings at http://half-dude.deviantart.com/
Re: making multiple skins for one model Posted by Orpheus on Sat Jun 25th 2005 at 10:19am
Orpheus
13860 posts
Posted 2005-06-25 10:19am
Orpheus
member
13860 posts 2024 snarkmarks Registered: Aug 26th 2001 Occupation: Long Haul Trucking Location: Long Oklahoma - USA
<DIV class=quote>
<DIV class=quotetitle>? quote:</DIV>
<DIV class=quotetext>"Let's say it was Mephs"</DIV></DIV>

THIS should be the Snarkpit motto henceforth. :lol:

The best things in life, aren't things.
Re: making multiple skins for one model Posted by half-dude on Sat Jun 25th 2005 at 10:34pm
half-dude
580 posts
Posted 2005-06-25 10:34pm
580 posts 76 snarkmarks Registered: Aug 30th 2003 Occupation: male Location: WH
Um...... I'm using spirit and it gives you a "skin" Field. I thought that was the way to specify what skin is used. But when I type 1,2,3, or 4 in the field it doesn't work right. what happens is that in game the slave has a green collar when its idle, but when it charges up for its attack it cycles through the different collar colors. Its a very strange thing indeed.

So if anyone can please tell me how to do it right or fix it please fill me in.

P.S I'm not sure if this is the problem but I do have the high def pack, but I removed that pak. would this still effect it??????
Yes I spell bad, but remimber Mighty are the stupid.

Check out my drawings at http://half-dude.deviantart.com/
Re: making multiple skins for one model Posted by fishy on Sun Jun 26th 2005 at 11:54pm
fishy
2623 posts
Posted 2005-06-26 11:54pm
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
i don't know what could be causing this. it works ok in the model viewer, and plays all the animations with the chosen skin. maybe it's something to do with how spirit uses them, i really don't know.

if you get it to work right, or even if you like the freaky colour cycling collars as you have them now, your welcome to use them.

oh, when you select what skin to use in HL, it starts at 0. so the skin choices would be 0, 1, 2 and 3.
i eat paint
Re: making multiple skins for one model Posted by half-dude on Mon Jun 27th 2005 at 5:39am
half-dude
580 posts
Posted 2005-06-27 5:39am
580 posts 76 snarkmarks Registered: Aug 30th 2003 Occupation: male Location: WH
Well thats my question, how would you change the skin without spirit? Spirit and regular HL have different options.?
Yes I spell bad, but remimber Mighty are the stupid.

Check out my drawings at http://half-dude.deviantart.com/
Re: making multiple skins for one model Posted by half-dude on Sun Jul 10th 2005 at 11:16am
half-dude
580 posts
Posted 2005-07-10 11:16am
580 posts 76 snarkmarks Registered: Aug 30th 2003 Occupation: male Location: WH
Fish? Please?
Yes I spell bad, but remimber Mighty are the stupid.

Check out my drawings at http://half-dude.deviantart.com/
Re: making multiple skins for one model Posted by fishy on Sun Jul 10th 2005 at 1:11pm
fishy
2623 posts
Posted 2005-07-10 1:11pm
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
like i said half-dude, i don't know where the problem lies with this. it works fine in the model viewer.
i eat paint
Re: making multiple skins for one model Posted by half-dude on Wed Jul 20th 2005 at 7:53am
half-dude
580 posts
Posted 2005-07-20 7:53am
580 posts 76 snarkmarks Registered: Aug 30th 2003 Occupation: male Location: WH
Sorry Fish, I wanted to know if you could answer my question that I posted a few sections up which is.

"how would you change the skin without spirit? Spirit and regular HL have different options.?"

Im just going with what you say, how it might just not work in spirit.

I dont know if this helps, but I noticed that you name them fslave instead of islave, so I assume that for HL to use it, it has to be named the same name as the origenal. Were these named this for a reason? Could this be the problem?
Yes I spell bad, but remimber Mighty are the stupid.

Check out my drawings at http://half-dude.deviantart.com/
Re: making multiple skins for one model Posted by fishy on Wed Jul 20th 2005 at 1:10pm
fishy
2623 posts
Posted 2005-07-20 1:10pm
fishy
member
2623 posts 1476 snarkmarks Registered: Sep 7th 2003 Location: glasgow
half-dude said:
how would you change the skin without spirit? Spirit and regular HL have different options.?"
i'd look for a "skin" value in the properties of whatever entity i was using, and change the default 0 to either 1, 2 or 3.
i eat paint
Re: making multiple skins for one model Posted by half-dude on Wed Jul 20th 2005 at 7:20pm
half-dude
580 posts
Posted 2005-07-20 7:20pm
580 posts 76 snarkmarks Registered: Aug 30th 2003 Occupation: male Location: WH
yea thats the wierd thing, there is no "skin" value in regular HL editer. Makes you wonder huh?
Yes I spell bad, but remimber Mighty are the stupid.

Check out my drawings at http://half-dude.deviantart.com/
Re: making multiple skins for one model Posted by Myrk- on Wed Jul 20th 2005 at 7:31pm
Myrk-
2299 posts
Posted 2005-07-20 7:31pm
Myrk-
member
2299 posts 604 snarkmarks Registered: Feb 12th 2002 Occupation: CAD & Graphics Technician Location: Plymouth, UK
You use submodels I believe for seperate skins. But I'm sure there is a skin field, or model number or something. Experiment :razz:
-[Better to be Honest than Kind]-