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

Bugfix: Floor missing, wrong bounding boxes #250

Merged
merged 2 commits into from
Nov 5, 2024
Merged

Conversation

vegasten
Copy link
Contributor

@vegasten vegasten commented Nov 5, 2024

Related to: AB#188616

Some bounding boxes were wrong, and caused parts of the model to pop in and out. This happened because of some error with rotation in the input rvm data matrixes, and seemed to only happen with a few parts.

Fix: Recalculate bounding boxes based on the mesh. This is quite fast, and does not have a noticable impact on the build times.

Example image of bounds not following part. Calculating the bounds without the Rotation component in the rvm matrix got the correct rotation, but this was more generally wrong. Instead of trusting the input bounds we now use the mesh bounds, as we have not identified issues with the mesh positions (yet...)
image

if (mesh.Vertices.Length > 0)
{
// Recalculating AABB, since some instances of the transformed (p.AxisAlignedBoundingBox) AABB were incorrect
// Guarded agaings meshes with zero vertices, to avoid throwing an exception
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Guarded agaings meshes with zero vertices, to avoid throwing an exception
// Guarded against meshes with zero vertices, to avoid throwing an exception. Empty meshes are filtered out later.

@Strepto
Copy link
Collaborator

Strepto commented Nov 5, 2024

Add some comments to why we needed to do this. (Show a screenshot of the issue for example)

@vegasten vegasten merged commit 0a82343 into master Nov 5, 2024
6 checks passed
@vegasten vegasten deleted the Bugfix/floor-missing branch November 5, 2024 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants