Skip to content
Bill Currie edited this page Apr 7, 2020 · 2 revisions

Modeling For KSP

The biggest issue with modeling for KSP in Blender is Unity (and thus KSP) is left-handed while Blender is right handed. This means that the Y and Z axes are swapped. However, the exporter has been written to take care of this for you: it converts all vectors and rotations between the two systems. Up in Blender is up in KSP, and right (+X) in Blender is right in KSP. Forward is the same, too. Even animated rotations will rotate the same in both Blender and KSP. Certain objects (directional lights, cameras, empties used for attach nodes) are given special treatment such that when the object is correctly oriented in Blender, it will be correctly oriented in KSP.

The second biggest issue (and this is common to the Blender community, not limited to KSP) is the "parent inverse matrix". When creating a parent-child relationship between objects, Blender makes it so the child object's location, rotation and scale are absolute (ie, are world coordinates) rather than local to the parent object's frame of reference. While this usually eases manipulating the child object via the coordinate inputs in the N-panel, it can make a mess of animations (thus affecting the Blender community) and causes KSP models to be exported incorrectly (because Unity does not support the parent inverse matrix). The solution to this is to clear the parent inverse matrix prior to export (or animating if applicable). Fortunately, once cleared, the parent inverse matrix stays clear. Unfortunately, the default way of clearing the matrix (via "Clear Parent Inverse" in the "Clear Parent" menu (alt-p p is the shortcut) is both tedious and error prone: Blender only clears the matrix, it doesn't fix up the child object's local coordinates, resulting in the child object potentially jumping to unexpected locations and orientations. To this end, io_object_mu provides a means to safely clear the parent inverse matrix: Clear Inverse in the tools panel (screw driver and wrench icon). This command recurses through the hierarchy from the selected object, clearing the inverse and adjusting the local coordinates such that child objects maintain their visual aspects.