glTF exporting with +Y Up adds rotation to camera #105388
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#105388
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: macOS-14.3-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M2 1.2
Blender Version
Broken: version: 4.1.1, branch: blender-v4.1-release, commit date: 2024-04-15 15:11, hash:
e1743a0317bc
Worked: (newest version of Blender that worked as expected)
Short description of error
When exporting a scene to a .glb file with options
the camera node has an added 90° rotation (and not the others nodes)
Exact steps for others to reproduce the error
In the attached .blend file, the scene has 2 objects, a camera and a cube along the Z axis, and no rotation
First, watch the .glb file without "+Y Up"
File > Export > glTF 2.0 (.glb/.gltf), on the right side of the window
See the JSON chunk in the exported file (using cmd
strings
) and look for the "nodes" propertySecond, redo the previous steps with "+Y Up" checked
Notice how the "translation" coordinates changed as expected, however the camera has an additional rotation which should not be here (for comparison, the cube doesn't have one)
This is not a bug. The rotation is correct. It corrects for the differing convention between Blender and glTF in which axis the camera points along.
You can open the glTF in a viewer like https://gltf-viewer.donmccurdy.com/ and check that the Camera is indeed looking at the correct place. If there were no rotation, it would be wrong.
I wouldn't call it a bug (i tested it with blender 4.1), at least not when i view the models in blender after reimport (i modified the shape a bit to highlight the orientations).
+Y-Up checked:
+Y-Up not checked:
If i would delete the x rotation the camera would face away:
What confuses me most is why
"rotation":[-0.7071068286895752,0,0,0.7071068286895752]
instead of the simpler"rotation":[1,1,0,0]
, as both should yield the same results. Probably due to the location, but currently don't want to do the quaternion math to check.What a quick reactions, indeed it is not a but!
I've been confused with the swap of axis, reading your responses helps me to better understand how exporting is handled.
Thx!