Exporting to MDL with MilkShape? Created 17 years ago2006-06-27 02:41:44 UTC by Biax Biax

Created 17 years ago2006-06-27 02:41:44 UTC by Biax Biax

Posted 17 years ago2006-06-27 02:41:44 UTC Post #187074
Hey, I'm working on some models, and I want to export to .mdl format. The only option is .smd format. So I fiddled a bit, exported a .smd, generated a .qc and tried to get the right values in there, and compile it, but I really have no solid idea of what I'm doing.
Could anyone give me an idea, or point me to a tutorial or something? I'd appreciate it. :
Posted 17 years ago2006-06-27 03:42:05 UTC Post #187077
I really have no idea about modeling, but there's some tutorial here on TWHL, and I think it might have what you're looking for... Maybe. :)
Posted 17 years ago2006-06-27 05:29:18 UTC Post #187092
Decompile an existing mdl model. And then place your model over the other model and delete the other model. Assign your new model to a joint and then export it as smd. Compile now =)
Posted 17 years ago2006-06-27 06:45:30 UTC Post #187097
I dont seem to be able to decompile either. I tried decompiling the zombie model and nothing happened...no files created??
Posted 17 years ago2006-06-27 15:26:30 UTC Post #187157
Decompiling should work, really.

Anyway, here's a typical .qc file with some additional comments, I hope that explains all you need to know.
As for .smd files, there are two types of em: one contains the mesh data, the actual model shape, the other contains animation data. A model should always have at least one animation, even when it'll never moves - the animation then simply is just pretty empty. You'll be given the choice between mesh and animation .smd when exporting, so that shouldn't be a problem. Ok, onto the .qc file:

[quote]// output model name, smd and texture pathnames
$modelname "C:SIERRAHalf-Lifevalvemodelsoutputmodelname.mdl"
$cd "smd_directorysubdir"
$cdtexture "skins_directorysubdir"

// dunno what this was for exactly...
$cliptotextures

// just in case you want to scale up the model
// scaling up the skeleton in Milkshape would mess up all animations
$scale 1.0

// attachments, only usefull if you've got custom code that uses these
$attachment 0 "bone_name1" 20.000000 2.000000 5.000000
$attachment 1 "bone_name2" 20.000000 2.000000 5.000000

// bone controllers, these can be directly controlled by the gamecode
// think of facing upwards/downwards
$controller 0 "bone_name" XR -30 30
$controller 1 "bone_name1" XR -30 30

// hit boxes, again only really for models used by gamecode
$hbox 0 "bone_name" -4.690000 -4.440000 -6.750000 4.000000 5.560000 6.750000

// the smd filename that contains the mesh
$bodygroup body
{
studio "mesh_smd"
}

// sequences, first the sequence name, then the sequence smd filename, then some engine-specific info
// like speed and gamecode tags (for example, ACT_IDLE will be used as an idle animation,
// ACT_IDLE 1 and ACT_IDLE 4 will be used randomly, where ACT_IDLE 4 has a lower use frequency I believe)
$sequence anim_name "anim_smd" loop fps 14 ACT_IDLE 2
$sequence idle "idle" loop fps 14 ACT_IDLE 1
$sequence deep_idle "deep_idle" loop fps 12 ACT_IDLE 4 [/quote]

So essentially, a model that will only be used as a static detail would have a .qc file like this:

[quote]
$modelname "C:SIERRAHalf-Lifevalvemodelsoutputmodelname.mdl"
$cd "smd_directorysubdir"
$cdtexture "skins_directorysubdir"

$cliptotextures

$scale 1.0

$bodygroup body
{
studio "mesh_smd"
}

$sequence anim_name "anim_smd" loop fps 14 ACT_IDLE
[/quote]
Posted 17 years ago2006-06-28 02:47:31 UTC Post #187251
Oh, I didnt have any keyframes set in the animation. I set that. This is the error message I get when I try to compile:

"grabbing blood mod/clawHammer(ref).smd
grabbing blood mod/hammer_seq.smd
********** ERROR **********
blood mod/ist2_802833_hammer_with_characte not found"

:zonked:
Posted 17 years ago2006-06-28 16:24:04 UTC Post #187353
Can you post the content of your .qc file, as well as describing what files exactly you exported, and with what options?

EDIT: How do you compile? Using the built-in-Milkshape compiler, I assume?
You must be logged in to post a response.