Hello, guys. I have a problem with importing my own model into Garry's Mod.
I made flag model in Blender and exported it to .smd format using Blender Source Tools add-on. I created .qc file and put there this:
$modelname "flag.mdl"
$cdmaterials "models/flag"
$scale 12
$surfaceprop "carpet"
$body "Body" "flag.smd"
$sequence "idle" "flag.smd" fps 30
$collisionmodel "flag_phy.smd"
{
$concave
$mass 10
$inertia 1
$damping 0
$rotdamping 0
$rootbone " "
$maxconvexpieces 1
}
I made a UV map for texture and made VTF and VMT files. I compiled .qc file via Crowbar and extracted my model files in 'addons\flag\' folder.
https://files.facepunch.com/forum/upload/347003/dd789aca-797a-4cd4-ab82-fe141a016b8e/изображение.png
I put vtf and vmt files in 'materials\models\" folder. Then I put models in 'models\flag\' folder.
After launching GMOD i found that I have meshes and physics on my prop but no textures. What is problem?
More like a model texture mapping problem. How do you add textures to the model in Blender?
Should be a very easy fix since I can only see one problem related to the "$cdmaterials"-flag in your qc-syntax:
$cdmaterials "models/flag"
...should be changed to:
$cdmaterials "models/flag/"
Notice how the path now ends with a slash. This is important because it "tells" the model to find materials for itself *inside* of that folder, rather than looking for a single material called "flag" in the "models"-folder, which is probably not what you want.
Otherwise there are two other possibilities for the material not working properly:
Either the material's name given in Blender does not match the name of the .vmt-file that corresponds to it, or there's a mistake with the paths inside of the .vmt-file itself. Although presumably you've got those two parts underway already.
Best of luck.
Can you maybe post the source files for the flag? I don't think it's a .qc problem.
Thanks a lot, @Mailer , that were really silly mistakes. I made (probably) everything that you recommended and it worked.
https://i.postimg.cc/W1RYSn5K/2.png
I think I should resize it =)
Sorry, you need to Log In to post a reply to this thread.