3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2 3

Author Topic: Automated Font Maker for 3D Rad  (Read 8207 times)

jestermon

« on: May 28, 2010, 04:02:19 PM »
A 3D Font maker for the 3D Rad game engine, using the Pygame 2D game engine

Overview.
The RadFontMaker allows you use any truetype font, and generate a TextPrint font for 3D Rad.
The program automatically generates the texture and icon files and prepares the the .x files for your use.

Usage:
Copy the .ttf font that you wish to generate into the RadFontMaker/truetypes folder

Edit the RadFontMaker.ini file, and insert the .ttf name and size

The name must be the full name of the font eg.  Distant_galaxy_2.ttf and must be on the 1st line

The 2nd line must contain the size of the font. The default size of 40 works for most fonts

Because truetype fonts can vary in size, you can play around with the size value till you get a font size that works for you.

Once you have entered the font and size, simply run RadFontMaker.exe

A screen will display showing what the font looks like at the size you specified.

If the size is not right, simply press the ESC key to cancel the build

If all looks ok to you, press the ENTER key, and the font will be generated automatically

If the font you made was using a font named myfont.ttf then..

Copy the font folder for example: RadFontMaker/radfonts/myfont to the
... 3D Rad\3DRad_res\objects\TextPrint\data folder

Also copy the RadFontMaker/radfonts/myfont.jpg file to the
... 3D Rad\3DRad_res\objects\TextPrint\index folder, so you can see the font in theeditor

Hints:
1.. Try to keep the size of the fonts looking about the same size, that's what the size in the RadFontMaker.ini file is there for. You can always make the font larger or smaller in the 3D Rad editor.

2.. If a font name has a space on it, first copy it to the RadFontMaker/truetyprfonts, then rename the file to remove the spaces.. as the spaces can cause a problem with the conversion process.

Happy fonting

Edit: I have compacted the full runtime into the exe file to unclutter the RadFontMaker folder, and have uploaded the change.
« Last Edit: May 29, 2010, 07:47:39 AM by jestermon »
« Reply #1 on: May 28, 2010, 11:18:54 PM »
Thanks......this one seems relatively simple........not overly tedious, like the official method and a couple of others I've tried to use.
AKA: The 3D Raddict http://www.3draddict.com/
« Reply #2 on: May 29, 2010, 12:07:07 AM »
Looks super cool. I will use this for sure!
FPS game creator for 3drad and >2000 games GamesAtNight

psikotropico

« Reply #3 on: May 29, 2010, 12:41:41 AM »
wow!

jestermon

« Reply #4 on: May 29, 2010, 06:12:42 AM »
I got a little tired of doing it all manually.
Thanks for the feedback.

jestermon

« Reply #5 on: May 29, 2010, 06:14:30 AM »
Thanks......this one seems relatively simple........not overly tedious, like the official method and a couple of others I've tried to use.
Haha, Allan this does it ALL for you, except copy the directories to Rad, and wash the dishes :P

And you inspired the idea indirectly with your post http://www.3drad.com/forum/index.php?topic=1236.msg24851#msg24851
"Somebody must come up with a Font Editor which is a real cinch to use !", And I took that as a challenge..

So the guys should thank you....
« Last Edit: May 29, 2010, 06:19:38 AM by jestermon »
« Reply #6 on: May 29, 2010, 07:56:49 AM »
Well, that wishful thinking certainly paid off! ;D
AKA: The 3D Raddict http://www.3draddict.com/
« Reply #7 on: May 29, 2010, 09:17:00 AM »
thanks a TON Jestermon. Another one of those utilities that will help for a long time. Maybe shadmar wil put this in his tools post.
CsharpJsharp.com: the computer nerd site. Accepting suggestions!




Windows 7 on Acer Aspire 5735 laptop
Pentium Dual-Core T3200
732 MB Mobile Intel Graphics Accelerator 4500M
2GB DDR2 RAM
« Reply #8 on: May 29, 2010, 12:28:40 PM »
This is very cool, thanks for this, will go in my rad-toolbox :)
« Reply #9 on: May 29, 2010, 02:24:39 PM »
Great stuff jestermon! It is definately tediouse doing it by hand, a definate plus  ;)
Roll out!
http://www.youtube.com/watch?v=VD8MvMaPNO4

