Hammer doesn't like my model
Post Reply
Quote
Re: Hammer doesn't like my model
Posted by SnarkSephiroth on Wed Jun 20th at 5:47am 2007


Well I am having a very frustrating problem with Hammer. I made a custom model of a birthday cake and whenever I make a prop_phys entity and assign it my cake model, the editor crashes. What am I doing wrong here? Heres the error:

image

It looks like its asking about a VMF. Now I don't have any VMF's for it all I have is a VMT for it in my hl2/materials/model folder.




Quote
Re: Hammer doesn't like my model
Posted by Dark_Kilauea on Wed Jun 20th at 6:13am 2007


Could we see your vmf code please?

And maybe the qc file could help too.



Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/



Quote
Re: Hammer doesn't like my model
Posted by SnarkSephiroth on Wed Jun 20th at 6:56am 2007


Heres my qc file. I'm not sure if its set up right, it was kinda a copy and paste deal from a tutorial:

$modelname "models/cake.mdl"
$scale 1.0

$cd "."
$body "Body" cake_ref.smd
$cdmaterials "materials/models" //This must be the location of your VMT texture file relevant to the materials folder as before

// 1 sequence
$sequence idle "cake_idle" fps 5 ACT_IDLE 1

$surfaceprop "flesh"

$keyvalues { "prop_data" {"base" "flesh.small" }


$collisionmodel "cake_phys.smd" {
// Mass in kilograms

$concave
$mass 5.0
}

As for the the VMF, I don't have a VMF for the model, just a VMT file and here is all that is in that file:

"VertexLitGeneric"
{
"$basetexture" "models/cakeSkintest1"
"$bumpmap" "models/cakeSkintest1_normal"
}

Hope this helps.




Quote
Re: Hammer doesn't like my model
Posted by Riven on Wed Jun 20th at 4:46pm 2007


Hmm, well, first off I think you're referring to a .vtf instead of a .vmf, which would be the file Hammer reads for compiling maps. Besides, any & every texture in Source needs to have a .vtf along with it. Just take the .tga you're using to UV map your model and drag it over vtex.exe. It'll automatically create for you your .vtf file.

The error is asking about the .vmf but that's because Hammer is crashing, so doesn't necessarily mean something is wrong with your map.

Now for the .qc file...

For $modelname, if your model is under the model's folder, then you shouldn't need to list "model/cake.mdl" just "cake.mdl" unless your .mdl is within a subfolder named "model" that is under the original folder named "model" under the hl2 folder. Then you would list the subfolder.

For $cdmaterials, same concept, you shouldn't need to list the "materials" folder. However, you DO need to list the "models" folder because it is a subfolder under materials.

I don't know if that will have an effect or not, cause I've had past problems with .qc files, and stuff like that sometimes would help.

I would try opening it first in Modelviewer instead of Hammer, after all, that's what it's for! See if any issues come up there.







Quote
Re: Hammer doesn't like my model
Posted by SnarkSephiroth on Wed Jun 20th at 9:52pm 2007


I see what your saying about the .vmf, I got confused. But I do have a .vtf for the model. I actually have 2. One for the regular texture and one for a normal map.

They are in my half-life2/hl2/materials/models folder. Screenshot:

image

My .qc file is in my sourcesdk_content/hl2/modelsrc folder. Screenshot:

image

? quote:
For $modelname, if your model is under the model's folder, then you shouldn't need to list "model/cake.mdl" just "cake.mdl" unless your .mdl is within a subfolder named "model" that is under the original folder named "model" under the hl2 folder. Then you would list the subfolder.


It is in a subfolder called models in the models folder. So it looks like this:

half-life2/hl2/models/models/cake.mdl

I'll change the $cdmaterials line in the .qc to see if that helps.

Also I can see my model in HLMV. So I don't know. It just seems like Hammer can't see my model. Thanks for the help man!




Quote
Re: Hammer doesn't like my model
Posted by Dark_Kilauea on Wed Jun 20th at 10:01pm 2007


Does this line: $cd "." need to be there? Try removing it.


Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/



Quote
Re: Hammer doesn't like my model
Posted by fishy on Wed Jun 20th at 10:30pm 2007


the %keyvalues line looks a bit odd, with only having the one closing bracket. i would have expected the model compile to fail because of that.


i eat paint



Quote
Re: Hammer doesn't like my model
Posted by SnarkSephiroth on Thu Jun 21st at 10:15pm 2007


I did what you guys told me to do, but it didn't fix it. I'm kinda lost now lol. Not sure what the problem could be because HLMV can see the model, but not Hammer.




Quote
Re: Hammer doesn't like my model
Posted by Riven on Fri Jun 22nd at 2:50am 2007


Could you upload the model for us to try? Unless you have a problem with that or something.





Quote
Re: Hammer doesn't like my model
Posted by SnarkSephiroth on Fri Jun 22nd at 6:04am 2007


Lol, not at all. Its nothing special so I could definitly upload it. What all do you need?

.vtf's
.mdl
.qc
.vmt

Anything else?




Quote
Re: Hammer doesn't like my model
Posted by Riven on Fri Jun 22nd at 3:19pm 2007


Perhaps also the VTX files, the VVD files and the PHYs files that go along with it? And perhaps even the .smd files incase it may be a problem with the way the model was constructed? Of course that would be treading into having problems with the modeling suite, not Hammer; so those are at your own discretion. May I ask what modeling program you used?







Quote
Re: Hammer doesn't like my model
Posted by SnarkSephiroth on Mon Jun 25th at 1:39am 2007


Sorry was out of town, I used the XSI modelling tool. Oh and where can I host these files so I can upload them?





Post Reply