Page 1 of 3

Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Sat Apr 20, 2013 7:45 pm
by xeno74
Hi Irrlicht team,

I use Irrlicht 1.8 on Linux PowerPC. Unfortunately Irrlicht 1.8 have wrong colors on PPC.

STK 0.8 Linux PowerPC with wrong colors:

Image

STK 0.8 Linux x86_64 with right colors:

Image

I have compiled Irrlicht 1.8 with __BIG_ENDIAN__ on PPC. Irrlicht 1.7.3 works with the right colors on PPC.

Have you an idea for me, please?

Cheers,

Xeno

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Sat Apr 20, 2013 10:11 pm
by hybrid
Is this due to PNG textures? I guess it's in the image loaders, and PNG has changed significantly due to the switch to libpng 1.5

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Sun Apr 21, 2013 1:40 pm
by xeno74
hybrid wrote:Is this due to PNG textures? I guess it's in the image loaders, and PNG has changed significantly due to the switch to libpng 1.5
The blue surfaces aren't textures. The textures are displayed correctly. I have libpng 1.2 installed.

Any ideas? And what can I do?

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Sun Apr 21, 2013 9:25 pm
by hybrid
So the problems here are with vertex colors? From what I can see, red and yellow surfaces are wrongly colored. We have the kart and the bricks of the scenery, for example. They are presumably loaded from b3d both?! Which parts are covered by textures?
Moreover, it seems as if yellow becomes grey - what kind of color shift can that be?!

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Mon Apr 22, 2013 8:00 am
by xeno74
hybrid wrote:So the problems here are with vertex colors? From what I can see, red and yellow surfaces are wrongly colored. We have the kart and the bricks of the scenery, for example. They are presumably loaded from b3d both?! Which parts are covered by textures?
Moreover, it seems as if yellow becomes grey - what kind of color shift can that be?!
Is it an Irrlicht problem? Or a problem of STK?

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Tue Apr 23, 2013 6:36 am
by hybrid
Well, that's what I'm trying to find out, but I need answers to my questions. Are vertex colors involved, are the meshes all loaded from b3d, where are textures?

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Wed Apr 24, 2013 3:43 pm
by xeno74
Thank you for your answer :)

Yes, all mesh and vertex colors loading is done by b3d loader. Maybe there isn't __BIG_ENDIAN__ code available in the b3d loader.

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Thu May 02, 2013 9:32 am
by xeno74
Any ideas?

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Thu May 02, 2013 10:09 pm
by hybrid
Ah sorry, forgot to present some results. The loader has the ifdefs everywhere (at least in many places) and seems to load the data correctly. Moreover, it did not change in this aspect in the last version. So I'm not sure, I have to play with some values and see which ones result in color problems like this.

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Fri Jun 07, 2013 9:24 am
by ritti
I have the same problem here with this example:
http://irrlicht.sourceforge.net/forum/v ... =2&t=48690
The cubes have random colors instead of beeing red.
I'm on a Linux laptop with NVidia optimus g310m
If I start the program with the integrated intel card the colors are fine but there I have no ogl 3.3 support.
Maybe this can help you to find the problem.

Best regards
Ritti

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Sun Jun 09, 2013 7:58 pm
by hybrid
My guess with that would be that you simply haven't initialized the vertex colors. This leads to random colors, but would have nothing to do with this problem. Here we have a clear exchange of distinct colors.

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Wed Jun 19, 2013 8:03 pm
by hybrid
Of course, should have found out earlier. The colors are being loaded as cmyk instead of rgba. Does not fit exactly, as yellow comes out grey, and black and blue are blue again. But this could be due to alpha values and vertex colors. We have had a similar problem with PNG in the past, guess it's some of the settings in the png loader init.
What happens if you load and display some plain png textures using a cube or draw2dimage?

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Thu Jun 20, 2013 9:57 am
by hendu
It's a b3d mesh, all the textures are fine (both png and jpeg), the lego blocks are vertex colored.

Grab the mesh here without textures:
http://bayfiles.net/file/Ruwr/9BCAA4/track.b3d.gz

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Thu Jun 20, 2013 11:46 am
by hybrid
Well, that at least helps quite a lot as it reduces the search space from the forme anticipated libpng problems to more driver related stuff. The vertex color setup looks ok, though, at least if we don't suspect a problem in vertex_array_bgra extension support on that platform. This and the fact that the color scheme seems to have moved somewhere to the CMYK pattern is IMHO indicating a setup problem of the basic driver setup. But without someone debugging these things on the PPC side it's probably stay unsolved - I don't have any chance to work on big endian systems for now.

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Posted: Sun Jun 30, 2013 12:48 pm
by xeno74
Do you think that is only a graphics driver problem?

I have created 2 bug reports:

https://bugs.launchpad.net/ubuntu/

http://bugs.debian.org