Texturing issues

Hey there. I just started to learn how to make addons for Gmod a couple of days ago. Right now, I’ve been working with importing external models into Blender 2.49 (yes, I’m outdated, but I want to cover all the basics first before making the move) to them import them to Source and afterward compile them as addons for Gmod. I’ve been doing good so far, but I ran across a problem when it comes to textures and materials. Models that requiere only one texture (and ergo, only one material) work just fine once I’m done with the compiling and when I put everything as an addon folder.

My problem here is when I’m working with models that requiere multiple models.

The models used here were retrieved from these links:

With this model I only requiered one texture, so all I do is add the material, link the texture to the image (which comes with the model and is also mapped to it). So after that all I do is compile the .smd files, put them on an addon folder (models, materials, info.txt, etc.) and then it works perfectly.

With the next models I use several textures, though, and that’s when things get really hectic to me.

Again, all textures, which come along with the model, are already mapped to the model (so when I click on the Draw Type:texture the textures are already perfectly visible). I try to assign the materials properly and whatnot and the exporting of both the .smd and the _phy.smd, along with the compilling afterward, work perfectly fine. I then put the files on the addon folder but when I spawn the model this is what I get:

So it’s apparent that at least it is getting the materials into the mode (if I delete the files in the materials/models folder not even that part of model is textured), but I just don’t know what did I do (or didn’t do) that the textures won’t show up properly. I also don’t know whether the mistake occurs before or after the compiling. These are the material files on materials folder of the addon:

I tried naming each of them after each material on the .blend file (which is what I’ve been doing with previous models) and making sure each .VTF file has the same texture as the materials on the .blend file. But either way, I haven’t found a solution yet and I don’t think I can move forward into more complicated stuff if I can’t get the textures right, so I was hoping maybe someone could lend me a hand with this. I’d appreciate it greatly!

Try opening the SMD in notepad and check the textures names it uses.

or use MDLtexture on the compiled model.

Ok, I opened it on notepad and I see this:

version 1
0 "joint0" -1
time 0
0 0 0 0 0 0 0
0 2.130657 3.309293 4.853542 -16.583120 9.001566 -9.425123 0.324219 0.500000 0 0 1
0 1.973604 2.877998 4.903742 -18.673227 0.003219 -9.806840 0.399414 0.537109 0 0 1
0 1.842916 2.877998 4.978408 -14.521333 0.001287 -15.296997 0.399414 0.500000 0 0 1

The “…” indicating that the the “Material__26” part and the following three lines repeat over and over with different values and eventually changes to “Material__27”, “Material__28” and so on. What does this indicate?

And MDLtexture? Never heard of that. Is that a script, a plug-in or a separate software?

Edit: I’ll try to put all texture files in one picture and see if I can map all the sections of the model into it.

Ok, I’m back after trying using a single texture file for the whole model.

But the results weren’t much different.

Now I get this…

I don’t know if it’s whether the model that has a problem or the fact that the .blend still shows up the previous textures (which I removed from the folder) and other materials besides the one I intent to use and I can’t remove any of them (is it even possible?).

Note: Amaterasu.png is the name of the texture image I used and Amaterasu is also the name of the material I (supposedly) worked with as well.

Also, when I look at the UV map I see a couple of sections of the model that haven’t been assigned. I tried moving them into the image but apparently nothing changes, so I don’t know whether it’s part of the problem or not.


Alright, know what? I finally got it! I figured how to delate all unused materials, then saved it as an .obj file, opened it again on a new .blend, assigned it the texture map again and then did the whole importing process as normal. And the models pops out just fine!

The texture work is a little choppy here and there but that can be worked on easily.

If anyone knows of any different alternatives I could have taken I’m willing to hear them though!