How to set default material of a model?

I made a model and i want to use it for GMod. I have a ‘pinata.smd’ a ‘pinata_collision.smd’ and a ‘compile.qc’

$modelname “pinata/pinata.mdl”
$cdmaterials “models/pinata”

$scale 1.0
$surfaceprop “Metal”

$body “Body” “pinata.smd”

$sequence “idle” “pinata.smd” fps 30

$collisionmodel “pinata_collision.smd”
{
$mass 40
}

But when i compile it and spawn it in GMod it is invisible. I assume its because i don’t have a default material set but whenever i spawn it in and i use the material tool it still is invisible so it might not be.

Any ideas?

Check if the path of the materials is right: models/pinata. There should be a VTF and VMT file in there, named accordingly to the texture that was used in the editor.

You can download the Crowbar MDL tools to see if the model has the paths set right as well.