How do you add a skin to an existing model? What I am trying to do is have an alternate skin for the explosive barrel. I have already made the skin, converted it to vtf, created the vmt.... but how do I refer to it in Hammer? Looking at the Valve wiki, it says I have to edit to .qc file, which I think is an uncompiled model work file. If this is so, is it not possible to add a skin to an already compiled model?
the model in question is the oildrum001_explosive.mdl found in the props_city17 folder. I would just re-skin the texture and have it on top of the older texture, if I just straight up wanted to replace it, but I want to use both textures in-game. I opened up oildrum001.mdl (an oil drum with 7 alternate skins) in a text editor, and saw where it specified all the other textures. I tried opening up oildrum001_explosive.mdl in the text editor and manually typing in the name of the other texture, but that obviously didn't work.
Do I need a modeling program? Is there an editor where I can just edit the line where I add another model to the skin list?
1
Re: Adding skins to existing models
Posted by Dark Tree on Mon Nov 10th at 5:23am 2008

Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA
Occupation: DigiPen student
Posted by Dark Tree on Mon Nov 10th at 5:23am 2008
Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA

Occupation: DigiPen student
Re: Adding skins to existing models
Posted by Le Chief on Tue Nov 11th at 8:10am 2008
Posted by Le Chief on Tue Nov 11th at 8:10am 2008
Hehe, I actually don't remember anymore but I do remember me explaining how its done to Muhnay, after some searching (search feature is broke) I found it!
1) Download this (MDLDecompiler).
2) Decompile the model.
3) Open up the QC file.
4) add this (vending machine example):
$texturegroup skinfamilies
{
{ "SodaMachine01a.vmt" }
{ "SodaMachine01b.vmt" }
{ "SodaMachine01c.vmt" }
{ "SodaMachine01d.vmt" }
}
under this:
$cdmaterials "modelsprops_interiors/"
5) Modify what you just pasted to suit your needs, and don't modify the names, they need to be named like that.
6) Skins go in here: "materials/models/props_interiors", in the case of the vending machine.
7) Recompile with this (StudioCompiler).
Perhaps I ought to make a quick tutorial on this and add it to my website! Anyway, let me know how this goes for you.
1) Download this (MDLDecompiler).
2) Decompile the model.
3) Open up the QC file.
4) add this (vending machine example):
Quote
$texturegroup skinfamilies
{
{ "SodaMachine01a.vmt" }
{ "SodaMachine01b.vmt" }
{ "SodaMachine01c.vmt" }
{ "SodaMachine01d.vmt" }
}
under this:
Quote
$cdmaterials "modelsprops_interiors/"
5) Modify what you just pasted to suit your needs, and don't modify the names, they need to be named like that.
6) Skins go in here: "materials/models/props_interiors", in the case of the vending machine.
7) Recompile with this (StudioCompiler).
Perhaps I ought to make a quick tutorial on this and add it to my website! Anyway, let me know how this goes for you.
Re: Adding skins to existing models
Posted by Dark Tree on Tue Nov 11th at 10:35am 2008

Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA
Occupation: DigiPen student
Posted by Dark Tree on Tue Nov 11th at 10:35am 2008
thank you!! But I need some serious help. for starters... your link is broken. The homepage is down. If you google for it, Google's link and cache do not work. I did find this link though, that DOES work HERE. I found it by clicking "Check for new version" on the StudioCompiler.exe file I found by searching Google for the filename.
ANYWAY... to get any of this working, I had to modify all 11 of my GameInfo.txt files, which I will have to change back when I am done with this nonsense. Then, I finally decompiled the .mdl file. I now have all of the extracted model files with the vital .qc file I needed. By the way StudioCompiler now INCLUDES MDLCompiler in the same program... no need for both programs.... only StudioCompiler.
So I have the extracted files, a vague idea of what to edit in the QC file, and a compiler with too man options I don't understand.... I can't figure out how to re-compile the files... do I need to have them in a specific folder? what buttons do I press in the program... do I do a full compile.... or do I use the compile option that says I already have the .QC file. I tried compiling it (with the Compile w/ Existing QC method), and here is the compile log:
-----------------------------
SMD MODEL C:UsersWadeDesktopoil/oildrum001_explosive_reference.smd
SMD MODEL C:UsersWadeDesktopoil/lod1_oildrum001_explosive_reference.smd
SMD MODEL C:UsersWadeDesktopoil/idle.smd
ERROR: Aborted Processing on 'props_c17oildrum001_explosive.mdl'
StudioMDL Thread complete
-----------------------------
I tried moving the files into different locations and such and trying to make it al work, but no dice.... I definatly need a tutorial on how to recompile with an edited .QC file so I can add the extra skin to the hammer list... Thank you lots and lots for looking into this Aaron!!
ANYWAY... to get any of this working, I had to modify all 11 of my GameInfo.txt files, which I will have to change back when I am done with this nonsense. Then, I finally decompiled the .mdl file. I now have all of the extracted model files with the vital .qc file I needed. By the way StudioCompiler now INCLUDES MDLCompiler in the same program... no need for both programs.... only StudioCompiler.
So I have the extracted files, a vague idea of what to edit in the QC file, and a compiler with too man options I don't understand.... I can't figure out how to re-compile the files... do I need to have them in a specific folder? what buttons do I press in the program... do I do a full compile.... or do I use the compile option that says I already have the .QC file. I tried compiling it (with the Compile w/ Existing QC method), and here is the compile log:
-----------------------------
SMD MODEL C:UsersWadeDesktopoil/oildrum001_explosive_reference.smd
SMD MODEL C:UsersWadeDesktopoil/lod1_oildrum001_explosive_reference.smd
SMD MODEL C:UsersWadeDesktopoil/idle.smd
ERROR: Aborted Processing on 'props_c17oildrum001_explosive.mdl'
StudioMDL Thread complete
-----------------------------
I tried moving the files into different locations and such and trying to make it al work, but no dice.... I definatly need a tutorial on how to recompile with an edited .QC file so I can add the extra skin to the hammer list... Thank you lots and lots for looking into this Aaron!!
Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA

