Texture problem

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Spodzie
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 11, 2009 12:01

Texture problem

Postby Spodzie » Fri Sep 11, 2009 12:17

First, congratulations and thanks for the MIT licensing, it's the only reason I chose CEGUI over other GUI's. I didn't even compare features... Just wanted you to know that this is a big deal for some of us!

Second, I have 2 problems when using a tiled background for a window:
Image

1) The line in the middle. It only happens when I enable the Autoscale property in the Imageset, I can avoid it if I reduce the size in the imageset to add 1 pixel of padding, but that is not a clean solution, I would like to fix it properly if there's a better way.
2) There's a slight decoloration to the right of the image that causes it to not be seamless, I've checked that the texture is actually seamless but in cegui, if you notice, to the left of the line it's "greener", this happens always.

I'm using Ogre in DirectX mode. The imageset is a png but it also happens when I use a tga. Any ideas?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Texture problem

Postby CrazyEddie » Sun Sep 13, 2009 07:26

Hi,

As far as I know the 'line' issue is an artefact of the way that the hardware performs filtering when scaling parts of the underlying texture. The solution is to have the additional pixel so the hardware can pick it up and use it. As I say, I believe this is not a CEGUI issue, though if anyone can demonstrate differently I'll be happy to listen!

CE.

Spodzie
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 11, 2009 12:01

Re: Texture problem

Postby Spodzie » Sun Sep 13, 2009 10:19

CrazyEddie wrote:Hi,

As far as I know the 'line' issue is an artefact of the way that the hardware performs filtering when scaling parts of the underlying texture. The solution is to have the additional pixel so the hardware can pick it up and use it. As I say, I believe this is not a CEGUI issue, though if anyone can demonstrate differently I'll be happy to listen!

CE.


Ok, I figured that was the problem but I was asking in case there was a solution. Adding padding in the imageset is no problem at all, so I'll do that, thanks.

What about the decoloration? This is a more important issue as I haven't found any workaround.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Texture problem

Postby CrazyEddie » Sun Sep 13, 2009 20:32

I don't know about the discolouration, I can't see it in the image you posted. The only thing that should affect the colour is the colour values applied - via modulation - to the image when it's drawn, these values may come from a couple of different sources - what type of window is this, and how is it skinned? If you're in any doubt about this, temporarily switch the image to be pure white and that will show more clearly any colouring that's being applied.

CE.

Spodzie
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 11, 2009 12:01

Re: Texture problem

Postby Spodzie » Sun Sep 13, 2009 21:04

I did as you said, replaced the imageset's imagefile with a white image and I get this:

http://img42.imageshack.us/img42/2145/screenshot1l.png

It's a skinned FrameWindow, this is the imageset:

Code: Select all

<Imageset Name="WoodTheme" Imagefile="white.png" NativeHorzRes="800" NativeVertRes="600" AutoScaled="false">
    <Image Name="cornerTopLeft" XPos="14" YPos="11" Width="9" Height="9" />
   (I skip the other 3 corners)
    <Image Name="borderTop" XPos="23" YPos="11" Width="384" Height="9" />
   (I skip the other 3 edges)
    <Image Name="content" XPos="23" YPos="20" Width="384" Height="384" />


It's weird, not only is the content coloured but the borders appear gray-ish instead of pure white, that windows should be all white...

Spodzie
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 11, 2009 12:01

Re: Texture problem

Postby Spodzie » Sun Sep 13, 2009 21:16

Scratch all that, it's solved. I just didn't know about the <Colours> element and obviously it was there... Since I had a very similar problem some years ago with my 3d lights affecting my gui textures I immediately assumed it was something like that...

jheld
Just popping in
Just popping in
Posts: 18
Joined: Sun Aug 09, 2009 04:06

Re: Texture problem

Postby jheld » Mon Sep 14, 2009 04:19

Hey Spodzie,

Can you please clarify? I have a very similar problem with my image buttons. When you mentioned the <Colours> element, is this something in CEGUI or was it in your graphics editor?

Cheers
Jason

Spodzie
Just popping in
Just popping in
Posts: 5
Joined: Fri Sep 11, 2009 12:01

Re: Texture problem

Postby Spodzie » Mon Sep 14, 2009 15:39

jheld wrote:Can you please clarify? I have a very similar problem with my image buttons. When you mentioned the <Colours> element, is this something in CEGUI or was it in your graphics editor?


Yeah, it's something in cegui. CEGUI supports simple color modulation of widgets. Just edit the .looknfeel file of the theme you are using and look for a <Colours> element in the widget you are having problems with and delete it.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 18 guests