Page 1 of 1

Fade/Transparent Effect at Top + Bottom of Buttons

Posted: Wed Jul 18, 2012 19:22
by CENUBI
Hi everyone,

Forgive me for the truly beginner's question here, but I've been trying to find out what property it is on CEGUI elements (for example, a PushButton) that controls an odd 'Fade'-like effect at the top and bottom of buttons. I've attached a screenshot for clarification.

Image

Please let me know if there's any other information needed, but I 'feel' like the solution to this should be so straightforward, I just don't know what properties control the effect.

Thank you!

Re: Fade/Transparent Effect at Top + Bottom of Buttons

Posted: Wed Jul 18, 2012 19:42
by Kulik
While I can't possibly know I would guess that it's just the imagery there.

CENUBI wrote:Forgive me for the truly beginner's question here,


Why would you put this into the Advanced help subforum then?

Re: Fade/Transparent Effect at Top + Bottom of Buttons

Posted: Thu Jul 19, 2012 03:28
by CENUBI
This seemed to fit in the category of the types of questions being asked, so I started here.

As for the file itself, the graphic used for this button is simply a solid blue, no gradients at the top or bottom. I've also noticed a similar effect being applied to the handle of a scroll bar. Buttons of shorter height make this effect much harder to notice (but still visible).

Re: Fade/Transparent Effect at Top + Bottom of Buttons

Posted: Thu Jul 19, 2012 08:10
by Kulik
It could be a ColourRect being applied there on the edges.

This is definitely a beginner question. It also requires a team of prophets. Post your looknfeel if you want to know.

Re: Fade/Transparent Effect at Top + Bottom of Buttons

Posted: Thu Jul 19, 2012 08:12
by CrazyEddie
This issue is caused by the filtering that is applied when stretching images extracted from a texture atlas (i.e a CEGUI Imageset). Basically, you will need to supply an extra pixel on any edges of any image that will be stretched, this can be done either by adding the extra pixel in a graphic editing program, or by adjusting the image definition position and size in the imageset xml (which may or may not be appropriate, depending on the image).

This is not an issue specific to CEGUI, the video hardware is doing the filtering and this issue showing up is just CEGUI exposing a little of what goes on 'under the hood'.

CE.

Re: Fade/Transparent Effect at Top + Bottom of Buttons

Posted: Thu Jul 19, 2012 15:04
by CENUBI
This issue is caused by the filtering that is applied when stretching images extracted from a texture atlas (i.e a CEGUI Imageset). Basically, you will need to supply an extra pixel on any edges of any image that will be stretched, this can be done either by adding the extra pixel in a graphic editing program, or by adjusting the image definition position and size in the imageset xml (which may or may not be appropriate, depending on the image).

This is not an issue specific to CEGUI, the video hardware is doing the filtering and this issue showing up is just CEGUI exposing a little of what goes on 'under the hood'.

CE.


That seemed to have done the trick. Yeah I really didn't know what caused that effect, but I'm glad you knew immediately what it was.

Thanks CrazyEddie!