Problem hexing SLAM model.

Hi people, this is not really related to LUA, but it doesn’t fit in “Help & Support” either, so I ask here.

I’ve been trying to hex the SLAM model to change its texture, but it’s giving me problems. I followed a tutorial in FPS banana, and its not the first time I hex something, but this time it’s not working, and I don’t know why. I edited the MDL with an hex editor, changed the model path and materials path. I also changed the paths inside .vmt files. However, when I go in game, the models use the default SLAM texture. Using the SubMaterial tool or the Easy Entity Inspector, it shows that the model is correctly using my materials, but it still look like the default one.

Theres something weirder. The three textures listed in the SubMaterials tool are:

  • new light1
  • new light2
  • v_slam
    However, none of those materials seem to contain the main SLAM texture. “new slam.vmt” is the base texture, but the model is not using it. If I replace the “v_slam” submaterial, the model changes completely, so that’s the texture I need to modify. But this is what it has inside:

Its empty… What am I doing wrong?

I don’t think the texture is empty, it just has a big mask going over everything, probably for the illum texture of the SLAM, since the red bit would probably glow. Also, there is a thread for something like this, the modelling one

[editline]27th February 2016[/editline]

Yep, I just checked, if you hide the alpha channel of that v_slam material (which you can do in a program like VTFEdit), it looks like this:

[editline]27th February 2016[/editline]

The odd part about this is I’m pretty sure it doesn’t even USE the alpha channel for anything, since I checked the VMT. It uses the normal map’s alpha, though. I suppose it could be used internally to define the SLAM’s light and that it should glow or something

I think if you just removed the alpha channel and made your changes and then saved it without an alpha channel, it’d work

Oh, I didn’t know that thing about masks. Looks like GIMP VTF plugin already has an option to hide the mask, I just wasn’t aware of it. I modified the texture and now it works fine. The slam detonator has a small flickering light that glows in the dark, I guess that’s why it has an alpha mask. I know very little about how VTFs work.
Anyway, thanks for the help.

Yeah, that’s why it has

$selfillum 1

at the end of the .VMT, which uses the alpha channel as a map for what parts of the model should and shouldn’t be self-illuminating.

I forgot $selfillum used the alpha mask so that’s why I was confused before