Material is missing with a proper QC?

Now I know this is the dumbest and most asked question, but I’ve made a custom prop before and worked.

Now I tried it again, checked for spelling errors 10000 times and have 0 fucking clue why it won’t work in Gmod.

The files

The QC

$modelname “models/Segra-Barrel.mdl”
$model Segra-Barrel “Segra-Barrel.smd”

$cdmaterials “models/”
$surfaceprop “metal_barrel”
$sequence idle “Segra-Barrel.smd”
$collisionmodel “Segra-Barrel-ref.smd” {
$mass 40


“$basetexture” “Segra-Barrel”
“$surfaceprop” “Metal”
“$surfaceprop2” “Metal”
“$nolod” 1

The pathways

materials/models/ the textures are here
models/ the .mdl is here

I made a seperate model before and it worked 0 problem, using exactly the same pathways and QC!

it may be because there’s an hyphen in the vtf’s name, not sure if that’s an allowed character

It might be because of - in the name, I’ll check. Thank you for the help either way.

EDIT: Nope, using _ instead of - doesen’t help, still a missing texture.

I’ve been told that it’s generally good practice to keep all your filenames lowercase because of some differences between windows/linux in terms of how they handle that stuff so that might be one thing to try.

Other troubleshooting steps would be to go back to your smd files and make sure the material names are correctly set and point at the path you use for the .vmt and make sure your $basetexture points at the correct texture (Looks like it’s expecting the .vtf to be in materials/segra-barrel.vtf instead of material/models/segra-barrel.vtf)

could it be the name of the material applied to the model?
this is supposedly a very straight forward process, so if it’s actually not names being messed up somewhere then it’s addon conflict or some other unlikely shit like that.

Okay, so the problem was “$basetexture” “Segra-Barrel” didn’t have a pathway for the texture, awfully missed step.

The problem is, the prop doesen’t spawn with the texture, I have to manually get the texture trough Extended Spawn menu, and the prop is PURE BLACK unless I have a flashlight pointed at it.

the prop being black might be either because the light origin point is clipping underground, or correlated to the first problem of the prop not spawning with textures, by that do you mean that it’s purple and black, invisible or just black when you spawn it?

The prop is black when I manually apply the texture its supposed to have when I spawn it. Only shows the texture when I have a lamp, light tool or flashlight pointed at it, the map is perfectly working, and that only occours for this prop.

EDIT: The prop has some buggy ass lighting, its either black and goes to normal or whatever, I don’t know at this point.

When a prop doesn’t have a texture by default, the lighting becomes horrible (as you’ve described it, it becomes black sometimes or when viewed at certain angles and needs the flashlight to be seen).

I’ve had this problem before and it got me stuck for some time, for me I didn’t need the model to have a default material but it seems as if every model needs one even if just to have it, so I guess to fix it you’ll need to fix the missing material problem first.

If it’s really not that then the only other way I could think of is like I’ve said earlier with the light origin point, the QC command for it is $illumposition and it should always be inside of the model, but unless you’ve copied and pasted a wacky QC you shouldn’t be having this problem as it’s placed automatically if you don’t type it in the QC.

1 Like

I don’t really know, I’ll start over, that will for sure work, thank you and TankNut for the help, I very much appreciate it.

1 Like

Another guy had the exact same problem in the Gmod discord, he got it fixed I thought it was you haha, well the way he got it fixed was because he messed up the directories, if you start over and do everything correctly you won’t have the problem, it’s pretty common when first learning source to just say “fuck it” and do everything all over with the knowledge you’ve gained.

1 Like