Hi,
lately I needed to render text above an image (item icon for example) and stood afront the following problem: Making the Text as clearly visible as possible while keeping as much as possible of the icon visible. I wanted to solve this by rendering the text with highly contrasted outlines (for example white text with black outlines), similar to how it's done in famous World of Warcraft:
(Yea I'm a Paladin )
I found this a really good solution as the text will be clearly visible on almost any background - be it dark (then you have a contrast to the bright inner) or bright (then you see the dark outlines). How would I realise a similar effect using CEGUI? I have browsed through the CEGUI properties and classes but I could not find anything resulting in such outlines
Greetings and thanks in advance,
-BigG
Rendering text with letter outlines
Moderators: CEGUI MVP, CEGUI Team
Re: Rendering text with letter outlines
Hi, font effects are not natively supported in CEGUI afaik nor does FreeType2 (the font library that CEGUI uses) have any support for this. Typically what you'll want to do is use bitmap/pixmap based fonts that already have the desired effects built into the font itself. There are several programs on the web for creating such fonts, and you can find one linked from this thread.
The other, less efficient option is to render the same text twice with slightly different sizes and/or offsets as described in this thread.
The other, less efficient option is to render the same text twice with slightly different sizes and/or offsets as described in this thread.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
Re: Rendering text with letter outlines
A third option, which is quite flexible and of high visual quality, but as a side effect is a bit more complex to implement, is described in this article from Valve Software. There is some discussion on it over in this thread on the Ogre 3D forums, which is where I discovered this method.
Re: Rendering text with letter outlines
Thanks for your replies guys
http://www.cegui.org.uk/phpBB2/viewtopic.php?t=3875 seems like it's exactly what I wanted, strange enough I couldn't find it when searching for several keywords like "font outlines" and similar. As we are going to create our own font anyway, it won't be a problem to create it as bitmap font I guess. That tool also seems really good, will check it out soon The valve article is really interesting but it looks quite overkill for a fun project of a few not-even-adult people
Greetings,
-BigG
//Edit:
Yea, using that REALLY great tool, I managed to achieve exactly what I wanted thanks again!
http://www.cegui.org.uk/phpBB2/viewtopic.php?t=3875 seems like it's exactly what I wanted, strange enough I couldn't find it when searching for several keywords like "font outlines" and similar. As we are going to create our own font anyway, it won't be a problem to create it as bitmap font I guess. That tool also seems really good, will check it out soon The valve article is really interesting but it looks quite overkill for a fun project of a few not-even-adult people
Greetings,
-BigG
//Edit:
Yea, using that REALLY great tool, I managed to achieve exactly what I wanted thanks again!
Re: Rendering text with letter outlines
I'm glad you got it worked out. Using a custom font is definitely one of the easier approaches you can just pick up and start working with almost immediately.
I agree that the Valve article is indeed interesting, and it seems distance-field usefulness goes far beyond what that article touches on. In regards to CEGUI I'm uncertain how much work it would take to support distance-field texture maps, but it could be an interesting experiment. CE also made it easier to incorporate shaders in v0.7, so extending that to include effects like outlining, shadows, etc. would be pretty neat.
I agree that the Valve article is indeed interesting, and it seems distance-field usefulness goes far beyond what that article touches on. In regards to CEGUI I'm uncertain how much work it would take to support distance-field texture maps, but it could be an interesting experiment. CE also made it easier to incorporate shaders in v0.7, so extending that to include effects like outlining, shadows, etc. would be pretty neat.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!
Who is online
Users browsing this forum: No registered users and 10 guests