I'm newbie to modelling so i decided to port Blender model to garry's mod. Downloaded source tool pack for blender. Saved model as SMD (Had engine path written+ made QC file correct). Then i compiled with Crowbar program into model files. Made VTX+VMT files. Got everything to addons folder (addons/bat/models/bat.smd+4 files; addons/bat/materials/VTF+VMT; created lua file (i'm not sure i actually had to do that).). Run garry's mod, search for bat and there's good model with no texture. Where did i f**k up?
Pics related
[url]https://pp.userapi.com/c626325/v626325126/5aaab/kXE5br5OdiA.jpg[/url]
[url]https://pp.userapi.com/c626325/v626325860/51401/LDjr_MLoJ8c.jpg[/url]
Open crowbar, goto "View" Tab and select your bat. In the informations tab it'll tell you what materials are loaded on the model.
[QUOTE=isaa1;51940029]Open crowbar, goto "View" Tab and select your bat. In the informations tab it'll tell you what materials are loaded on the model.[/QUOTE]
=== Material and Texture Info ===
Material Folders ($CDMaterials lines in QC file -- folders where VMT files should be, relative to game's "materials" folder):
"bat\"
Material File Names (file names in mesh SMD files):
(Total used: 1)
"Material"
Seems ok... What must be the problem then?
It looks like this
[T]http://i.imgur.com/QET9ZAZ.png[/T]
[QUOTE=isaa1;51940307]It looks like this
[T]http://i.imgur.com/QET9ZAZ.png[/T][/QUOTE]
Yeah, i get it. But what am i supposed to figure out out of this?
[editline]10th March 2017[/editline]
So, ok. I've got only one texture.
My QC file:
$modelname Cylinder.mdl
$cdmaterials "Material"
$scale 12
$surfaceprop wood
$contents "solid"
$body mybody "Cylinder.smd"
$sequence idle "Cylinder" fps 1
$collisionmodel "Cylinder.smd"
{
$mass 200
$inertia 1
$damping 0
$rotdamping 0
}
My VMF file:
"LightmappedGeneric"
{
"$basetexture" "cyl\material"
}
I totally have no ideas why i've got no texture. Any guess?
$cdmaterials "Material" Shouldn't be just "Material"
The $CDMaterials line directs where the Source engine should look for the .vmt.
So if your .QC is this
[CODE]$modelname Cylinder.mdl
$cdmaterials "Material"
$scale 12
$surfaceprop wood
$contents "solid"
$body mybody "Cylinder.smd"
$sequence idle "Cylinder" fps 1
$collisionmodel "Cylinder.smd"
{
$mass 200
$inertia 1
$damping 0
$rotdamping 0
}[/CODE]
Then change it to something like this
[CODE]$modelname Cylinder.mdl
$cdmaterials "Materials/Models/MyName/FirstModel"
$scale 12
$surfaceprop wood
$contents "solid"
$body mybody "Cylinder.smd"
$sequence idle "Cylinder" fps 1
$collisionmodel "Cylinder.smd"
{
$mass 200
$inertia 1
$damping 0
$rotdamping 0
}[/CODE]
And change the .vmt from this:
[CODE]My VMF file:
"LightmappedGeneric"
{
"$basetexture" "cyl\material"
}[/CODE]
to this
[CODE]My VMF file:
"VertexLitGeneric"
{
"$basetexture" "Materials/Models/MyName/FirstModel\material"
}[/CODE]
[QUOTE=isaa1;51941783]
Very helpful information
[/QUOTE]
I hate to hijack this thread but it would be a shame to make a new one so similar to this one.
I've got the same problem as the above poster, I believe. My model loads but the textures are nowhere to be seen. I believe I've changed my QC and VMT to model after the examples you provided above, but I'm still getting the same silent error as I have been for a while.
My VMT:
[code]"VertexlitGeneric"
{
"$basetexture" "materials/health3/health3"
"$surfaceprop" "metal_bouncy"
"$translucent" 1
"$model" 1
}
[/code]
My QC:
[code]
$modelname "health3.mdl"
$scale "50.000000"
$body "Body" "health3.smd"
$cdmaterials "materials/health3"
$sequence idle "health3.smd"
$surfaceprop "no_decal"
$collisionmodel "health3.smd" {
$concave
$automass
}
[/code]
My file structure:
[img]http://i.imgur.com/JqEZEBw.png[/img]
I've been at this for several hours and the three or four tutorials I've looked at have left me without a lot of answers. I would really appreciate any help you could give me on this.
[video]https://youtu.be/K2Jl9PZC1rg[/video]
Where did i go wrong? I'm sure there's something about QC material path or VMT path... I literally don't get it. Could someone be patient enough to watch it and help? I did change VMT and QC as it's said in this thread but i feel like i'm missing something important.
$cdmaterials root directory is "materials", so if you use this:
[CODE]$cdmaterials "materials/yourfolderwithmaterials"[/CODE]
The game interpretates the root to be "garrysmod/materials/materials/yourfolderwithmaterials" instead of "garrysmod/materials/yourfolderwithmaterials". So try this:
[CODE]$cdmaterials "yourfolderwithmaterials"[/CODE]
Same with .vmt files.
If you have your materials directly dropped in the "materials" folder, just leave the string empty:
[CODE]$cdmaterials ""[/CODE]
Thank you all.
Thanks to your help I've finally gotten it working. After reworking the QC and VMT it works!
[img]http://i.imgur.com/0zalbYJ.jpg[/img]
Additionally, you would not believe how unpleasant it is to get a model from .w3d to .mdl
So what's my problem after all? I still don't understand how to make it work. That's kinda sad.
In Blender, make sure each mess has an associated material and texture with te same name as the .vmt file (dont include the .vmt extension, just the name). We could help you more if you show CLEARLY the folder where all materials for that model are.
Ok i still have no ideas how but it seems like one of my models eventually got its texture. I have no ideas what i've done different but there's two videos where i try to make the model with same QC options and stuff but the result is different. One got its texture and another didn't. So i have no ideas where i fucked up. Could you help me?
Knife models which's compiled ok for some reason.
[video]https://youtu.be/_wWtfSAJkbE[/video]
Bat model that doesn't work.
[video]https://youtu.be/4HNYK7-7Bj0[/video]
Knife QC:
$modelname knife.mdl
$cdmaterials "knife"
$scale 5
$surfaceprop wood
$contents "solid"
$body mybody "knife.smd"
$sequence idle "knife" fps 1
$collisionmodel "knife.smd"
{
$mass 200
$inertia 1
$damping 0
$rotdamping 0
}
Knife's VMT:
"VertexLitGeneric"
{
"$basetexture" "knife"
}
Bat's QC:
$modelname bat.mdl
$cdmaterials "bat"
$scale 12
$surfaceprop wood
$contents "solid"
$body mybody "bat.smd"
$sequence idle "bat" fps 1
$collisionmodel "bat.smd"
{
$mass 200
$inertia 1
$damping 0
$rotdamping 0
}
Bat's VMT:
"VertexLitGeneric"
{
"$basetexture" "bat"
}
Addon's folder:
E:\steam\steamapps\common\GarrysMod\garrysmod\addo ns\
What's wrong?
[t]http://i.imgur.com/jxrF75i.png[/t]
[QUOTE=Blaze2198;51977990][IMG]http://i.imgur.com/jxrF75i.png[/IMG][/QUOTE]
I've done what you said on pics but material's now invisible. Poster above had the same problem but he didn't say how he managed to fix that. And another 5 min video here. I think i've done everything properly. At least it seems like.
[video]https://youtu.be/ZyE8pMQzWi8[/video]
[t]http://i.imgur.com/ta3nTVL.png[/t]
[QUOTE=Blaze2198;51978120][IMG]http://i.imgur.com/ta3nTVL.png[/IMG][/QUOTE]
And now it's back to purple/black texture. I dunno.
The problem is the .vmt files. In the "Bat video", around minute 5, you wrote $basetexture "bat", but $basetexture refers to FILES, not directories, so you should write $basetexture "bat/bat".
I dont recommend you to name your files the same name as the folders that contain them.
$cdmaterias "bat" (because $cdmaterials refers to directory).
$basetexture "bat/bat" (because $basetexture refers to file).
[QUOTE=Kumacv;51978263]The problem is the .vmt files. In the "Bat video", around minute 5, you wrote $basetexture "bat", but $basetexture refers to FILES, not directories, so you should write $basetexture "bat/bat".
I dont recommend you to name your files the same name as the folders that contain them.
$cdmaterias "bat" (because $cdmaterials refers to directory).
$basetexture "bat/bat" (because $basetexture refers to file).[/QUOTE]
Nah, still not working. Btw then why did knife work if i had $basetexture wrong? Source drives me insane...
Upload the files here
[url]https://www.dropbox.com/s/ck1eogewv7xbxsg/BatFiles.rar?dl=0[/url]
There they are. I feel stupid.
Obj file: [url]https://www.dropbox.com/s/8yby0z3wwe646x3/bat.rar?dl=0[/url]
[QUOTE=Blaze2198;51979099][url]https://www.dropbox.com/s/0ve4s3pk2kt6mub/BatInAddons_Fixed.rar?dl=0[/url][/QUOTE]
Nope. Still missing texture.
[IMG]https://pp.userapi.com/c637229/v637229860/46340/PWtZrECPHKU.jpg[/IMG]
Open the reference.smd file (It's the bat mesh file) with something like Notepad++ or even Notepad (I think that works too) Scroll down a bit and you'll find large strings of text with the texture name above it. Alternatively you can compile with Crowbar, goto the "View" tab and look down, You'll find material names and material location.
Same files. Not sure why your texture is missing. :mystery:
[video=youtube;B7M9duAjKk8]https://www.youtube.com/watch?v=B7M9duAjKk8&feature=youtu.be[/video]
Here's another one. It should work this time: [url]https://www.dropbox.com/s/9tu20rhadokizla/Bat.rar?dl=0[/url]
[QUOTE=Blaze2198;51979215]Same files. Not sure why your texture is missing. :mystery:
[video=youtube;B7M9duAjKk8]https://www.youtube.com/watch?v=B7M9duAjKk8&feature=youtu.be[/video]
Here's another one. It should work this time: [url]https://www.dropbox.com/s/9tu20rhadokizla/Bat.rar?dl=0[/url][/QUOTE]
Your last file.... Works. How did you do that? I tried to make another test model but it didn't work at all. Changed VMT path to match yours in bat's VMT. Created same folder roots and stuff. Where do i f**k up lol?! How did you do that?
Nothing special. Just make sure all the stuff in qc is correct. Also you might want to check this site:
[url]https://developer.valvesoftware.com/wiki/Category:QC_Commands[/url]
[QUOTE=Blaze2198;51980055]Nothing special. Just make sure all the stuff in qc is correct. Also you might want to check this site:
[url]https://developer.valvesoftware.com/wiki/Category:QC_Commands[/url][/QUOTE]
was there something wrong with my qc? Like, maybe i had to add something. I'm total 0 in that kind of stuff lol. Thanks for commands list.
Sorry, you need to Log In to post a reply to this thread.