I recently decided to try making a map for counter strike (lol) and im having serious issues getting any custom props to show up properly in the engine. The model compiles, and i can get it and the collision in game, but the texture doesnt work at all (i get the debug texture instead of the one i specified).
my qc file lookes like so:
$modelname "rend.mdl"
$cdmaterials "models"
$scale 1
$surfaceprop "default"
$staticprop
$body "Body" "rend"
$sequence idle "rend_idle" loop fps 1
$collisionmodel "rend_phy.smd"
{
$mass 1
$concave
}
and my vmt file looks like this:
"VertexlitGeneric"
{
"$basetexture" "models/tv_mat"
"$bumpmap" "models/tv_norm"
"$surfaceprop" "Computer"
"$translucent" 1
"model" 1
}
If anyone knows whats up, please help!
Replies
do you got the material slot properly named in your model before you exported?
some info is needed if you want help.
A word of warning, it does a few things I don't like:
Creates new layers and moves models around.
Places spline text next to your model.
If you've turned on rendering in any spline recently it will turn it on for the next set of spline text it makes.
The UI is a bit of a mess and could be straightened out and compacted.
It can be a bit of a pain to get the paths hooked up correctly.
But all of that is overshadowed by how easy it makes things once you get it working.
@mark Dygert: That would be amazingly useful except im using maya. sorry.
iv mostly been using blender and smd-tools to do all my source exports, but just give me a sec and i will try out a quick thing for source and see what works.
after making and assigning your material try to add a texture that has the same name as your vmt to the diffuse/color channel of your material.
One thing i noticed was that when i decompiled other models, there is a line in the reference .smd that points to a file in the materials folder. However, the same line in my smd points to debug/debugempty, like so:
I think its supposed to be different, but i have no idea what to change it to.
-Make sure that you have a texture applied to your object in Maya
-Make sure that the texture applied has the same filename as the VMT Material
-Make sure that your Material IDs/Sub-materials/whatever the hell is used to define what material each polygon uses, is setup properly.
- $cdmaterials "models" ; from your QC seems wrong. try adding the necessary slashes in there, or put your material in a sub-folder of the materials folder and make sure you get the slashes right. The slashes are finicky. Forwards/backwards don't always work, and omitting them can break things.
SMDs are not required to have material path names embedded into them, only the materials name itself. There may be extra data from valve's internal pipeline, but that is not the standard way that the community compiles things, and it is definitely not what is messing you up.
"$basetexture" "models/tv_mat"
can you see the problem?
so when he writes:
cdmaterials "models"
source will look for his vmt in: game/materials/models
but unless he has placed his vmt in "materials/models" and his vtf in "materials/models/tv_mat" then his current setup won't work.
the basic workflow needsto be like this:
assign a material to your model, and your collision shapes, this material name is important, it'll be what you need to name your vmt. example: "television"
set up your qc, and put the folder path you want source to look for your vmt in. example would be: "models/props/tv" - this means source is going to look for this file:
"c:/program files/steam/steamapps/xXxSniPeR420SapHiRotH/counter-strike/css/materials/models/props/tv/television.vmt"
your vmt can then point to any vtf it likes, as source is only looking for the vmt in that specific folder.
Goddammit Im retarded