This article's documentation is for anything that uses the Source engine. Click here for more information.

$upaxis: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (Making use of the "this is a" template for the first line here, and some other misc improvements.)
Line 1: Line 1:
The [[$upaxis]] [[QC command]] tells StudioMDL which axis in the SMD file should be considered 'up'. The default value is <code>z</code>.
{{LanguageBar}}
{{this is a|QC command|name=$upaxis}} It tells [[StudioMDL_(Source)|StudioMDL]] which axis should be considered 'up' in the model files below it. This is sometimes necessary because not every modeling package treats <code>Z</code> as the up axis, such as [[Maya]]. If unspecified, the up axis s <code>Z</code>.


{{note|The command must be called before any animations - preferably on the first line of the QC.}}
{{note|The command affects only animations & models below it.{{tip|You can use this to incorporate animations from different sources, if necessary, by changing which axis is considered 'up' on the fly.}}}}
{{note|If necessary, it is possible to use negative values to indicate that the model should be rotated.}}
 
== Syntax ==
$upaxis <X|-X|Y|-Y|Z|-Z>


== Exporters ==
== Exporters ==
This command is mostly used by Valve for reorienting models created in Maya, which treats the Y axis as up unlike the game engine itself (and many other modeling packages), which use Z.


;Need $upaxis
;These exporters generally need $upaxis (Don't usually treat the Z axis as 'up'):
:Maya
:[[Maya]] (Y)
;Do not need $upaxis
;These exporters generally don't need $upaxis (Already treat the Z axis as 'up'):
:XSI
:[[Softimage Mod Tool|XSI]]
:3DS Max
:[[3DS Max]]
:MilkShape
:[[MilkShape 3D]]
:Blender
:[[Blender]]


== Usage ==
== See also ==
$upaxis [X|-X|Y|-Y|Z|-Z]
* [[Modeling]]


[[Category:QC Commands|U]]
[[Category:QC Commands|upaxis]]
[[Category:Maya]]
[[Category:Maya]]

Revision as of 17:30, 14 July 2024

English (en)Translate (Translate)

$upaxis is a QC command available in all Source Source games. It tells StudioMDL which axis should be considered 'up' in the model files below it. This is sometimes necessary because not every modeling package treats Z as the up axis, such as Maya. If unspecified, the up axis s Z.

Note.pngNote:The command affects only animations & models below it.
Tip.pngTip:You can use this to incorporate animations from different sources, if necessary, by changing which axis is considered 'up' on the fly.

Syntax

$upaxis <X|-X|Y|-Y|Z|-Z>

Exporters

This command is mostly used by Valve for reorienting models created in Maya, which treats the Y axis as up unlike the game engine itself (and many other modeling packages), which use Z.

These exporters generally need $upaxis (Don't usually treat the Z axis as 'up')
Maya (Y)
These exporters generally don't need $upaxis (Already treat the Z axis as 'up')
XSI
3DS Max
MilkShape 3D
Blender

See also