Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#4208 closed defect (fixed)

OMEdit: animation pane not shown

Reported by: Henning Kiel Owned by: Adeel Asghar
Priority: high Milestone: 1.12.0
Component: OMEdit Version:
Keywords: Cc: Volker Waurich

Description

I tested animation on 1.11beta2/Windows

  • open Modelica/DoublePendulum example
  • "Simulate with animation"

-> compiles fine and animation navigation buttons are shown corectly, but graphics output from animation is missing (instead the modelling view contents is shown (either graphics or text, whatever is active)

One needs to resize the display pane in order to have correct graphics.
Just starting animation is not enough.

Maybe the graphics pane is only instantiated on resize event and not at initialisation?

Also, if you have several animation tabs open and you switch between them, the modelling content flashes when you change the tab (it shows always the content of the current modelling tab)!

Change History (8)

comment:1 by Adeel Asghar, 8 years ago

Cc: Volker Waurich added

I tested the latest development version,

OMEdit v1.12.0-dev-27-gce0dd87 (64-bit)
Connected to v1.12.0-dev-77-g56dc448 (64-bit)

The animation shows up fine after the simulation has finished. However, I confirm the content flashing issue. I will see if I can fix it. There seems to be a slight delay when showing the graphics. Maybe we need to embed the animation graphics into some Qt widget. Show the Qt widget while graphics are rendering.

comment:2 by Adeel Asghar, 8 years ago

@vwaurich The problem is that there is a timer which is triggered after every 0.1 second and calls a render frame function. This is quite serious performance issue if one has a lot of animations windows opened since each animation window has its own timer.

By default the viewer has continuous run frame scheme however, we should use on demand scheme,

viewer->setRunFrameScheme( osgViewer::ViewerBase::ON_DEMAND );

This means we need to manually update the viewer whenever some operation is performed.

There is useful information in this link and also a solution using QOpenGLWidget http://bastian.rieck.ru/blog/posts/2014/qt_and_openscenegraph/. Note that QOpenGLWidget is not available in Qt 4 so we need to use QGLWidget.

comment:3 by Volker Waurich, 8 years ago

I see. But we need some kind of time trigger to render the visualization in accordance to real time. Can we use one global QTimer for all AnimationWidgets?

comment:4 by Martin Sjölund, 8 years ago

You only need to render a visible widget, right?

comment:5 by Volker Waurich, 8 years ago

Yes, but the user has the option to open as many widgets as he likes and start the animation individually.

comment:6 by Adeel Asghar, 8 years ago

Fixed in e4b0f04/OMEdit.

comment:7 by Adeel Asghar, 8 years ago

Resolution: fixed
Status: newclosed

comment:8 by Oliver Lenord, 7 years ago

Shouldn't it be worth to fix the initially reported issue (animation pane not shown) also in v11? - I'd expect that adding on refresh should be straight forward.
If one works with the latest released version to try out the animation feature then the first impression is that it's not working.

Note: See TracTickets for help on using tickets.