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

Fix mesh flicker #6157

Merged
merged 1 commit into from
May 2, 2024
Merged

Fix mesh flicker #6157

merged 1 commit into from
May 2, 2024

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented Apr 29, 2024

Funnily enough, the reason this was flickering on 0.15 was completely unrelated to the reason why it flickers on main.

Long story short: it had to with how explicit client-side splats were splitting the data across different timestamps and in some cases this was incorrectly handled.

In the new APIs it's just an issue in the entity_iterator machinery which lowers everything to range semantics, which leads to problems when the query expects latest-at semantics.

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

@teh-cmc teh-cmc added 📺 re_viewer affects re_viewer itself 🔍 re_query affects re_query itself exclude from changelog PRs with this won't show up in CHANGELOG.md labels Apr 29, 2024
@Wumpf Wumpf self-requested a review April 30, 2024 16:57
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

maybe it's just late but I don't get what indices on a latest-at query mean and why the particular index chosen fixes which primary components come together with which secondary ones. Can you try to eli5 it to me? 🥺

@teh-cmc
Copy link
Member Author

teh-cmc commented May 2, 2024

maybe it's just late but I don't get what indices on a latest-at query mean and why the particular index chosen fixes which primary components come together with which secondary ones. Can you try to eli5 it to me? 🥺

It all has to do with a hack that entity_iterator does in order to cut down on code deduplication in all space views.

The entity_iterator queries the different components using either latest-at or range queries depending on the current state of the blueprint, and then converts the results to range results no matter what, so that the downstream views only need to be implemented for range results.

The problem is that latest-at results can be spread over time in arbitrary ways (e.g. position data from frame 42 and color data from frame 157), and should just be joined blindly, irrelevant of their respective timestamps/indices.
So, to make sure they do get joined together during the temporal join (range_zip), we give them all the same index.

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

ahh thank you that helped a lot! :)

@Wumpf Wumpf merged commit 2641a59 into main May 2, 2024
36 checks passed
@Wumpf Wumpf deleted the cmc/6072 branch May 2, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog PRs with this won't show up in CHANGELOG.md 🔍 re_query affects re_query itself 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renderer randomly fails to handle a Mesh3D changing its size
2 participants