Occupation: DigiPen student
Re: Adding skins to existing models
Posted by Le Chief on Fri Nov 14th at 4:15am 2008
Posted by Le Chief on Fri Nov 14th at 4:15am 2008
All you have to do is keep everything in the same directory, don't delete or move anything, just edit the qc file in its spot. Also make sure you have the additional material files (vtf/vmt) in the correct directories.
Once you do that, enter all the details and hit compile.
If that fails to work, there is most likely an error in the qc file.
Once you do that, enter all the details and hit compile.
If that fails to work, there is most likely an error in the qc file.
Re: Adding skins to existing models
Posted by Dark Tree on Sun Nov 16th at 12:19pm 2008

Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA
Occupation: DigiPen student
Posted by Dark Tree on Sun Nov 16th at 12:19pm 2008
NIGHTMARE: OVER.I freaking FINALLY made a breakthrough. It is 4 AM. This is the third night in a row working about 2 to 3 hours a night trying to make this work. Between editing gameinfo text files, crashing windows, crashing compilers, not having the setups correct, editing dozens of SMD files in Notepad and compiling/decomiling adnausium with various levels of success seemingly random... we have a small success.
Folks, we have liftoff with dual texturing. While I havent gotten it to ADD a texture to an existing model... I HAVE recompiled an existing model into an entirely new identical model... with a different texture... got it workin in Hammer and steam and all. It isn't as officiant as simply having another skin, but it will definitely do, and I am only losing about 75KB filesize in the process... which isn't too shabby, considering Valve makes me double the sound filesizes to fade stuff in and out :/ .
I'm sure with some more work I can widdle down exactly how to add another skin to an existing model, but for now, God has shined down and let me rest easy tonight on this. I think I would have went insane if I didn't get it sooner or later. About broke my laptop earlier tonight.... so I took a break... watched a movie.... had some Mickey D's, and went back to it to get it done. If I only put this kind of effort into my homework I am stalling to do until tomorrow
(Sunday).
While I largely figure out how to do this on my own, I wouldn't be anywhere without a helpful community. Aaron, you gave me enough crucial pointers to get me going in the right direction to solving this 'multiple skins for models' problem. Big thank you. Your help will not go unforgotten. (thank you section in the credits, anyone?)
Folks, we have liftoff with dual texturing. While I havent gotten it to ADD a texture to an existing model... I HAVE recompiled an existing model into an entirely new identical model... with a different texture... got it workin in Hammer and steam and all. It isn't as officiant as simply having another skin, but it will definitely do, and I am only losing about 75KB filesize in the process... which isn't too shabby, considering Valve makes me double the sound filesizes to fade stuff in and out :/ .
I'm sure with some more work I can widdle down exactly how to add another skin to an existing model, but for now, God has shined down and let me rest easy tonight on this. I think I would have went insane if I didn't get it sooner or later. About broke my laptop earlier tonight.... so I took a break... watched a movie.... had some Mickey D's, and went back to it to get it done. If I only put this kind of effort into my homework I am stalling to do until tomorrow
(Sunday).
While I largely figure out how to do this on my own, I wouldn't be anywhere without a helpful community. Aaron, you gave me enough crucial pointers to get me going in the right direction to solving this 'multiple skins for models' problem. Big thank you. Your help will not go unforgotten. (thank you section in the credits, anyone?)
Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA

