• Black And Purple Textures.
    8 replies, posted
(Second post since I posted it in the wrong area) My first addon I made for Garry's Mod was a prop (A simple Padlock Model) . I did all the other stuff, except I can't get the textures to show up so it's purple & black. I was hopping someone would spot my error and tell me how to fix it. Much would be appreciated. My .qc file [CODE]$cd "C:\Users\Sharpie\Desktop\Mastalock\models\props\" $scale "1" $modelname "Mastalock.mdl" $model "Mastalock" "Mastalock.smd" $surfaceprop "metal" $cdmaterials "materials\models\Mastalock" $sequence idle "Mastalock.smd" fps 30.00 $collisionmodel "Mastalock.smd" { $mass 30.0 $inertia 30.00 $damping 0.01 $rotdamping 1.50 }[/CODE] My .vmt & .vtf [CODE]Mastalock.vtf (picture ofcourse.) Mastalock.vmt: "LightmappedGeneric" { "$basetexture" "Mastalock/Mastalock" }[/CODE] Here is the location of files relevant to my test project. [CODE]Folder Containing .MDL & Textures: C:\users\sharpie\desktop\Mastalock\materials\models\Mastalock\*Texturefileshere* --->models\*mdlfileshere* Also has .qc , gameinfo.txt , and .smd before uploading [/CODE] Garry's Mod Folder's with the materials also. [CODE]GarrysMod\garrysmod\materials\Mastalock\*texturefiles*[/CODE] I don't know if I have the locations wrong. Or the way I compiled it. I use Maya 2012. Since I can't get he .smd plugins to work I export it this way. [CODE]Maya > to .obj > Milkshape 3D - Import it as Wavefront OBJ > Then export it from there as Half-Life .smd[/CODE] I feel like its something obvious. IF you need more info or pictures please let me know. If you want to help me through steam go ahead and add me by clicking on the steam icon under my name.
[CODE]$cdmaterials "materials\models\Mastalock"[/CODE] Should be just [CODE]$cdmaterials "models\Mastalock"[/CODE] Also, you don't need $scale if it's set to 1.
[QUOTE=SergerantJoe;45812169][CODE]$cdmaterials "materials\models\Mastalock"[/CODE] Should be just [CODE]$cdmaterials "models\Mastalock"[/CODE] Also, you don't need $scale if it's set to 1.[/QUOTE] Did that, still purple and black. Even after recompiling.
Please download this tool [url]http://www.wunderboy.org/download.php?file=MDLTextureInfo_1.0.zip&s=1[/url] Place it somewhere and open your compiled mdl file with it. You should see the folder path it's looking for and the vmts it wants [IMG]http://puu.sh/b9IJI.png[/IMG] Post a screenshot of yours if you still can't figure it out.
I have 2 suggestions, after you've changed [CODE] $cdmaterials "materials\models\Mastalock"[/CODE] to this [CODE]$cdmaterials "models\Mastalock"[/CODE] Then change the vmt [CODE]"LightmappedGeneric" { "$basetexture" "Mastalock/Mastalock" }[/CODE] to [CODE]"VertexLitGeneric" { "$basetexture" "models/Mastalock/Mastalock" }[/CODE]
Yeah, that too. Make sure it's VertexLitGeneric or else it'll look funky. That wouldn't cause the checkers though.
As far as I know it'd just show up as invisible if it found the proper texture, but the texture was a LightmappedGeneric. At least that much tells us that it's not the material at fault here (yet). [code]GarrysMod\garrysmod\materials\Mastalock\*texturefiles*[/code] You said your materials are in here, but they should be in materials/models/mastalock rather than materials/mastalock. On a side note, HLMV's model tab will give you a list of loaded VMTs and will tell you if any materials failed to load. If any do fail to load then you can check what materials it's looking for on the same tab to make sure you didn't accidentally miss a material when you were assigning them in your modeling program. This is mostly useful for complex playermodels that use a dozen or so materials and may have a very small area with a different material.
Thanks I will take this information and see if I can find my mistake give me a few. [editline]27th August 2014[/editline] [QUOTE=cra0kalo;45812862]Please download this tool [url]http://www.wunderboy.org/download.php?file=MDLTextureInfo_1.0.zip&s=1[/url] Place it somewhere and open your compiled mdl file with it. You should see the folder path it's looking for and the vmts it wants [IMG]http://puu.sh/b9IJI.png[/IMG] Post a screenshot of yours if you still can't figure it out.[/QUOTE] I'll show a screenshot of this if I can't fix it yet. Give me a few. [editline]27th August 2014[/editline] [QUOTE=Demonic King;45813099]I have 2 suggestions, after you've changed [CODE] $cdmaterials "materials\models\Mastalock"[/CODE] to this [CODE]$cdmaterials "models\Mastalock"[/CODE] Then change the vmt [CODE]"LightmappedGeneric" { "$basetexture" "Mastalock/Mastalock" }[/CODE] to [CODE]"VertexLitGeneric" { "$basetexture" "models/Mastalock/Mastalock" }[/CODE][/QUOTE] [QUOTE=cra0kalo;45812862]Please download this tool [url]http://www.wunderboy.org/download.php?file=MDLTextureInfo_1.0.zip&s=1[/url] Place it somewhere and open your compiled mdl file with it. You should see the folder path it's looking for and the vmts it wants [IMG]http://puu.sh/b9IJI.png[/IMG] Post a screenshot of yours if you still can't figure it out.[/QUOTE] Both of you helped. Turns out the .vmt was originally named "basearchcombine.vmt" And I had renamed it to "Mastalock.vmt" Thanks. [editline]27th August 2014[/editline] [QUOTE=SergerantJoe;45813116]Yeah, that too. Make sure it's VertexLitGeneric or else it'll look funky. That wouldn't cause the checkers though.[/QUOTE] Thanks. I was using the wrong term in the vmt file. [editline]27th August 2014[/editline] [QUOTE=CaptainBigButt;45813787]As far as I know it'd just show up as invisible if it found the proper texture, but the texture was a LightmappedGeneric. At least that much tells us that it's not the material at fault here (yet). [code]GarrysMod\garrysmod\materials\Mastalock\*texturefiles*[/code] You said your materials are in here, but they should be in materials/models/mastalock rather than materials/mastalock. On a side note, HLMV's model tab will give you a list of loaded VMTs and will tell you if any materials failed to load. If any do fail to load then you can check what materials it's looking for on the same tab to make sure you didn't accidentally miss a material when you were assigning them in your modeling program. This is mostly useful for complex playermodels that use a dozen or so materials and may have a very small area with a different material.[/QUOTE] Thanks for letting me know where they were supposed to go. I was downloading garrys.org addons and looking at them to help guide me. And this confirmed my suspicions.
the texture in (Whatever Modelling program) NEEDS to the same as the one in Valve. Examples, (I Use 3DS MAX.) Sooo, 3DS Max Skin---------Valve Skin TestSkin.tga TestSkin.vtf CANT BE Testing.tga ArmySoldier.vtf has to be the same name as the one in 3DS MAX.
Sorry, you need to Log In to post a reply to this thread.