$definebone: Difference between revisions
Jump to navigation
Jump to search
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.
mNo edit summary |
(more info) |
||
Line 1: | Line 1: | ||
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 <code>"-definebones"</code> 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) | $definebone (name) (parent) (X) (Y) (Z) (xr) (yr) (zr) (fixup XR) (fixup YR) (fixup ZR) | ||
[[Category:QC Commands]] | == How To == | ||
How to split out the bones used in the 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.}} | |||
# Bring up a command line. | |||
# Go to the directory of your QC file. | |||
# Type <code>studiomdl -definebones ''yourfilename.qc'' > sharedbones.qci</code>. This will create a text file named <code>sharedbones.qci</code>. This file will contain all the bones that studiomdl would normally leave in your .MDL since it detected that they both animate and are connected to a vertex or used by an attachment point. | |||
# Edit <code>sharedbones.qci</code> in a text editor and remove all of the extraneous text that isn't part of the <code>$definebone</code> definitions. | |||
# Edit your .QC files and split out the animations from the model .QCs into separate files. Include the <code>sharedbones.qci</code> file in both. | |||
[[Category:QC Commands|definebone]]__NOTOC__ |
Revision as of 14:29, 28 April 2008
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 split out the bones used in the model:

- Bring up a command line.
- Go to the directory of your QC file.
- Type
studiomdl -definebones yourfilename.qc > sharedbones.qci
. This will create a text file namedsharedbones.qci
. This file will contain all the bones that studiomdl would normally leave in your .MDL since it detected that they both animate and are connected to a vertex or used by an attachment point. - Edit
sharedbones.qci
in a text editor and remove all of the extraneous text that isn't part of the$definebone
definitions. - Edit your .QC files and split out the animations from the model .QCs into separate files. Include the
sharedbones.qci
file in both.