MrKepzie / Natron

Open-source compositing software. Node-graph based. Similar in functionalities to Adobe After Effects and Nuke by The Foundry.
www.natron.fr
GNU General Public License v2.0
1.49k stars 164 forks source link

Should NodeGraph be rewritten to use OpenGL instead of QGraphics framework? #815

Closed captainmpc closed 6 years ago

captainmpc commented 9 years ago

I notice, node graph ( on OSX at least ) come to be very slow to navigate. Few nodes slowdown the graph.

I notice the first level of zoom which doesnt show node text label, is more fast to be drawn.

capture d ecran 2015-08-06 a 15 29 00

I think text is too " beautiful " : it seems to be generated each time the graph is navigated. and We dont need to zoom graph at this level

capture d ecran 2015-08-06 a 15 29 35

Should it be rasterized in texture at a fairly nice dpi but not to much, one time only and limit zoom level?

Here nuke graph at max level. Notice the aliased text

capture d ecran 2015-08-06 a 15 42 55

MrKepzie commented 9 years ago

We are not using OpenGL for the node graph drawing anyway. One would have to make a wrapper around QGraphicsPixmapItem to have textured text

MrKepzie commented 9 years ago

Perhaps the best we could do is port the node graph to OpenGL which would give much more flexibility and also better zooming functionalities

manuelsongokuh commented 9 years ago

Port in 2.0 or 2.1 milestone?

MrKepzie commented 9 years ago

More like 2.1 or 2.2, this is not blocking.

MrKepzie commented 9 years ago

It is not decided whether it's going to be ported to QWidget or QGlWidget because font rendering is going to be really bad with QGLWidget

devernay commented 8 years ago

There is no proof yet that this is a problem with QGraphicsWidget

devernay commented 8 years ago

"By default, QGraphicsView provides a regular QWidget for the viewport widget. You can access this widget by calling viewport(), or you can replace it by calling setViewport(). To render using OpenGL, simply call setViewport(new QGLWidget). QGraphicsView takes ownership of the viewport widget."

devernay commented 8 years ago

Note that the nodegraph can also be rendered using OpenGL by adding "-graphicssystem opengl" to the command-line options (e.g. /Applications/Natron.app/Contents/MacOS/Natron -graphicssystem opengl on the Mac). You will notice many rendering bugs, which may be due to a mis-use of the QGraphicsView API.

QGraphicsView itself may also be optimized by using simpler graphics primitives and other tricks:

LifeIsStrange commented 8 years ago

Hum you should envisage to use Vulkan instead of openGL because it will twice the performance and will be massively supported. And be released this month :D

devernay commented 6 years ago

This issue was moved to NatronGitHub/Natron#108