My broken HL2 model
Post Reply
Quote
Re: My broken HL2 model
Posted by grnade on Tue Jun 7th at 3:21am 2005


Okay, so I modeled in maya, used a TGA for texture and all, and this is what I get in Hammer (I get nothing in game):




This is what my QC file looks like:

Code:

$modelname column.mdl
$cdmaterials materialsrc
$scale 1.0
$staticprop
$body studio "column.smd"
$sequence idle "column" loop fps 15
$collisionmodel "column.smd"
{
$Mass 1000
$concave
}

Any ideas?





Quote
Re: My broken HL2 model
Posted by fishy on Tue Jun 7th at 3:48am 2005


i dunno anything about maya, but your tga texture needs to be converted to a .vtf filetype(and coresponding .vmt file) before hl2 can use it. once you do that, change the value of $cdmaterials in your qc file to the folder, relative to your mods materials folder, that you saved your compiled texture to.


i eat paint



Quote
Re: My broken HL2 model
Posted by grnade on Tue Jun 7th at 3:52am 2005


ok, so is that the reason im getting that funky globe?




Quote
Re: My broken HL2 model
Posted by fishy on Tue Jun 7th at 5:03am 2005


i don't think so. the globe looks like the fade distance helper, which is part of hammers bag of tricks.

what size is the bounding box for the 'model' in the 2d view? if it's huge, you might find your column in one of its distant corners.

i've never managed to compile a model that didn't have any polys, so there must be something somewhere.




i eat paint



Quote
Re: My broken HL2 model
Posted by grnade on Tue Jun 7th at 5:10am 2005


Hmm

it appears as though the bounding box is less than 1 unit. That is, in the 2d views I see no bounding box but the handles for the bounding box surround something that has a size less than 1 unit. So maybe it has no bounding box? did i do something wrong with my qc file or is it more likely in maya where i screwed up?




Quote
Re: My broken HL2 model
Posted by fishy on Tue Jun 7th at 12:41pm 2005


the qc looks basic but usable, so i'd be thinking maya. try changing the $scale value in the qc to 100, and compile it again. if the original is there but just too small to see, then increasing the $scale should enlarge it enough to make it visible.




i eat paint



Quote
Re: My broken HL2 model
Posted by grnade on Wed Jun 8th at 1:58am 2005


Hmm, nope still does the same thing.

Could it be because I didnt add any bones to it or something?

All I did in maya is make the mesh, triangulate it, and attach the skin, then export it.




Quote
Re: My broken HL2 model
Posted by fishy on Wed Jun 8th at 3:35am 2005


if maya lets you export .smd's without bones in them, then it needs a good slapping.


i eat paint



Quote
Re: My broken HL2 model
Posted by SnarkSephiroth on Wed Jun 8th at 6:05am 2005


You did use the prop_static entity didn't you? If not that could be the problem. Just a suggestion.





Quote
Re: My broken HL2 model
Posted by fishy on Thu Jun 9th at 12:14pm 2005


even though using a proptype other than static_prop would get the model dropped during the compile, it would still show up in hammer, so i think we can exclude that.

grnade, i've never used maya, but i remember someone saying that it had some exporting bugs, so, when i seen this i remembered you. it says it has a bugfix for $staticprop, so maybe it can help in some way.




i eat paint



Quote
Re: My broken HL2 model
Posted by grnade on Fri Jun 10th at 2:24pm 2005


Well, I just tried to add two joints and to make a skeleton for the model, but compiled and got the same thing.

When I open the model up in HL model viewer and click bones, it says "None". So maybe I'm not doing the bones right.

I'll try that fixed exporter when I get home, although I believe thats the same one that I have.

It could also be that the texture is not in VTF format yet, its in TGA still. I dunno.






Quote
Re: My broken HL2 model
Posted by Quaver on Fri Jun 10th at 2:39pm 2005


Its not because you havent done the texture yet, it would still display the model but with the checkered texture. When you compile the model do you get any error come up in the command promp box, or does it go through it to fast to see?




Quote
Re: My broken HL2 model
Posted by im.thatoneguy on Wed Jul 20th at 5:21am 2005


? quoting grnade

This is what my QC file looks like:

Code:

$modelname column.mdl

$cdmaterials materialsrc

$scale 1.0

$staticprop
$body studio "column.smd"

$sequence idle "column.smd" loop fps 15

$collisionmodel "column.smd"

{

$Mass 1000

$concave

}


Any ideas?

Note added ".smd". I don't know if it's necessary but I've always added it.

A bit more information would be helpful:
First dozen lines of the SMD file (It can be opened in notepad)
MDLcompile log.

THIS is very important: Did you apply a texture map INSIDE of Maya? If not, pop a texture on there and it should work, even if you don't have a VTF, the SMD requires a texture name on the model.

Is the Model triangulated? Usually the model needs to triangulated before exporting to SMD.

Does it show up in the Source Model Viewer?





Quote
Re: My broken HL2 model
Posted by Meotwister on Thu Jul 21st at 7:09pm 2005


