Porting To Souce
This is a "I think this is how to" post on porting UR OWN models to source, this will not produce a ragdoll, however in the links below are instructions on how to do that. I also assume u know what the soucesdk and gmod are and u have both installed.
here is what I think I did, its a rush job so mind spelling grammer etc. I would recomend reading these pages first.
<a href='http://www.valve-erc.com/srcsdk/models/modeling_porting.htm' target='_blank'>http://www.valve-erc.com/srcsdk/models/modeling_porting.htm</a>
<a href='http://www.valve-erc.com/srcsdk/models/modeling_physics.htm' target='_blank'>http://www.valve-erc.com/srcsdk/models/modeling_physics.htm</a>
if you come across any errors please post them here and I will correct them.
1.Mmove the .mdl file you want to port to C:\..\SteamApps\SourceMods\garrysmod\materialsrc also create a models folder and a materials folder if you dont have them already.
2. Open milkshape and on the menu bar go tool/halflife/decompile normal hl mdl. This will turn your model into a series of .smd files a .qc file and a bmp for the texture.
3. Next open explorer go tools/folder options and click the file types tab. Scroll down till you see TGA file click advanced then beside the actions box click new. in the action box type TGA to VTF. in the aplication used to perform action box browse to you sourcesdk/bin folder and click on the vtex icon. Click the use DDE box then under aplication type vtex and under topic type system. Click ok ok ok.
4.Open the .bmp file that was decompiled by milkshape with photoshop and save it again as a .TGA
5. Right click on my computer go properties go to the advanced tab then click the enviroment variables tab down the bottom below user veriables click new and add the variable VPROJECT with the location C:\..\steam\SteamApps\SourceMods\garrysmod
6. Right click on the .TGA you created and go TGA to VTF. This should create a .VTF file in the materials folder you created earlier
7. Find the vtex exe in you sourcesdk/bin folder and create a shortcut to your desktop. Right click go properties in the target box add "-mkdir -shader vertexlitgeneric" (without quotes) to the end of the line.
8. Now drag and drop the .TGA onto this shortcut it should create a .VMT file in the same location and the .VTF
9.Copy and paste your .vmt and .vtf into a folder named player inside the materials folder. Then open the .vmt file in notepad and edit the pointer to say "player/'name of .vtf'"
10. If you want to test if your vtf and vmts are working copy them into the hl2 materials folder and try to view them with the hammer editor. If the texture name comes up but its pink and black you .vmt file is pointing to the wrong location.
11. In the materialsrc folder open the .qc with notepad. Edit the fitst few lines to look like this
the $cd and $cdtexture lines were deleted if you had them.
$modelname "'name of model'"
$cdmaterials "player"
$cliptotextures
$collisionmodel "phys" {
$concave
$mass 30
}
dont edit the rest of the file, remember to save
12. Go back to milkshape and import the referance .smd for the model and make sure its all one smoothing group, then export it again as "phys.smd" to the materialsrc folder
13. Right click on the .qc file and go properties change the file to open with studiomdl located in the sourcesdk\bin folder.
14. double click on the qc file it should open a cmd window and and run through some text. If it just closes it means there is a problem with your .qc file. The models should be outputted to you gmod models folder.
here is what I think I did, its a rush job so mind spelling grammer etc. I would recomend reading these pages first.
<a href='http://www.valve-erc.com/srcsdk/models/modeling_porting.htm' target='_blank'>http://www.valve-erc.com/srcsdk/models/modeling_porting.htm</a>
<a href='http://www.valve-erc.com/srcsdk/models/modeling_physics.htm' target='_blank'>http://www.valve-erc.com/srcsdk/models/modeling_physics.htm</a>
if you come across any errors please post them here and I will correct them.
1.Mmove the .mdl file you want to port to C:\..\SteamApps\SourceMods\garrysmod\materialsrc also create a models folder and a materials folder if you dont have them already.
2. Open milkshape and on the menu bar go tool/halflife/decompile normal hl mdl. This will turn your model into a series of .smd files a .qc file and a bmp for the texture.
3. Next open explorer go tools/folder options and click the file types tab. Scroll down till you see TGA file click advanced then beside the actions box click new. in the action box type TGA to VTF. in the aplication used to perform action box browse to you sourcesdk/bin folder and click on the vtex icon. Click the use DDE box then under aplication type vtex and under topic type system. Click ok ok ok.
4.Open the .bmp file that was decompiled by milkshape with photoshop and save it again as a .TGA
5. Right click on my computer go properties go to the advanced tab then click the enviroment variables tab down the bottom below user veriables click new and add the variable VPROJECT with the location C:\..\steam\SteamApps\SourceMods\garrysmod
6. Right click on the .TGA you created and go TGA to VTF. This should create a .VTF file in the materials folder you created earlier
7. Find the vtex exe in you sourcesdk/bin folder and create a shortcut to your desktop. Right click go properties in the target box add "-mkdir -shader vertexlitgeneric" (without quotes) to the end of the line.
8. Now drag and drop the .TGA onto this shortcut it should create a .VMT file in the same location and the .VTF
9.Copy and paste your .vmt and .vtf into a folder named player inside the materials folder. Then open the .vmt file in notepad and edit the pointer to say "player/'name of .vtf'"
10. If you want to test if your vtf and vmts are working copy them into the hl2 materials folder and try to view them with the hammer editor. If the texture name comes up but its pink and black you .vmt file is pointing to the wrong location.
11. In the materialsrc folder open the .qc with notepad. Edit the fitst few lines to look like this
the $cd and $cdtexture lines were deleted if you had them.
$modelname "'name of model'"
$cdmaterials "player"
$cliptotextures
$collisionmodel "phys" {
$concave
$mass 30
}
dont edit the rest of the file, remember to save
12. Go back to milkshape and import the referance .smd for the model and make sure its all one smoothing group, then export it again as "phys.smd" to the materialsrc folder
13. Right click on the .qc file and go properties change the file to open with studiomdl located in the sourcesdk\bin folder.
14. double click on the qc file it should open a cmd window and and run through some text. If it just closes it means there is a problem with your .qc file. The models should be outputted to you gmod models folder.
Comments
that could be fun to test. But shouldn't this be in off-topic?
Thus, this isn't related to NS enough to stay in General Discussion, so I'm moving it to off-topic.
should they be given nice sourcey textures first? *retextures onos with nice HL2 brick wall skin and converts*