dadarek
Posts: 4
Joined: Tue Sep 11, 2012 3:06 pm

Poor graphics / Banding issues

Tue Sep 11, 2012 3:19 pm

Hello,

When running the example from /opt/vc/src/hello_pi/hello_triangle2, I get an image that seems to have severe banding issues. That is, the transition between colors isn't smooth/seemless, but rather there appear to be bands as if my bit-depth configuration was very low.

I don't have a screenshot of the running example, but if you look here: http://en.wikipedia.org/wiki/File:Colou ... mple01.png
my rendering looks like the 8-bit gradient.

I've been reading through forums and trying out everything I could find, but the banding still occurs.

The hello_video example runs perfectly fine, no banding, no issues at all.

I am on the Raspbian image. I am connected through HDMI. This happens both with and w/o XWindows. I have tried increasing the graphics memory by replacing /boot/start.elf with the arm128_start.elf, but no luck. I also tried editing a configuration file to force 24-bit graphics (forgot where that was already), but that didn't work either.

Not sure what else to do or where else to look. Any pointers?

Thanks!
-Darek

dadarek
Posts: 4
Joined: Tue Sep 11, 2012 3:06 pm

Re: Poor graphics / Banding issues

Thu Sep 13, 2012 3:57 pm

Update:
----------

One other thing I tried - modifying the /boot/config.txt file to include "framebuffer_depth=24". This changed my bit depth from 16 to 24, but did not solve the issue.

User avatar
Licaon_Kter
Posts: 240
Joined: Wed Sep 05, 2012 10:12 am
Location: Between the keyboard and the chair.

Re: Poor graphics / Banding issues

Fri Sep 14, 2012 2:04 pm

what about changing it to 32 bit?
for 32bit also add: framebuffer_ignore_alpha=1

more info: http://elinux.org/RPi_config.txt
BFQ+BFS or RT on a RPi? 4'real: https://github.com/licaon-kter/ (source and compiled!)

User avatar
Paeryn
Posts: 2808
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Poor graphics / Banding issues

Fri Sep 14, 2012 8:12 pm

dadarek wrote: When running the example from /opt/vc/src/hello_pi/hello_triangle2, I get an image that seems to have severe banding issues. That is, the transition between colors isn't smooth/seemless, but rather there appear to be bands as if my bit-depth configuration was very low.
It isn't meant to be smooth - it only uses 15 shades of red for the Mandelbrot set and 15 shades of green for the Julia set.
She who travels light — forgot something.

dadarek
Posts: 4
Joined: Tue Sep 11, 2012 3:06 pm

Re: Poor graphics / Banding issues

Sat Sep 15, 2012 4:04 pm

Licaon_Kter wrote:what about changing it to 32 bit?
Yes, I tried this as well, no luck there either.
Paeryn wrote:It isn't meant to be smooth - it only uses 15 shades of red for the Mandelbrot set and 15 shades of green for the Julia set.
That makes sense. But I am also having problems with QT5 on the Pi. I can't get simple gradients working correctly (i.e. http://doc.qt.nokia.com/4.7-snapshot/qml-gradient.html) without any banding.

Has anyone had any luck getting smooth QT5 gradients on the pi?

User avatar
topguy
Posts: 6177
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Poor graphics / Banding issues

Tue Oct 09, 2012 11:52 am

When using qmlscene in newer builds of Qt5 i discovered that the banding looks much better if you add the "--transparent" option to qmlscene.

I have no idea why.

dadarek
Posts: 4
Joined: Tue Sep 11, 2012 3:06 pm

Re: Poor graphics / Banding issues

Tue Oct 09, 2012 2:29 pm

topguy wrote:When using qmlscene in newer builds of Qt5 i discovered that the banding looks much better if you add the "--transparent" option to qmlscene.

I have no idea why.
So is it true that you are also experiencing this banding? For some reason I feel like I'm the only one with this problem.

rene
Posts: 4
Joined: Fri Oct 26, 2012 6:16 pm

Re: Poor graphics / Banding issues

Fri Oct 26, 2012 6:54 pm

Hi,

I'm also experiencing a color banding issue (model B, 512MB). When using Citrix Receiver to access my WIN7 work environment it's really noticeable for instance in the page when opening a new tab in Internet Explorer 8. The weird thing is that the color banding disappeared at a certain moment only to return when I started up the RPi the next day. Does anyone else have this issue or knows a solution?

MattSwarbrick
Posts: 27
Joined: Thu Oct 04, 2012 3:15 pm

Re: Poor graphics / Banding issues

Fri Nov 16, 2012 5:28 pm

Also experiencing this, using --transparent with qmlscene does make it smoother, I don't know why either!
I've set the depth to 24 in config.txt but seems to have no effect.... Has anyone had any progress with this?

dave j
Posts: 118
Joined: Mon Mar 05, 2012 2:19 pm

Re: Poor graphics / Banding issues

Tue Feb 17, 2015 10:25 pm

A bit of thread necromancy but...

I've found a temporary solution for colour banding issues in Qt5. It looks like Qt5 isn't detecting/configuring the frame buffer's colour depth for OpenGL ES, it looks like it's just using 16 bit, but there is a way to force it to 24 bit.

According to this page you can set an environment variable:
QT_QPA_EGLFS_FORCE888 - When set, the red, green and blue color channel sizes are ignored whenever creating a new context, window or offscreen surface. Instead, the plugin will request a configuration with 8 bits per channel. This can be helpful on devices where configurations with less than 32 or 24 bits per pixel are chosen by default but are known not to be suitable, for example, due to banding effects. Instead of changing all the applications, this variable provides an easier shortcut to force 24/32 bpp configurations for a given device.
So

Code: Select all

QT_QPA_EGLFS_FORCE888=1
before running your Qt5 app and the banding disappears. I've tried it and it works.

Return to “Graphics programming”