1
$\begingroup$

I have the following model:

enter image description here

In this configuration the model is positioned so that z is up. I want this, z up is the convention I use everywhere.

I try to export to gltf disabling the y up option:

enter image description here

But when i re-import the mdoel it seems as if -y is up:

enter image description here

How can I export the model such that z is up?

$\endgroup$

2 Answers 2

1
$\begingroup$

For what it's worth, the glTF specification defines +Y as "up" for the format. This was done (along with meter scale and +Z front) with the goal that assets from different sources would be compatible together in a scene. This is why the Blender importer presumes +Y up.

It's expected that glTF will auto-convert to any native system, for example convert glTF's +Y up to Blender's +Z up automatically during import. It may actually be inappropriate for the exporter to offer any option here to do anything other than automatically convert Blender's +Z up to glTF's +Y up on the way out, but removing an existing export option is always contentious, so it hasn't happened yet.

For reference: https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#coordinate-system-and-units

coordinate system screenshot

$\endgroup$
1
  • $\begingroup$ @trusktr Please don't add that section onto my answer here. Feel free to supply an answer of your own, if you like. But I don't recall seeing any Python code in the glTF importer that looks at the asset.generator value, and it would be inappropriate for an importer to do so. $\endgroup$
    – emackey
    Commented Jul 5 at 1:57
0
$\begingroup$

I think the way it works is GlTf always expects +Y Up when importing, and the +Y Up export option actually acts as a converter to +Y Up coordinates.

$\endgroup$
3
  • $\begingroup$ So there is no way to instruct blender to use z up when importing? $\endgroup$
    – Makogan
    Commented Jul 15, 2022 at 7:52
  • $\begingroup$ What I mean is, export with +Y Up enabled, and it will then import as +Z Up correctly $\endgroup$
    – Lauloque
    Commented Jul 16, 2022 at 7:35
  • $\begingroup$ @Makogan Set the GLTF file's asset.generator value to Khronos glTF Blender I/O v3.6.27 and Blender will then import a Y up asset (character would be facing downward in blender) as Z up (character will now be standing upright in blender). This is a really odd choice for any tool to apply transforms based on the asset.generator value. $\endgroup$
    – trusktr
    Commented Jun 27 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .