f3d: Animation freeze when interacting with mouse

Steps to reproduce

  • ./bin/f3d BoxAnimated.gltf
  • zoom out
  • press space
  • move the scene while animation is running
  • animation is not smooth

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 26 (26 by maintainers)

Most upvoted comments

Thanks for the investigation on this @exbluesbreaker ! I removed the skip frames code and in combination with your VTK fix this issue is fixed!

I think I can analyze this issue more and check other details.

Probably “skip frame” logic is needed but should be reworked somehow. I commented it out just in a brief checking differences with F3D 1.3.0.

So definitely current soltuion is not a “solution” as result is still far from perfect.

But I recorded screencast on my slow mini-PC in 2 cases, it can be seen that with fix it “slightly better”, as without animation could literally freeze constantly, and with fix it progresses a little bit always.

fix no fix

It does not mean it is overall acceptable, of course. I will get back to the problem.

Ok! At least it is a bit better 😃

It worked much better at least on my mini-PC which I used at the time I worked with issue (it doesn’t have the best GPU and CPU). In fact, there were still probably slows a bit as rendering of camera movement goes and only then animation, but with old implementation I was literally able to freeze animation update for seconds while moving scene with the mouse.

Maybe let me revisit it once I finish current stuff with ImGui console.

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.

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”

Its BoxAnimated.gltf from testing/data.