-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Change scaling mode to FixedHorizontal #4055
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me, I just don't know if anyone uses gltf for 2D and sprites so the change from CAMERA_2D
to CAMERA_3D
could be controversial. It makes sense to me though.
I don't think it really makes sense to use gltf for 2D... |
9ca3718
to
ccad2ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not specify left
/right
/top
/bottom
when scaling_mode
is ScalingMode::FixedHorizontal
.
ccad2ea
to
bd2b6b0
Compare
Co-authored-by: François <mockersf@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. And I saw the discussion in Discord and that it has been tested, exporting a scene with an orthographic camera from current Blender to glTF and it looks correct.
bors r+ |
# Objective - Fixes the issue with orthographic camera imported from glTF not displaying anything (mentioned in #4005). ## Solution - This was due to wrong scaling mode being used. This PR simply changes WindowSize scaling mode to FixedHorizontal. ## Important Note Currently, othographic scale in Blender, three.js, and possibly other software does not translate to Bevy (via glTF) because their developers have [misinterpreted the spec](KhronosGroup/glTF#1663 (comment)). The camera parameters have been clarified in glTF 2.0, which was released on October of 2021. In Blender 3.0.1 this issue has **not** been fixed yet. If you are importing orthographic cameras from Blender, you have to divide the scale by 2.
# Objective - Fixes the issue with orthographic camera imported from glTF not displaying anything (mentioned in bevyengine#4005). ## Solution - This was due to wrong scaling mode being used. This PR simply changes WindowSize scaling mode to FixedHorizontal. ## Important Note Currently, othographic scale in Blender, three.js, and possibly other software does not translate to Bevy (via glTF) because their developers have [misinterpreted the spec](KhronosGroup/glTF#1663 (comment)). The camera parameters have been clarified in glTF 2.0, which was released on October of 2021. In Blender 3.0.1 this issue has **not** been fixed yet. If you are importing orthographic cameras from Blender, you have to divide the scale by 2.
# Objective - Fixes the issue with orthographic camera imported from glTF not displaying anything (mentioned in bevyengine#4005). ## Solution - This was due to wrong scaling mode being used. This PR simply changes WindowSize scaling mode to FixedHorizontal. ## Important Note Currently, othographic scale in Blender, three.js, and possibly other software does not translate to Bevy (via glTF) because their developers have [misinterpreted the spec](KhronosGroup/glTF#1663 (comment)). The camera parameters have been clarified in glTF 2.0, which was released on October of 2021. In Blender 3.0.1 this issue has **not** been fixed yet. If you are importing orthographic cameras from Blender, you have to divide the scale by 2.
Objective
Solution
Additional Note
As per discussion here, the orthographic scale has to be divided by 2.