Wrong colors with Irrlicht 1.8 on Linux PowerPC

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
xeno74
Posts: 50
Joined: Wed Dec 29, 2010 11:49 am
Location: Germany
Contact:

Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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
xeno74
Posts: 50
Joined: Wed Dec 29, 2010 11:49 am
Location: Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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?!
xeno74
Posts: 50
Joined: Wed Dec 29, 2010 11:49 am
Location: Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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?
xeno74
Posts: 50
Joined: Wed Dec 29, 2010 11:49 am
Location: Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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.
ritti
Posts: 90
Joined: Tue Apr 10, 2012 12:09 pm

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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.
xeno74
Posts: 50
Joined: Wed Dec 29, 2010 11:49 am
Location: Germany
Contact:

Re: Wrong colors with Irrlicht 1.8 on Linux PowerPC

Post 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
Post Reply