Occupation: DigiPen student
Re: Adding skins to existing models
Posted by haymaker on Sun Nov 16th at 5:19pm 2008
Posted by haymaker on Sun Nov 16th at 5:19pm 2008
I'm glad you've had some success, the whole source model structure seems unnecessarily complicated at first. If you refine your methods to finality I for one would like to see a tut on snarkpit. I have been fooling around with decompiling/scaling/recompiling with some success, but even that seems to take a lot of tedious steps.
Maybe someday somebody will come up with a front-end program where all you do is fill in the blanks, sure would speed things up. It's not a big hassle editing qc's but sure is easy to make mistakes. With regards to recompiling I have been using GUI StudioMDL, have no idea if it's faster that Cannonfodders but fully functional
http://www.wunderboy.org/apps/guistudiomdl2.php
Maybe someday somebody will come up with a front-end program where all you do is fill in the blanks, sure would speed things up. It's not a big hassle editing qc's but sure is easy to make mistakes. With regards to recompiling I have been using GUI StudioMDL, have no idea if it's faster that Cannonfodders but fully functional
http://www.wunderboy.org/apps/guistudiomdl2.php
Re: Adding skins to existing models
Posted by Le Chief on Mon Nov 17th at 3:35am 2008
Posted by Le Chief on Mon Nov 17th at 3:35am 2008
Email me the QC file for the model you want to add the skins to, along with the skins and I'll email or post here for learning purposes the edited QC and where to stick the skins and such.
I'm writing that tutorial asap!
I'm writing that tutorial asap!
Re: Adding skins to existing models
Posted by Dark Tree on Mon Nov 17th at 8:14am 2008

Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA
Occupation: DigiPen student
Posted by Dark Tree on Mon Nov 17th at 8:14am 2008
Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA

Occupation: DigiPen student
Re: Adding skins to existing models
Posted by Le Chief on Wed Nov 19th at 1:07am 2008
Posted by Le Chief on Wed Nov 19th at 1:07am 2008
Alright Dark Tree, I wrote the tutorial. You can find it on my website here. I'll submit it to Snarkpit shortly.
Follow the steps in the tutorial and see if you still get the same error!
Follow the steps in the tutorial and see if you still get the same error!
Re: Adding skins to existing models
Posted by Dark Tree on Thu Nov 20th at 7:08am 2008

Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA
Occupation: DigiPen student
Posted by Dark Tree on Thu Nov 20th at 7:08am 2008
I will Aaron. I'll try it when I get a chance and let u know!
Dark Tree
member
646 posts
144 snarkmarks
Registered: Apr 30th 2004
Location: USA

Occupation: DigiPen student
Re: Adding skins to existing models
Posted by G4MER on Thu Nov 20th at 4:39pm 2008
Posted by G4MER on Thu Nov 20th at 4:39pm 2008
Aaron nice tut man.. I also like your site!
Re: Adding skins to existing models
Posted by fishy on Thu Nov 20th at 5:19pm 2008
Posted by fishy on Thu Nov 20th at 5:19pm 2008
The output directory and the model name should be edited so as not to clash or overwrite the original.
Both are cited in the $modelname line of the qc file, so in this case I'd use something like;
$modelname props_fishy/fish_soda.mdl
This will place the model, named fish_soda.mdl, in the models/props_fishy folder. You neeed to create any custom folders before compiling the model, or the compile will fail.
Both are cited in the $modelname line of the qc file, so in this case I'd use something like;
$modelname props_fishy/fish_soda.mdl
This will place the model, named fish_soda.mdl, in the models/props_fishy folder. You neeed to create any custom folders before compiling the model, or the compile will fail.
Re: Adding skins to existing models
Posted by Le Chief on Fri Nov 21st at 4:19am 2008
Posted by Le Chief on Fri Nov 21st at 4:19am 2008
Thanks Muhnay.
Fishy, thats a good point, I might edit my tutorial and add a little something about what you have mentioned :dodgy:. However, there shouldn't be any collisions. All content such as textures, sounds and models inside gcf files are given a low priority. That means that if there is a model in say the Half-Life 2 folder with the same name as one in a gcf file, the one in the folder will be used over the one in the gcf.
Fishy, thats a good point, I might edit my tutorial and add a little something about what you have mentioned :dodgy:. However, there shouldn't be any collisions. All content such as textures, sounds and models inside gcf files are given a low priority. That means that if there is a model in say the Half-Life 2 folder with the same name as one in a gcf file, the one in the folder will be used over the one in the gcf.
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.0838 seconds.

Snarkpit v6.1.0 created this page in 0.0838 seconds.



