Page 1 of 1

new skin for falagard buttons gets pixelized when enlarged

Posted: Tue Jun 13, 2006 08:24
by mba
Hi all

I don't think the subject covers the problem I'm working on very well. And I'm not sure I can explain it very well, but here goes:

I have made a new skin for the Taharezlook/CEGUIFalagardBase widgetset by creating a new texture png and making a new imageset file defining each widget element in the image.

When I create a window with some buttons on, approximately the same size as in the texture file each button looks correct, meaning they are not pixelized.
When I create a window with some larger buttons on they get pixelized.
But if I show the window with small buttons on first, and then switch to the window with the larger buttons they now look correct, meaning they are smooth-shaded across the surface.
I've been looking into some of the properties of th button, such as HorzFormat with Stretched on the imagery, but this seems to be set as default.
Is there some gradient smoothing of a texture when the texture is smaller than the texture needed for a widget?

I'm using the mk2 0.4.1 version of CEGUI along with the OgreRenderer on a linux box.

Hope you can help...

Kind regards
Martin

Posted: Tue Jun 13, 2006 10:09
by Dalfy
I moved the topic to skins and theme cause it seems more related to this than to the editor :)


But I have no solution to suggest at the moment sorry

Posted: Tue Jun 13, 2006 11:11
by mba
sorry thought I posted in the advanced help section?

Martin

Posted: Tue Jun 13, 2006 14:21
by lindquist
Can you post a screenshot or something? I'm not sure I understand the problem properly

Posted: Wed Jun 14, 2006 08:49
by mba
I'm sorry but I have nowhere to post the images.

But the problem lies in that the skin texture gets stretched and magnified across the button surface to accomodate the size of the button. The texture for the button is not large enough.

My question is: is there some smoothing involved during this magnification, making the skin look smooth, instead of just magnifying the texture.

My problem is: When displaying a button that is somewhat larger than the actual size of button skin texture, the skin is 'just' magnified and not filtered in any way. When I flip through some windows where the buttons are smaller, where the texture is large enough to accomodate the size of the buttons. And when I return to the window where the troublesome buttons are: MAGIC! they are now smoothed.

I have been looking through the source of CEGUIRenderableImage.cpp and CEGUIImage.cpp but I can't find any thing that would cause such behavior. I have looked through CEImageset at draw_impl and all the way to the specific renderer.

Kind regards
Martin

Posted: Wed Jun 14, 2006 11:35
by lindquist
sounds like a problem with texture filtering. what renderer module are you using?

Posted: Wed Jun 14, 2006 11:51
by Rackle

Posted: Wed Jun 14, 2006 13:32
by lindquist
ah sry I just read your first post, so Ogre.
This is not a problem with CEGUI, but with the Ogre CEGUI renderer module.

You should take the problem to them as we do not maintain that renderer.

Posted: Thu Jun 15, 2006 15:50
by mba
Thanks lindquist

for replying and helping narrowing it down, I will take the problem up in the ogre forum


martin

Posted: Wed Jul 12, 2006 07:04
by mba
Hi again

I was playing around with some of the properties of my layout-file, when I discovered that a particular one didn't cause the pixelation of the widgets. I then compare it with some of those that had the problem, and one of the differences where they all had a <Property Name="CloseButtonEnabled" Value="False" />. When I removed this line from my layout files the problem went away!?

Do you still think its the ogre cegui renderer or is it more likely a bug in the xml parsing of the layout files? This is probably not the case because the layout files used in the Ogre GUI demo also has this property set.

Kind regards
Martin

Update

Posted: Mon May 14, 2007 11:22
by mba
I have now done some more research into the matter.

If I have an ogre overlay for debug statistics I get pixelized gui elements until I press a button without any text on it.

If I leave out the overlay the pixelation is gone if the mouse cursor is visible on the screen. If I disable the cursor the elements are pixelized until I press a button without text.

Now to my question: What filtering is only activated/enabled when displaying the mouse cursor or a pressed button (without text).

I'm baffled, hope someone has a clue :D.

Regards
Martin B. Andersen

Posted: Wed Jul 04, 2007 07:20
by mba
The issue has been solved, partly in the new Eihort and partly by me. Texture filtering wasn't set correctly in OpenGL, and as you said lindquist it was in Ogre or more specific in the OgreCEGUI renderer.

see
http://www.ogre3d.org/phpBB2/viewtopic. ... highlight=
and
http://www.ogre3d.org/phpBB2/viewtopic. ... highlight=


kind regards
Martin