texture not compiling with model Created 14 years ago2010-07-30 00:42:25 UTC by quailcreek quailcreek

Created 14 years ago2010-07-30 00:42:25 UTC by quailcreek quailcreek

Posted 14 years ago2010-07-30 00:42:25 UTC Post #283616
I went through the steps to compile a model, and openned up HLMV to find that the texture wasn't there. It was just the purple/black checker texture instead. Here are the steps I did:

-put TGA in sourcesdk/materialsrc/models/
-applied and UV mapped TGA in modeller
-compiled TGA with vtex
-made VMT in same directory as VTF
-exported ref SMD to sourcesdk/modelsrc/models/
-made QC in same directory as SMD
-compiled QC with studiomdl

I came up with a bad collision box error in studiomdl, but I know how to fix that and it shouldn't be a part of the problem I don't think. Help appreciated.
Posted 14 years ago2010-07-30 11:42:48 UTC Post #283626
We need to see the contents of your .QC and .VMT. The steps you posted look just fine to me. I'm betting my money on the possibility that there's a syntax error somewhere in one of those two files.
Posted 14 years ago2010-07-30 23:31:32 UTC Post #283633
doh.

[quote]VertexLitGeneric
{
$baseTexture models/md_gear00/tex_gold_dust_drk00
}[/quote]
$modelname md_gear00/md_gear00.mdl
$body body "md_gear00_ref.smd"
$staticprop
$cdmaterials models/md_gear00
$sequence idle "md_gear00_ref.smd" fps 1
^there are tabs between parameter/value in the qc.

edit: not that it matters, I know.
Posted 14 years ago2010-07-31 00:10:22 UTC Post #283653
... Weird. That should be working fine. My only guess is that the file path for $cdmaterials should be in quotations. Also, make sure the .VMT is actually found in the folder that $cdmaterials references, and make sure the .VTF that the .VMT references is in its respective folder, as well.

On a side note (time for a bit of teaching!), the .VTF doesn't actually need to be in the same folder that $cdmaterials calls for; all that needs to be there is the .VMT, with it referencing the file path to wherever the .VTF is stored. This is pretty handy for storing and organizing your texture and material files in whatever way you'd like, and allows for a single texture file to be referenced by several .VMTs, eliminating the need for any duplicate .VTFs.

If you still can't get the confounded thing working after some troubleshooting, you can always host the source files and I can take a look at getting them compiled.
Posted 14 years ago2010-07-31 21:47:34 UTC Post #283672
I've tried your suggestion with the quotes, and made sure all the references are correct. No luck. I just don't get it. Is it possible that something's going wrong when I compile the texture?

Maybe I can get a hold of a sample model, complete with all the source files, to compare with? If anyone would like to unpload this for me, I'd be very grateful.

I appreciate you offering to compile this for me, but I'd much prefer to figure out what I'm doing wrong and correct it. I'm going to be making a lot of models in the near future, and sending them all off to someone else to compile would be very impractical. Btw, this is my first Source model.
Posted 14 years ago2010-07-31 22:00:01 UTC Post #283674
if you upload it, we can figure out the problem, and tell you how to fix it
$modelname md_gear00/md_gear00.mdl
$body body "md_gear00_ref.smd"
$staticprop
$cdmaterials models/md_gear00
$sequence idle "md_gear00_ref.smd" fps 1
Why are you using the reference model as your animation model?

This is what it should look like
$modelname "props\items\mos_bluebottle01.mdl"
$body mybody "bluebottle_ref.smd"
$staticprop
$surfaceprop Glass
$cdmaterials "models\props\items"

$sequence idle "redbottle_idle.smd" loop fps 15

$collisionmodel "redbottle_phys.smd" { $concave }
and you also need a hitbox, or phys model in source models.
Posted 14 years ago2010-07-31 22:32:01 UTC Post #283677
Don Punch: Upload what exactly? The XSI scene file? Texture? SMD? VMT? VTF? QC? All of the above? Since my compiles are succeeding (or appear to be), I'm not sure how uploading any of that will help. But I'd be happy to upload any/all of that, I just need to know what to upload.

