[bug] MapSplitter texture with blue and red switched around.

sjcomp

26-06-2006 20:44:49

I am running MapSplitter on puget_1k.gen.cfg. In the resulting image I have water as red and mountains as blue (while texture is exact opposite). Valleyes are still green though. It looks like blue and red channels are switched, but it is my guess. I am using the latest sdk. CVS HEAD has the same problem.

The issue might be in the fact that I am compiling against the Ogre CVS HEAD and this is a change that happend there due to the switch to FreeImage library. Any ideas?

Thanks.

Falagard

26-06-2006 21:23:11

Don't compile against Ogre HEAD? :-D

Personally I stay with stable versions of Ogre until Tuan implements something that specifically requires latest version of Ogre from HEAD.

sjcomp

26-06-2006 21:28:28

I suppose that is a smart decision to stay with stable version... but I already changed my code to support HEAD... and here I am :) I thought it could be an easy fix just switching channels in the mapsplitter. Well maybe it is an easy fix :)

Thanks.

tuan kuranes

27-06-2006 08:27:24

but I already changed my code to support HEAD
was there any breaking change in plsm2 ?
switching channels in the mapsplitter.
if puget config file out of the box, isn't it using color from config file instead of textures average color ?
Anyway try switching channels in the config file first.

sjcomp

27-06-2006 13:51:31


if puget config file out of the box, isn't it using color from config file instead of textures average color ?Anyway try switching channels in the config file first.

I am using Image texturing mode, so colors in the config file should not effect the resulting texture. And I did try it with no luck.

tuan kuranes

27-06-2006 14:03:17

didn't understood first post then.

You split an image using mapspllitter and it gives textures with incorrect color s?
Checked using a image viewer ?

sjcomp

27-06-2006 14:13:41

didn't understood first post then.

You split an image using mapspllitter and it gives textures with incorrect color s?
Checked using a image viewer ?

Sorry for unclear explanations. I compile PLSM2 CVS HEAD against OGRE CVS HEAD. After that I am using puget_1k.gen.cfg with original textures. MapSplitter generates a texture with blue water and red mountains. In the texture mauntins are red and water is blue. This means that red and blue channels are switched around during texture generation.

I loaded ps_texture_1k.png into gimp and switched Red and Blue channels around. After running MapSplitter with this modified texture I have the correct output.

I suspect that RGB became BGR in OGRE image library and hence this issue.

tuan kuranes

27-06-2006 15:24:27

It's not a bug. It's a test case for color parameter config file, and I did put abitrary color in that config file.

If you want different color, tweak the .gen.cfg, particularly the "MaterialColorN" listed to get a better suited list.

If you come with a particular good looking one, post here.

sjcomp

27-06-2006 15:29:11

It's not a bug. It's a test case for color parameter config file, and I did put abitrary color in that config file.
I thought colors from config file are used to generate a texture from the heightmap. But I already have a texture, hence these colors should not effect my texture.

tuan kuranes

27-06-2006 15:44:34

Look in the splitted texture folder and check splitted image in there using an image viewer.

If the terrain.base.X.Z.png is like the one you see on screen, you're using a Base texturemode, which do not use your image. use a Image texture mode, like ImagePaging.

sjcomp

27-06-2006 15:56:43

If the terrain.base.X.Z.png is like the one you see on screen, you're using a Base texturemode, which do not use your image. use a Image texture mode, like ImagePaging.
I am using Image TextureFormat=Image. I could not find information about ImagePaging in the plsm2 sdk sources or ogre wiki. For the moment I solved this issue by swapping RB channels in my texture before feeding it to the MapSplitter.