Do you have kids between the ages of 3 and 9?

http://www.amazon.com/dp/B007K1EFC6
« Reply #10 on: May 29, 2010, 04:07:22 PM »
Very helpful, thanx jestermon!
« Reply #11 on: May 29, 2010, 06:59:14 PM »
cool nice, reminds me of a couple of tools they had over at 3Impact that were very easy to use and gave access to all system fonts that could be converted for use with the engine with similar functionality and couple of button presses. I (luckily) still have them and they work with Rad at least the fon't I have converted have(with a small tweek), but good to see another one so thanks.
using 3Drad 7.22

system specs:
Windows 7 Home Premium 64-bit
Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 CPUs), ~3.2Ghz
8 gig ram
Geforce GTX 650 1024 MB GDDR5
DirectX 11

psikotropico

« Reply #12 on: June 05, 2010, 02:28:10 AM »
great tool, jestermon... a few things:

- Can you make the final .png at 1024x1024 or even bigger, so I will can reduce it later in photoshop, once I've touched it a bit?
Maybe a config file where you can setup the final size?... ::) Now I have problems trying to make an alpha channel from png transparency... there is no antialiasing in the selection

- Sems to be a thin black stroke around the characters... can you eliminate it? currently i like to use plain fonts, without strokes... and I always have time to create the stroke in psd if needed...

- ":" is replaced by ";"

thanks in advance!
« Last Edit: June 05, 2010, 02:48:51 AM by psikoT »

jestermon

« Reply #13 on: June 05, 2010, 03:29:16 PM »
great tool, jestermon... a few things:

- Can you make the final .png at 1024x1024 or even bigger, so I will can reduce it later in photoshop, once I've touched it a bit?
Maybe a config file where you can setup the final size?... ::) Now I have problems trying to make an alpha channel from png transparency... there is no antialiasing in the selection

- Sems to be a thin black stroke around the characters... can you eliminate it? currently i like to use plain fonts, without strokes... and I always have time to create the stroke in psd if needed...

- ":" is replaced by ";"

thanks in advance!
Since you ask so nicely psikoT, how can I refuse you. I'll see what I can do.

jestermon

« Reply #14 on: June 05, 2010, 08:36:47 PM »
RadFontMaker V2.

This update allows the creation of a second font sheet, by specifying the resolution of the sheet as the a parameter in the 3rd line of the ini file.
The resolution must be in increments pf 512. So it must be 512, 1024, 1526, 2048 etc.

A change has been made, to remove any dark pixels surrounding the font characters in the super font sheet, thereby removing any anti-aliasing that is used in the superfonts.png file.(the 2nd file, the original is untouched)

Quote
Now I have problems trying to make an alpha channel from png transparency

In order to make an alpha layer in Photoshop
*  Select the background color with the magic wand select tool
*  Use menu Select->Similar, to get all pieces inside the characters
*  Use menu Select->Inverse
*  Do an Edit->Copy  (Ctrl-C)
*  Do an Edit-Paste  (Ctrl-V)
*  Create your alpha channel from this new layer.

If you wish to use antialiasing for the layer, you can always use the Select->Feather, and set the feather value.. Cant remember if it is inverse or not, but play around and you'll figure it out. Then hit the delete key to remove the feathered part of the image.

Manual included
Happy fonting.

Edit: Free fonts not included in this release. Previous release has 40+ free fonts.

Edit2: After playing around with the new superfont. I discovered that if you generate a 1024 resolution font sheet and place it into the Textprint directory for that font, (after renaming supertfonts.png to fonts.png), it gives a very clean crispy edge. For those who don't want blury edges on larger font settings eg. 2 or 3, this is perfect. Remember to change the kerning and leading values for larger font settings. Also keep in mind that a larger texture takes more resources. But this feature is there, if you wish to use it.
« Last Edit: June 05, 2010, 11:45:17 PM by jestermon »
Pages: [1] 2 3