GLTF Exporter blender 3.2 and above flips the axis of rotation for exported camera transforms matrices #99306

Closed
opened 2022-06-30 23:09:39 +02:00 by Seth · 8 comments

System Information
Operating system: Windows
Graphics card: GTX 980

Blender Version
Broken: 3.3.0, 0ea282f74620, master, 2022-06-30
Worked: 3.1.2

Short description of error

Blender's gltf exporter forces the camera to face the wrong direction on export. There is an issue when +Yup is toggled off. The issue was first observed in 3.2 and persisted in 3.3 alpha.

To test and validate the issue with the camera rotation matrix, you can export a gltf from 3.1.2 and one from 3.3 alpha and import both gltf into the same scene. This test shows an error with the gltf exporter in Blender 3.3 alpha compared to 3.1.2 as it flips in the wrong direction on import into Blender.

image.png
image.png

Exact steps for others to reproduce the error
Attached files
You can use the supplied gltf or create your own using the below steps.
blender-exporter-files.zip

Steps for creating the gltf files to validate that there is an issue with the camera flipping do to gltf exporter

  • Open Blender 3.1.2 (use the default generic scene).
  • Hit A in the viewport to select all (not really required)
  • File -> Export -> gltf
    • gltf export settings
    • Format
      • gltf Embedded(.gltf)
    • Include
      • Cameras (Selected)
      • Punctual Lights (Selected)
    • Transform
      • +Y Up (Toggled off)
    • Geometry
      • UV (selected)
      • Normal (selected)
      • Vertex Colors (selected)
    • Use the default setting for the remaining options

image.png

  • Name the file
    • blender-3-1-2.gltf
  • Export gltf 2.0 with the above settings
  • Repeat the above steps but using Blender 3.3.0
    • Name new gltf
      • blender-3-3-0.gltf
        Testing the camera issue (using your own or supplied gltf files)
  • Open a new scene or use the existing Blender 3.1.2 or 3.3.0 scene
    • import gltf
      • blender-3-1-2.gltf
    • import gltf

      blender-3-3-0.gltf

See the visual difference in imported camera direction and settings.

**System Information** Operating system: Windows Graphics card: GTX 980 **Blender Version** Broken: 3.3.0, 0ea282f74620, master, 2022-06-30 Worked: 3.1.2 **Short description of error** Blender's gltf exporter forces the camera to face the wrong direction on export. There is an issue when +Yup is toggled off. The issue was first observed in 3.2 and persisted in 3.3 alpha. To test and validate the issue with the camera rotation matrix, you can export a gltf from 3.1.2 and one from 3.3 alpha and import both gltf into the same scene. This test shows an error with the gltf exporter in Blender 3.3 alpha compared to 3.1.2 as it flips in the wrong direction on import into Blender. ![image.png](https://archive.blender.org/developer/F13244012/image.png) ![image.png](https://archive.blender.org/developer/F13244015/image.png) **Exact steps for others to reproduce the error** **Attached files** You can use the supplied gltf or create your own using the below steps. [blender-exporter-files.zip](https://archive.blender.org/developer/F13244023/blender-exporter-files.zip) **Steps for creating the gltf files to validate that there is an issue with the camera flipping do to gltf exporter** - Open Blender 3.1.2 (use the default generic scene). - Hit A in the viewport to select all (not really required) - File -> Export -> gltf - **gltf export settings** - Format - gltf Embedded(.gltf) - Include - Cameras (Selected) - Punctual Lights (Selected) - Transform - +Y Up (Toggled off) - Geometry - UV (selected) - Normal (selected) - Vertex Colors (selected) - Use the default setting for the remaining options ![image.png](https://archive.blender.org/developer/F13244025/image.png) - Name the file - blender-3-1-2.gltf - **Export gltf 2.0** with the above settings - Repeat the above steps but using Blender 3.3.0 - Name new gltf - blender-3-3-0.gltf Testing the camera issue (using your own or supplied gltf files) - Open a new scene or use the existing Blender 3.1.2 or 3.3.0 scene - import gltf - blender-3-1-2.gltf - import gltf # blender-3-3-0.gltf See the visual difference in imported camera direction and settings.
Author

Added subscriber: @sethnykamp

Added subscriber: @sethnykamp
Seth changed title from GLTF Exporter 3.2 and above flips the axis of rotation for exported camera transforms matrices to GLTF Exporter blender 3.2 and above flips the axis of rotation for exported camera transforms matrices 2022-06-30 23:11:30 +02:00
Member

Added subscriber: @JulienDuroure

Added subscriber: @JulienDuroure
Julien Duroure self-assigned this 2022-07-01 06:23:00 +02:00
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Confirmed.
(Note that turning Yup off is mostly for debugging, as it generate non valid glTF files)

Confirmed. (Note that turning Yup off is mostly for debugging, as it generate non valid glTF files)

This issue was referenced by 9c39b79cdc

This issue was referenced by 9c39b79cdcadf7ea700c92bc4f641138a6ff03e1

This issue was referenced by 849e7196eb

This issue was referenced by 849e7196eb4ee7bc5ca8a5644da49ffbd3ff3c97
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Author

Thank you for the speedy reply and fix. Good to know that "Yup off is mostly for debugging, as it generate non valid glTF files".

Thank you for the speedy reply and fix. Good to know that "Yup off is mostly for debugging, as it generate non valid glTF files".
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#99306
No description provided.