use cegui create font (freetype or pixel )
how to easy use font texture map to make 3d render effects??
font class not direct read image map data...
thanks...
how to use CEGUI (0.5)FONT TEXTURE render 3d effect?
Moderators: CEGUI MVP, CEGUI Team
Hi skydog,
Do you want to be able to use a texture that contains a set of characters like, say this?:
To do this you need to define:
I personally use Gimp to create my fonts with along with a (very rough) program I wrote that converts a line of character images into the square texture you see above.
If this is what you're trying to do, I can give you example files that I've generated, you can even have my dodgey program
It seems like a lot of effort, but it gets easy quite fast - it only takes me about 15 minutes to create a new font.
Or are you trying to create a font that uses a dynamic texture?
Cheers.
Do you want to be able to use a texture that contains a set of characters like, say this?:
To do this you need to define:
- - your image (a square, power of 2 length and sides)
- an .imageset file that defines the location of each character
- a .font file that defines which .imageset file to use, and which maps images within the .imageset file to "codepoints" (characters)
- finally, you put a reference to your new .font file into your .scheme file
I personally use Gimp to create my fonts with along with a (very rough) program I wrote that converts a line of character images into the square texture you see above.
If this is what you're trying to do, I can give you example files that I've generated, you can even have my dodgey program
It seems like a lot of effort, but it gets easy quite fast - it only takes me about 15 minutes to create a new font.
Or are you trying to create a font that uses a dynamic texture?
Cheers.
Hi skydog,
So did you want to use a CEGUI font within your 3d scene? If that's the case, it's dependent on the 3d engine you're using.
It can be done in Ogre - you can use the same font texture to write text in the 3d scene, although you'll need to use an Ogre font definition file to kind of detail similar information that is contained in the CEGUI .imageset file.
Cheers.
So did you want to use a CEGUI font within your 3d scene? If that's the case, it's dependent on the 3d engine you're using.
It can be done in Ogre - you can use the same font texture to write text in the 3d scene, although you'll need to use an Ogre font definition file to kind of detail similar information that is contained in the CEGUI .imageset file.
Cheers.
-
- Not too shy to talk
- Posts: 30
- Joined: Wed Nov 01, 2006 05:59
- Contact:
Turtle wrote:Hi skydog,
So did you want to use a CEGUI font within your 3d scene? If that's the case, it's dependent on the 3d engine you're using.
It can be done in Ogre - you can use the same font texture to write text in the 3d scene, although you'll need to use an Ogre font definition file to kind of detail similar information that is contained in the CEGUI .imageset file.
Cheers.
i have same problem. Turtle, how can i display a CEGUI font within my 3d scene?
is there any example?
Hi silenttree,
Sorry for the delay - I haven't been on the Internet much of late.
I personally use MoveableText from the Ogre Wiki:
http://www.ogre3d.org/wiki/index.php/MovableText
Of course, this means you'll need to give Ogre a .fontdef file so that Ogre knows how to define the font. Details of this format are found in the Ogre Manual at:
http://www.ogre3d.org/docs/manual/manual_36.html#SEC222
It's kind of a combination of the CEGUI .imageset and .font files.
I wrote my own utility for generating font files for both Ogre and CEGUI from the one source font out of an image file. You're welcome to a copy if you want it, but it's very rough.
If you didn't want to use MoveableText, I guess you could project your 3d coord back into your screens space and put your CEGUI text at that point. This would work well except (1) the text would appear on top of all your scene (but this could be a good thing) and (2) the font would always be the same size - it wouldn't scale with distance (which could also be a good thing).
I use MoveableText to place labels over objects in my program and it works well for me in this situation. The only problem is that it doesn't support the CEGUI feature of a "HorzAdvance", so each character is rendered at the width of the image.
Cheers.
Sorry for the delay - I haven't been on the Internet much of late.
I personally use MoveableText from the Ogre Wiki:
http://www.ogre3d.org/wiki/index.php/MovableText
Of course, this means you'll need to give Ogre a .fontdef file so that Ogre knows how to define the font. Details of this format are found in the Ogre Manual at:
http://www.ogre3d.org/docs/manual/manual_36.html#SEC222
It's kind of a combination of the CEGUI .imageset and .font files.
I wrote my own utility for generating font files for both Ogre and CEGUI from the one source font out of an image file. You're welcome to a copy if you want it, but it's very rough.
If you didn't want to use MoveableText, I guess you could project your 3d coord back into your screens space and put your CEGUI text at that point. This would work well except (1) the text would appear on top of all your scene (but this could be a good thing) and (2) the font would always be the same size - it wouldn't scale with distance (which could also be a good thing).
I use MoveableText to place labels over objects in my program and it works well for me in this situation. The only problem is that it doesn't support the CEGUI feature of a "HorzAdvance", so each character is rendered at the width of the image.
Cheers.
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 8 guests