Hey all, this is a problem I have looked into far and wide and yet I still have no real answer to this question. I'll explain the deal.
So I've been trying to port a model from a particular GoldSrc Mod that you all surely know of, They Hunger. Instead of porting a model just from the vanilla game itself, i'm trying to port a remodelled bullsquid from the Ultra Definition Pack ( https://www.moddb.com/mods/they-hunger/addons/they-hunger-ultra-definition-pack ) .
I've been trying to use Crowbar in order to unpackage the materials and model and I know how to convert the materials to '.vtf', but I'm lost on what to do next regarding the porting and the model. The actual model itself is also scaled up alot and I'm not sure if this will transition through to GMOD. I also want to put this model into an addon by itself but I've also got no clue.
After looking at various tutorials and websites explaining how to do this, it should be an "easy" and "fast" process, but I find that hard to beleive. Note that I'm also new to most of this, keep that in mind when you slam jam me for asking this. Please walk me through this whole process, tell me if I missed out on anything that I can hopefully disclose, thanks.
Download Jed's Half-Life Model Viewer, it allows you to select a model, decompile it directly and it'll generate an .smd file (or as many as needed) and a .qc file you can use to recompile it to either GoldSrc or Source, although you may have to modify the .qc a bit to get it working on Source.
https://files.facepunch.com/forum/upload/1823/83fd3050-7db8-41eb-9071-3a1053d2b38c/2018-07-04_11-52-19.png
I remember not having any modelling experience and being able to compile Cry of Fear models into Source myself, although I had to hug the Valve Dev Wiki for .qc parameters to get it to work.
What in particular do I have to change, or will I find that out myself in the file? Also thanks for the response, so far, you're the only person who's shed light on this for me.
.smd files are basically the decompiled mesh files used for (Gold)Source games, which you can open using a modelling software (albeit you have to use a plugin) like Blender or 3DSMax.
.qc files are basically compiling instructions for when mdlstudio.exe compiles the model. Usually you might want to fiddle with the materials so they work in source and the ragdoll constrains (since GoldSrc doesn't use ragdolls, if you compile the model into Source then they'll usually look like fleshy statues.)
You can download mdldec.exe in the same site I gave you, under the name "Command line MDL decompiler (v1.2)".
Downloaded the .exe and nothing changed. Do I need to set anything anywhere or do I just run the .mdl file through it like gmad.exe?
On Jed's HLMV, you need to tell the program where are they on "Configure Tools...".
https://files.facepunch.com/forum/upload/1823/6ee0063c-5d7c-49f7-8d3b-40c8c65da57d/image.png
studiomdl.exe will be on "[wherever you have steam]\steamapps\common\GarrysMod\bin\studiomdl.exe" and mdldec.exe will be wherever you uncompressed the .zip file.
Decompiled the model and got a bunch of .smd's, one main one and the animations and a .qc, I'm assuming the animations .smd's play no part in this process.
I opened the .qc file for the headcrab and saw the hitboxes and animations, do I need to remove these? And since I wan't to make this into a ragdoll for GMOD, do I add anything in for that?
You don't necessarily need to remove the hitboxes and animations, maybe somebody else will find them useful after you release that model port of yours by making an NPC out of it, for example.
Like I said before, you want to add $collisionjoints on your model's .qc file (please do check the link I posted as it gives you below on the page an example on how to do it and what to add on your .qc file. Read also $jointconstraint's page on the Valve Dev Wiki). The documentation has everything you should know about this so please read clearly! If you don't add $collisionjoints, then as I've said before, it'll just look like a fleshy statue and its bones won't turn at all.
You'll likely have to compile the model multiple times in order to get it just right. First of all, make sure that, after compiling it on Source, that the materials and textures work correctly, then try to work on the bones afterwards by adding the aforementioned parameters on your .qc file and recompiling.
Ok, hypothetically speaking, when I add in the $collisionjoints, I can use the HL:S Bullsquid's $collisionjoints due to the model being exactly the same ( -some tail bones ) ?
I was supposedly subscribed to this thread but it never gave me a notification for your latest post, my bad. I guess you already figured it out but I'll answer anyways.
I guess you could if the models are very very very similar skeleton-, collision- and model-wise (I don't actually know how either of the models look), but it's best if you do them from scratch, you'll end up learning a lot more that way and you'll have a better understanding and control on how everything works imo. Either way, there's no guarantee it'll straight-up work if you do it that way, but try reusing them anyways and see if they work.
Just for clarification.
https://vignette.wikia.nocookie.net/annex/images/5/5e/HalfLife_Bullsquid.jpg/revision/latest?cb=20080304011017
Half-Life: Source Bullsquid
https://vignette.wikia.nocookie.net/slenderfortress/images/4/44/Flesh_Squid.jpg/revision/latest?cb=20170115105943
They Hunger Flesh Squid
Both of the models have a very chicken / theropod frame and they both use the same animations and skeletons, just a different model and materials. Also, the image for the Flesh Squid wasn't made by me and was made for the 'Slender Fortress' gamemode. Quick question, if the model has already been ported to Source, can't I just decompile via Crowbar or something? However I'm fairly certain this may not work as the .mdl file has info baked into it for that gamemode.
The Flesh Squid in action in 'Slender Fortress'.
https://www.youtube.com/watch?v=1iJVmKtfVK8
The only purpose decompiling would do in that case would be to change model and material paths if appropiate. You could, in Gmod, already access that model in TF2's download/ folder. Is that what you want to do?
And Slender Fortress is a SourceMod gamemode so there's nothing really baked into that model for it to work other than logic.
You mean ingame? If so, this could eliminate the whole need for this thread.
Could you potentially upload a screenshot of this folder ingame?
Sorry, just tried to check and Gmod doesn't look into tf's download folder, but you can go to your TF2 folder, and dump all of files in your download folder into TF2 itself or Gmod in order to access them. That should do the trick as far as I'm concerned.
This isn't going to work sadly. Theres a difference between both GMOD models and TF2 models.
GMOD's models are usually a .mdl file with the materials in their own seperate .vtf files, being told where they are located and where to go on the model.
TF2's models are similar to HL1's models as it uses only 1 model with the materials baked into them. This means that the TF2 modesl found within GMOD would have been edited to some degree. I could probably give the model I'm trying to port this treatment and it should work fine really.
I'll try both methods first before I can expand on this topic.
What?
Team Fortress 2 and Garry's Mod are Source Engine games and Gmod is completely compatible with Team Fortress 2. You might be thinking of Team Fortress Classic, a GoldSrc game of the same franchise. Either way, dumping your TF2's download folder into either game should work and Gmod should be able to reach its contents through the Q menu.
https://files.facepunch.com/forum/upload/246061/8f5f8782-1804-4fe3-bc70-521af1e92773/20180711235330_1.jpg
OK, I must have been wrong about this then, I didn't know it would work to an extent. However, the model is lacking physics, bones and materials (fleshy statues). I put the model and other stuff in the 'models' folder because I won't be able to access the 'download' file. Any advice from here on?
You need to put the stuff from the download folder into the game's root folder (either tf or garrysmod) for it to actually catch everything, aka have the "models", "materials", "sounds"... etc, folders match with the game's respective "models", "materials", "sounds" folders.
Did this for the corresponding files and the model remained the same, I think I need to change the directories or something for he files.
Been a while and I figured things out by myself. The model is now in GMOD and is currently an effect with materials + animations and I only ask 1 thing now, how do you create the 'physics.smd' for the '.qc' to use? I've already read up on the Valve Dev Wiki to the extreme and I couldn't find anything relating to the creation of the 'physics.smd'. Note that I'm not asking on how to use the $collisionjoints as I've managed to figure that out aswell.
https://files.facepunch.com/forum/upload/246061/a53a3da6-1150-4488-a54e-fa4152fcfebe/yesssssss.png
Sorry, you need to Log In to post a reply to this thread.