-
-
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
Only use the AABB center for mesh visibility range testing if specified. #16468
Merged
alice-i-cecile
merged 3 commits into
bevyengine:main
from
pcwalton:visibility-range-aabb
Nov 22, 2024
Merged
Only use the AABB center for mesh visibility range testing if specified. #16468
alice-i-cecile
merged 3 commits into
bevyengine:main
from
pcwalton:visibility-range-aabb
Nov 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PR bevyengine#15164 made Bevy consider the center of the mesh to be the center of the axis-aligned bounding box (AABB). Unfortunately, this breaks crossfading in many cases. LODs may have different AABBs and so the center of the AABB may differ for different LODs of the same mesh. The crossfading, however, relies on all LODs having *precisely* the same position. To address this problem, this PR adds a new field, `use_aabb`, to `VisibilityRange`, which makes the AABB center point behavior opt-in. @BenjaminBrienen first noticed this issue when reviewing PR bevyengine#16286. That PR contains a video showing the effects of this regression on the `visibility_range` example. This commit fixes that example.
BenjaminBrienen
approved these changes
Nov 22, 2024
andriyDev
approved these changes
Nov 22, 2024
Great docs! |
mockersf
pushed a commit
that referenced
this pull request
Nov 22, 2024
…ed. (#16468) PR #15164 made Bevy consider the center of the mesh to be the center of the axis-aligned bounding box (AABB). Unfortunately, this breaks crossfading in many cases. LODs may have different AABBs and so the center of the AABB may differ for different LODs of the same mesh. The crossfading, however, relies on all LODs having *precisely* the same position. To address this problem, this PR adds a new field, `use_aabb`, to `VisibilityRange`, which makes the AABB center point behavior opt-in. @BenjaminBrienen first noticed this issue when reviewing PR #16286. That PR contains a video showing the effects of this regression on the `visibility_range` example. This commit fixes that example. ## Migration Guide * The `VisibilityRange` component now has an extra field, `use_aabb`. Generally, you can safely set it to false.
ecoskey
pushed a commit
to ecoskey/bevy
that referenced
this pull request
Dec 2, 2024
…ed. (bevyengine#16468) PR bevyengine#15164 made Bevy consider the center of the mesh to be the center of the axis-aligned bounding box (AABB). Unfortunately, this breaks crossfading in many cases. LODs may have different AABBs and so the center of the AABB may differ for different LODs of the same mesh. The crossfading, however, relies on all LODs having *precisely* the same position. To address this problem, this PR adds a new field, `use_aabb`, to `VisibilityRange`, which makes the AABB center point behavior opt-in. @BenjaminBrienen first noticed this issue when reviewing PR bevyengine#16286. That PR contains a video showing the effects of this regression on the `visibility_range` example. This commit fixes that example. ## Migration Guide * The `VisibilityRange` component now has an extra field, `use_aabb`. Generally, you can safely set it to false.
ecoskey
pushed a commit
to ecoskey/bevy
that referenced
this pull request
Jan 6, 2025
…ed. (bevyengine#16468) PR bevyengine#15164 made Bevy consider the center of the mesh to be the center of the axis-aligned bounding box (AABB). Unfortunately, this breaks crossfading in many cases. LODs may have different AABBs and so the center of the AABB may differ for different LODs of the same mesh. The crossfading, however, relies on all LODs having *precisely* the same position. To address this problem, this PR adds a new field, `use_aabb`, to `VisibilityRange`, which makes the AABB center point behavior opt-in. @BenjaminBrienen first noticed this issue when reviewing PR bevyengine#16286. That PR contains a video showing the effects of this regression on the `visibility_range` example. This commit fixes that example. ## Migration Guide * The `VisibilityRange` component now has an extra field, `use_aabb`. Generally, you can safely set it to false.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-Rendering
Drawing game state to the screen
C-Bug
An unexpected or incorrect behavior
M-Needs-Migration-Guide
A breaking change to Bevy's public API that needs to be noted in a migration guide
P-Regression
Functionality that used to work but no longer does. Add a test for this!
S-Ready-For-Final-Review
This PR has been approved by the community. It's ready for a maintainer to consider merging it
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #15164 made Bevy consider the center of the mesh to be the center of the axis-aligned bounding box (AABB). Unfortunately, this breaks crossfading in many cases. LODs may have different AABBs and so the center of the AABB may differ for different LODs of the same mesh. The crossfading, however, relies on all LODs having precisely the same position.
To address this problem, this PR adds a new field,
use_aabb
, toVisibilityRange
, which makes the AABB center point behavior opt-in.@BenjaminBrienen first noticed this issue when reviewing PR #16286. That PR contains a video showing the effects of this regression on the
visibility_range
example. This commit fixes that example.Migration Guide
VisibilityRange
component now has an extra field,use_aabb
. Generally, you can safely set it to false.