$definebone: Difference between revisions
(more info) |
Mick-a-nator (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
== How To == | == How To == | ||
How to | How to generate $definebone data from an existing model: | ||
{{note|Before you start, '''do not''' separate out the shared animations. You need to leave them all in the same .QC file before you start since studiomdl will optimize out all the bones that it doesn't think are animating.}} | {{note|Before you start, '''do not''' separate out the shared animations. You need to leave them all in the same .QC file before you start since studiomdl will optimize out all the bones that it doesn't think are animating.}} | ||
# | # Decompile the mdl file containing bone data (not the animation mdl) | ||
# | # Place the resultant qc file in ''...\USERNAME\sourcesdk\bin\orangebox\bin\'' | ||
# | # Using which ever method you prefer, run studiomdl with the following parameters ''-definebones mdldecompile.qc > sharedbones.qci''. ''sharedbones.qci'' will be created in the same folder as ''studiomdl'' | ||
# | # Open ''sharedbones.qci'' and remove all lines that do not begin with ''$definebone'' | ||
GUIStudioMDL can also be used to generate the $definebone data, but placing the data into the file has to be done manually. To do this simply load the qc file and tick the "Define Bones" check box at the bottom. | |||
{{warning|Errors can occur in the resulting text, but they are easily noticeable and fixed.}} | |||
[[Category:QC Commands|definebone]]__NOTOC__ | [[Category:QC Commands|definebone]]__NOTOC__ |
Revision as of 09:59, 8 May 2011
Defines a bone outside of any .smd source. This is useful when building animation only mdl's that would otherwise optimize out all the bones since none of them are connected to any geometry or attachment points. You can get studiomdl to dump this out using the "-definebones"
command line option.
The (fixup) fields specify how the IK solver has rotated any of the bones to match the single X axis as the long axis requirement for all bones in an IK chain. All the source animations are resolved to match this new orientation.
This command is run before any $hierarchy commands.
Syntax
$definebone (name) (parent) (X) (Y) (Z) (xr) (yr) (zr) (fixup XR) (fixup YR) (fixup ZR)
How To
How to generate $definebone data from an existing model:

- Decompile the mdl file containing bone data (not the animation mdl)
- Place the resultant qc file in ...\USERNAME\sourcesdk\bin\orangebox\bin\
- Using which ever method you prefer, run studiomdl with the following parameters -definebones mdldecompile.qc > sharedbones.qci. sharedbones.qci will be created in the same folder as studiomdl
- Open sharedbones.qci and remove all lines that do not begin with $definebone
GUIStudioMDL can also be used to generate the $definebone data, but placing the data into the file has to be done manually. To do this simply load the qc file and tick the "Define Bones" check box at the bottom.