The model isn't animated, but according to this article,
All models must have at least one $sequence, even if they aren't actually animated!
and this tutorial says
For a static prop, there's no movement so the "idle" model is the same as the reference model.

. . .

$sequence idle "sec_cam_ref.smd" fps 1
Also, I assumed that a phys model wasn't necessary since the first article I cited doesn't explicited say that it is. But if it is necessary, it seems from the tutorial I cited that the refence model will suffice for this as well:
For a prop_static model, only the reference file is needed

. . .

$collisionmodel "sec_cam_ref.smd" {
$Mass 20
}
I'll try adding a phys model and see if that solves it.

Edit: Tried it, still no luck. The line I added was:

$collisionmodel "gear_y_lg00_ref.smd" { $mass 1 }

Note: I've changed the model name since I last pasted my QC.
Posted 14 years ago2010-07-31 22:33:47 UTC Post #283678
For reference, here is my updated VMT and QC:

[quote]VertexLitGeneric
{
$basetexture	models/gear_y_lg00/tex_gold_y00
$bumpmap	models/gear_y_lg00/tex_gold_y00_normal
}[/quote]
$modelname "gear_y_lg00/gear_y_lg00.mdl"
$body body "gear_y_lg00_ref.smd"
$staticprop
$cdmaterials "models/gear_y_lg00"
$sequence idle "gear_y_lg00_ref.smd" fps 1
$collisionmodel "gear_y_lg00_ref.smd" { $mass 1 }
Posted 14 years ago2010-07-31 23:50:39 UTC Post #283680
It occured to me that you may've meant upload the MDL file. It is here. I ran the program MDLTextureInfo on it, which verified that the right .vmt file is referenced. The program even says the model has 1 texture. But it won't show up for anything!
Posted 14 years ago2010-08-01 01:30:13 UTC Post #283681
Why are you using the reference model as your animation model?

This is what it should look like
Have you ever compiled a model before? It really doesn't matter.
Crollo CrolloTrollo
Posted 14 years ago2010-08-01 17:44:58 UTC Post #283733
So, any further ideas? If I get this working, there's a chance I'll have a competition entry in time. Otherwise there's no chance.
Posted 14 years ago2010-08-01 19:53:40 UTC Post #283748
Have you ever compiled a model before? It really doesn't matter.
Yes, have you?

a reference model is the actually polygons, the animation smd is animation info
version 1
nodes
0 "polymsh2" -1
end
skeleton
time 0
0 0.000000 0.000000 0.000000 1.570796 -0.000000 0.000000
end
If you are using xsi, make sure to change the drop down menu to the correct file type when exporting your smds.
Posted 14 years ago2010-08-01 20:05:12 UTC Post #283750
Don Punch, nothing you've said in this thread has anything to do with the problem. And as an aside, did you read the citations in my reply to you?
Posted 14 years ago2010-08-01 20:59:35 UTC Post #283751
a reference model is the actually polygons
And it also contains bone information, and that's all a sequence needs.

Ever opened a reference .smd in notepad and checked out what it looked like?

Anyways, this is all irrelevant, I'll cease posting in here as i have no help to offer to the OP.
Crollo CrolloTrollo
Posted 14 years ago2010-08-02 18:18:29 UTC Post #283812
Problem solved. As ridiculous as this sounds, the problem was that I was right-clicking the MDL after compile and selecting Open With > HLMV, instead of openning HLMV from Source SDK and navigating to my MDL. Shouldn't make a difference, of course. But with Steam, there's no telling.

This really is a solid testiment to how Steam just gets in the way. Aside from the unpredictability of how automatic updates may fuck up a tool or file at any time, you shouldn't have to have a software distribution program running in order to do your work, and you shouldn't have to nagivate through 7 or 8 subdirectories to get to the folders you need. You should have freedom to set up a directory structure of your choosing based on your prefered workflow, and the freedom to only have the applications/processes you need at a given time running. Tell me I'm not the only one here who understands that the development process really has nothing to do with the Steam platform, and that the restrictions Steam enforces are just unnecessary.
You must be logged in to post a response.