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

Animation freeze when interacting with mouse #25

Open
Tracked by #841 ...
mwestphal opened this issue Nov 12, 2021 · 7 comments
Open
Tracked by #841 ...

Animation freeze when interacting with mouse #25

mwestphal opened this issue Nov 12, 2021 · 7 comments
Milestone

Comments

@mwestphal
Copy link
Contributor

mwestphal commented Nov 12, 2021

Steps to reproduce

  • ./bin/f3d BoxAnimated.gltf
  • zoom out
  • press space
  • move the scene while animation is running
  • animation is not smooth
@mwestphal mwestphal added this to the 1.3.0 milestone Nov 12, 2021
@mwestphal mwestphal modified the milestones: 1.3.0, 2.0.0 Aug 14, 2022
@mwestphal mwestphal self-assigned this Feb 2, 2023
@mwestphal mwestphal modified the milestones: 2.0.0, 2.1.0 Mar 28, 2023
@mwestphal mwestphal modified the milestones: 2.1.0, 2.2.0 May 14, 2023
@mwestphal mwestphal changed the title Animation on OSX freeze when interacting with mouse Animation freeze when interacting with mouse Jul 2, 2023
@mwestphal
Copy link
Contributor Author

@Meakk I see this on Linux too. It seems to be a 2.0.0 regression, works perfect with 1.3.0

@mwestphal mwestphal modified the milestones: 2.2.0, 2.3.0 Sep 17, 2023
@mwestphal mwestphal modified the milestones: 2.3.0, 2.4.0 Dec 21, 2023
@mwestphal mwestphal removed their assignment Dec 21, 2023
@mwestphal mwestphal added the help wanted Please help with this issue! label Jan 7, 2024
@mwestphal mwestphal removed the help wanted Please help with this issue! label Jan 20, 2024
@Meakk Meakk added this to F3D Feb 2, 2024
@mwestphal mwestphal removed this from the 2.4.0 milestone Feb 3, 2024
@mwestphal mwestphal added this to the 2.4.0 milestone Feb 4, 2024
@mwestphal mwestphal moved this to Investigate in F3D Feb 4, 2024
@mwestphal mwestphal modified the milestones: 2.4.0, 2.5.0 Apr 4, 2024
@mwestphal mwestphal modified the milestones: 2.5.0, 3.0.0 Jul 3, 2024
@mwestphal mwestphal modified the milestones: 3.0.0, 3.1.0 Jul 13, 2024
@mwestphal mwestphal mentioned this issue Feb 27, 2025
35 tasks
@exbluesbreaker
Copy link
Contributor

Hello, where to find this file to reproduce?

@mwestphal
Copy link
Contributor Author

Its BoxAnimated.gltf from testing/data.

@exbluesbreaker
Copy link
Contributor

I am working on this issue. So far it seems it is not problem of rendering being blocked somehow, but of animated object geometry not being updated while mouse movement.

I forced calling this->RenderUI(that) in vtkF3DImguiObserver::MouseMove which commened not being necessary and freezing is the same. So it tries to render quite actively but object "doesn't move"

@exbluesbreaker
Copy link
Contributor

exbluesbreaker commented Mar 15, 2025

It seems something is wrong with animationManager::Tick timings when mouse is being moved and maybe it is related to std::chrono::steady_clock usage.

I checked internal duration counter in animationManager::Tick using std::chrono::steady_clock and it actually shows always perfect duration, despite me seeing freezes of animation and even delay of debug output of this value. So I used std::chrono::high_resolution_clock to measure time between Tick calls and this clock is able to detect big delays properly.

Anyway, I will keep investigation.

@exbluesbreaker
Copy link
Contributor

exbluesbreaker commented Mar 17, 2025

Some update, though without direct impact yet. I investigating behvior over the weekend. It was mainly tracking animation/interaction how is it done in VTK in general and in particular processing.

Essentially event processing takes too long which delays firering timers which would cause animation updates. So with rough skeleton event processing is taking longer:

...
void vtkXRenderWindowInteractor::ProcessEvents()
{
  ...
  for (Display* dpy : dpys)
  {
    //Event processing
  }

  ...
  for (auto rwi : vtkXRenderWindowInteractorInternals::Instances)
  {
    if (!rwi->Done)
    {
      rwi->FireTimers();//Fire timers
    }
    ...
}

In the end I found out that "default" interactor implementation is taking longer times for mouse move, but I didn't figure out details yet. F3D related mouse move processing is registered as observer and is done very fast but there are also default interactor behavior involved.
So far I went to void vtkInteractorStyleTrackballCamera::OnMouseMove() taking long times but didn't proceed yet further (didn't have time).

@exbluesbreaker
Copy link
Contributor

It was in general beneficial for me to learn better how things work with VTK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Investigate
Development

No branches or pull requests

2 participants