[Development] Qt Charts poor dynamic/resolution with OpenGL

Jeandet Alexis alexis.jeandet at member.fsf.org
Tue Nov 8 13:30:45 CET 2016


Hi Qt devs,

To continue on this topic, in my lab we plan to take an intern to work
on this. It would be a 6 month Master degree internship, starting
around February 2017. 
Does QtCharts maintainers/experts have some time to help us to advise
our intern?
It would just be for short discussions like is the new design Ok? Can
we modify this? Is QtCharts really doing this like this?...
Most of this questions would go through this list but if we can also do
few(2-3) call-conf it might be better.
Our goal is to improve QtCharts to be able to use it in our scientific
softwares. So we need to improve the current dynamic with OpenGL and/or
improve performances of non OpenGL plots.

Best regards,
Alexis.
Le mardi 19 juillet 2016 à 20:26 +0100, Sean Harmer a écrit :
> 
> On 19/07/2016 18:26, jeandet wrote:
> > Hi All,
> > 
> > We are developing in my lab a scientific data plot/analysis
> > software
> > using Qt Charts module. In order to plot quite large data-sets
> > (XYSeries) we enabled OpenGL which produce unexpected behavior. The
> > plots values are grouped by X values see here:
> > https://ao.lpp.polytechnique.fr/s/T2HcZDtrdL0DcDi
> > passwd:àààà
> > -Plot0 with OpenGL
> > -Plot1 without OpenGL
> > 
> > We found that it was due to float conversion with OpenGL, as far as
> > I
> > know we can't safely use doubles with OpenGL since not al
> > GPU/drivers
> > support it(and it increase version requirement). So for now it
> > really
> > limits plots quality since float has a 23+1 bits mantissa so +/-8M
> > relative dynamic.
> > 
> > For example data with X values representing seconds since
> > epoch(1970)
> > would have to store:
> > (2016-1970)*365*24*60*60 = 1450656000 seconds ~2^31
> > This indeed doesn't fit in 23 bits, to store it in a float you will
> > need to truncate it and you would get something close to 3 minutes
> > resolution.
> > Here is a tool to see what append.
> > http://babbage.cs.qc.cuny.edu/IEEE-754.old/Decimal.html
> > 
> > It will also fail with  non uniform X values, packets of data with
> > a
> > small dX spaced by bigger dX. For example 8kSps time series grouped
> > in
> > packets of 1000 points with few minutes between each packets would
> > fail.
> > 
> > That said there seems to be solutions to make the situation better.
> > I think that before plotting te data we should perform a coordinate
> > change to fit float dynamic.
> > This pipeline might be implemented like this?:
> > 
> > CPU:  -Data domain analysis (min, max, dynamic)
> > CPU:  -Produce a Temporary vector of visible data centered and
> > reduced
> > CPU:  -Push Temporary vector to GPU
> > GPU:  -Generate Vertices with or without downsampling strategy
> > CPU:  -Build Axes from visible bounds in data coordinates
> 
> That's essentially the same strategy I've implemented in the past. I 
> don't know the code of Qt Charts or how easily this woudl fit into
> it 
> but as an approach I think it's sound.
> 
> Cheers,
> 
> Sean
> 
> > 
> > Note that this would also work without OpenGL and the downsampling
> > insanely increase performances. On QCustomPlot if we replace data
> > containers which are QMap by QVector you can plot more than 10M
> > points
> > without problems.
> > Here is one example with 3M points with QCustomPlot and without
> > OpenGL:
> > https://hephaistos.lpp.polytechnique.fr/data/QLop_new_Features2.web
> > m
> > 
> > This would imply to store two coordinate systems for Data and View.
> > We are happy to discuss about that and contribute to the
> > development if
> > we agree on a solution.
> > Anyway I would be happy to have any feedback on this.
> > 
> > Some readings:
> > http://blogs.agi.com/insight3d/index.php/2008/09/03/precisions-
> > precisio
> > ns/
> > http://www.urbanrobots.com/Blogs/WW/2006/01/working-to-solution-in-
> > prec
> > ision.html
> > http://www.urbanrobots.com/Blogs/WW/2006/01/solving-coordinate-
> > precisio
> > n-problems.html
> > 
> > 
> > Best regards
> > Alexis Jeandet
> > Laboratory of Plasma Physics(LPP)
> > http://www.lpp.fr/?lang=en
> > _______________________________________________
> > Development mailing list
> > Development at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/development
> > 
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20161108/eec2dc1c/attachment.html>


More information about the Development mailing list