Skip to content
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

glTF camera does not use the near and far values of perspective when imported #4005

Closed
kirusfg opened this issue Feb 21, 2022 · 1 comment
Closed
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior

Comments

@kirusfg
Copy link
Contributor

kirusfg commented Feb 21, 2022

Bevy version

Latest 544b6df

What you did

Added a GLTF scene with a camera and light in it.

What you expected to happen

fixed

What actually happened

The world appears to be unlit:
bug

Additional information

The orthogonal camera is completely broken as well: it does not output anything at all. The reason for that might be more complex, because the fix suggested for the perspective camera does not apply to this case.

@kirusfg kirusfg added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Feb 21, 2022
@kirusfg
Copy link
Contributor Author

kirusfg commented Feb 21, 2022

The PR above fixes the issue for the perspective camera only. The orthogonal one still remains broken.

@mockersf mockersf added A-Assets Load files from disk to use for things like images, models, and sounds and removed S-Needs-Triage This issue needs to be labelled labels Feb 21, 2022
@bors bors bot closed this as completed in b4bf5b5 Feb 21, 2022
kurtkuehnert pushed a commit to kurtkuehnert/bevy that referenced this issue Mar 6, 2022
# Objective

- Fixes bevyengine#4005 

## Solution

- Include the `near` and `far` clipping values from the perspective projection in the `Camera` struct; before that, they were both being defaulted to 0.
bors bot pushed a commit that referenced this issue Apr 8, 2022
# 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.
aevyrie pushed a commit to aevyrie/bevy that referenced this issue Jun 7, 2022
# 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.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants