Hello!
This is the second time I try to do a simple model in Blender for Source and fail, so I'm here asking for help.
This is how the model should look like:
[img]https://dl.dropboxusercontent.com/u/22953481/Images/ss%2B%282015-03-07%2Bat%2B03.23.36%29.jpg[/img]
And this is how my books.qc looks like:
[quote]
$modelname "books.mdl"
$body books "books.smd"
$staticprop
$surfaceprop paper
$cdmaterials "books\materials"
$scale 4
$sequence idle "books.smd"
[/quote]
But it ends looking like this shit:
[img]https://dl.dropboxusercontent.com/u/22953481/Images/ss%2B%282015-03-07%2Bat%2B03.23.08%29.jpg[/img]
I'll put the paths here:
For models - common\Half-Life 2\hl2\models
As for materials - common\Half-Life 2\hl2\models\books\materials
I guess it has something to do with the material paths, but I still don't know how to fix it, and it's driving me insane. Please, any help will be welcomed!
[CODE]$cdmaterials books/materials[/CODE]
Change that to:
[CODE]$cdmaterials models/books/materials/[/CODE]
Remember, $cdmaterials is always relative to game/materials/.
[QUOTE=SergerantJoe;47273210][CODE]$cdmaterials books/materials[/CODE]
Change that to:
[CODE]$cdmaterials models/books/materials/[/CODE]
Remember, $cdmaterials is always relative to game/materials/.[/QUOTE]
Nope, it didn't worked...
If you get the infamous purple checkerboard it's caused by breaking one of these rules:
-The texture name in your SMD must match the name of your VMT.
-The $cdmaterials location must match your VMT location.
-The $basetexture name and location must match your VTF name and location.
It can be only one of those three things. If all three seem correct and it still errors check again.
-Snip, Joe beat me to it.-
Shit, I still can't manage to do it. I must be stupid or something.
I remade entirely everything.
Textures are now in this path: Half-Life 2\hl2\materials\models\books
And the vmt looks like this:
[code]"VertexlitGeneric"
{
"$basetexture" "Program Files (x86)\Steam\steamapps\common\Half-Life 2\hl2\materials\models\books"
"$surfaceprop" "Wood_Panel"
"$envmap" "env_cubemap"
"$normalmapalphaenvmapmask" 1
"$envmapcontrast" 1
"$model" 1
"$selfillum" 1
}
[/code]
and the qc file looks like this:
[code]
$modelname "books\books.mdl"
$body books "books.smd"
$staticprop
$surfaceprop Wood_Panel
$cdmaterials "Program Files (x86)\Steam\steamapps\common\Half-Life 2\hl2\materials\models\books"
$scale 4
$sequence idle "books.smd"[/code]
Remember, everything is relative to game/materials.
So right now it's looking in "Program Files (x86)\Steam\steamapps\common\Half-Life 2\hl2\materials\Program Files (x86)\Steam\steamapps\common\Half-Life 2\hl2\materials\models\books"
Also, you didn't specify your VTF.
Try this.
[CODE]$cdmaterials models/books/
$basetexture "models/books/vtf_name.vtf"[/CODE]
And substitute vtf_name for the name of your VTF file.
[QUOTE=SergerantJoe;47280446]Remember, everything is relative to game/materials.
So right now it's looking in "Program Files (x86)\Steam\steamapps\common\Half-Life 2\hl2\materials\Program Files (x86)\Steam\steamapps\common\Half-Life 2\hl2\materials\models\books"
Also, you didn't specify your VTF.
Try this.
[CODE]$cdmaterials models/books/
$basetexture "models/books/vtf_name.vtf"[/CODE]
And substitute vtf_name for the name of your VTF file.[/QUOTE]
This is what I get when I compile the qc file
[code]ERROR: c:\program files (x86)\steam\steamapps\common\half-life 2\hl2\models\book
s\books.qc(7): - bad command $basetexture
ERROR: Aborted Processing on 'books\books.mdl'[/code]
And as I've seen [url=https://developer.valvesoftware.com/wiki/Category:QC_Commands]here[/url] that command doesn't exist for QC files.
Oh, and thanks a lot for helping me!
Put the $basetexture in your VMT and $cdmaterials in your QC.
[QUOTE=SergerantJoe;47280874]Put the $basetexture in your VMT and $cdmaterials in your QC.[/QUOTE]
It's still wrong, I don't know why.
Does the file name of the texture match the one in the materials tab in blender?
You might need to export the model again.
[QUOTE=Midkey;47282603]Does the file name of the texture match the one in the materials tab in blender?
You might need to export the model again.[/QUOTE]
Oh, that might be the reason. Does the texture need to be in .tga or .vtf in the blender material tab?
Needs to be .vtf
[QUOTE=Midkey;47286543]Needs to be .vtf[/QUOTE]
This isn't necessary. Just so long as the name is the same, you don't need to put in the file extension.
I've compiled up a quick screencap of the relevant information in terms of materials for you to use as reference.
[t]http://i.imgur.com/mUTfFAA.jpg[/t]
[QUOTE=Leintharien;47290416]This isn't necessary. Just so long as the name is the same, you don't need to put in the file extension.
I've compiled up a quick screencap of the relevant information in terms of materials for you to use as reference.
[/QUOTE]
Oh, thank you all!
But I still get the checkboard texture... Could I see your qc file as an example?
Or maybe it has something to do that I use Cycles render instead of Blender Render?
EDIT: I finally did it!
[img]https://dl.dropboxusercontent.com/u/22953481/Images/ss%2B%282015-03-10%2Bat%2B12.42.32%29.jpg[/img]
And, for the next chapter, I'll try to add a hitbox and scale it up a bit. Right now those books are for ants.
Here is the code from my qc file. Idk too much about the QC stuff so some of it might be missing or unnecessary, but the models work for what I need of them.
[code]$modelname "endoftomorrow\door_interior.dmx"
$staticprop
$cdmaterials "models\endoftomorrow\"
$mostlyopaque
$scale 10
$body door_interior "door_interior.dmx"
$surfaceprop wood
$sequence idle "door_interior.dmx"[/code]
I think I'm missing a collision mesh, but I don't need it myself.
Sorry, you need to Log In to post a reply to this thread.