yeah, I have the exact same problem as grnade. As I mistakenly double posted last night at 3am.

My bounding box for my model is REALLY HUGE. It almost takes up the entire grid for hammer. Grnade you should scroll all the way out to check and see if your bounding box is not that huge.

I compiled my model first in 3dsmax using HL2 Max Tools. The compile seem to do everything normally but then this happens in hammer. I also tried to just throw the .qc on studiomdl and the same thing happened. I'll post my mdlcompile.log. Also, model does not show up in ModelViewer.

Well, if there's a mdlcompile.log I don't know where it is but here's the first dozen lines of my .smd file.

version 1
nodes
0 "Cylinder02" -1
1 "Bone01" -1
2 "Bone02" 1
end
skeleton
time 0
0 0.000000 -0.000003 59.550690 -0.000000 0.000000 0.000000
1 -0.000000 -0.137315 0.066303 0.000000 -1.570796 0.000000
2 9.927567 -0.000002 0.000000 0.000000 0.000001 0.000001
end




Quote
Re: My broken HL2 model
Posted by Meotwister on Fri Jul 22nd at 12:37am 2005


This is what my compile log thing says.
image
After much searching for answers on many other forums, the only thing I'm left with to check is that maybe my smd exporter (one for 3dsmax 6) isn't good to use on 3ds max 7.




Quote
Re: My broken HL2 model
Posted by Meotwister on Fri Jul 22nd at 3:07am 2005


well, what do ya know! That was the problem!

the .smd exporter I was using didn't work properly on 3ds Max 7. It's only for 3ds Max 6 and lower i guess.

I found a link to Cannonfodders 3ds Max 6/7 exporter and it works perfectly so if you have a problem like this use cannonfodders .smd exporter.






Quote
Re: My broken HL2 model
Posted by im.thatoneguy on Fri Jul 22nd at 4:31am 2005


Yeah CannonFodder's is the best. You can just SAVE it to an SMD.

Also that wasn't the part of the SMD that was important LOL. Sorry, Ok... post until the lines are all very similar.

"Verticies 0bytes"

You don't have a mesh to be compiled, something went wrong during the SMD saving process.

After time there should be a list of all of your triangles: I.E.
"

triangles
phy.bmp
0 9.552400 3.622101 -9.982200 0.0 0.0 0.0 1 0
0 9.552400 3.622101 9.857200 0.0 0.0 0.0 1 0
0 -9.792500 3.622099 -9.982200 0.0 0.0 0.0 1 0
phy.bmp
0 9.552400 3.622101 9.857200 0.0 0.0 0.0 1 0
0 -9.792500 3.622099 9.857200 0.0 0.0 0.0 1 0
0 -9.792500 3.622099 -9.982200 0.0 0.0 0.0 1 0

"

Along with a texturename. If there is no texture name you didn't follow the tutorials properly that are associated with your SMD exporter.





Quote
Re: My broken HL2 model
Posted by Meotwister on Fri Jul 22nd at 7:50am 2005


here's what i got that's like your's:
triangles
trin_garbagecan.psd
1 11.1789 -0.0003 41.9041 -0.0000 0.0000 1.0000 -2.0315 1.6845 1 1 1.000
1 10.5047 3.8230 41.9041 0.0000 0.0000 1.0000 -2.2025 1.6544 1 1 1.000
1 1.9366 11.0086 41.9041 0.0000 0.0000 1.0000 -2.0631 1.2712 1 1 1.000
trin_garbagecan.psd
1 1.9366 11.0086 41.9041 0.0000 0.0000 1.0000 -2.0631 1.2712 1 1 1.000
1 10.5047 3.8230 41.9041 0.0000 0.0000 1.0000 -2.2025 1.6544 1 1 1.000
1 8.5635 7.1852 41.9041 -0.0000 -0.0000 1.0000 -2.3529 1.5676 1 1 1.000

should it say 'trin_garbagecan.psd'? instead of like .tga or something.
Now, I have a new problem smiley
I can see the model in hammer but not ingame or in modelviewer. In hammer it's checkered.
I've messed with the $cdmaterials line a bunch too and can't get it working.
Here's my revised .qc :
$modelname trin_trashcan.mdl

$scale 1.0

$body "Body" trin_trashcan_ref.smd

$staticprop

$sequence idle "trin_trashcan_ref" fps 30 ACT_IDLE 1

$surfaceprop "concrete"

$cdmaterials "modelstrashcan"

$collisionmodel "trin_trashcan_phys.smd"
{

$concave
$mass 200
}




Quote
Re: My broken HL2 model
Posted by Meotwister on Fri Jul 22nd at 5:55pm 2005


I FINALLY GOT IT FIXED!!!!!!

I use cannonfodders .smd exporter to fix the first prob, now i use his studiomdl program and EVERYTHING'S FIXED!!!!!!

many thanks go out to everyone who helped me in my time of need.

THANK YOU!!!





Post Reply