PDA

View Full Version : TextAlpha maker



keith
02-21-03, 11:40 PM
The name says it all. It creates text alphas from the the fonts installed on the system in a variety of ways and also generates a zscript to load these alphas and use them.

Here it is:
TextAlpha.zip (http://www2.zbrushcentral.com/zbc_uploads/user_file-1045899551cqc.zip)

If you find this useful, say so.

Frenchy Pilou
02-22-03, 05:37 AM
Hi keith
If it's realy work, you are a genious !
And I don't understand why Pixo don't make that before :qu:
I shall try this as soon as possible !
Pilou

JimMcKnew
02-22-03, 09:45 AM
Keith - works great for me. thnx. :} Jim

Northstarr
02-22-03, 11:41 AM
Hi Keith, I was really hoping someone with the know how would come up with this. Well done! I have tried it out, and I only have one little problem... my alphas are coming up in all different directions, I have to either flip them vertically or horizontally, and some are ok. Is there something I missed???

Thanks
Donna

rhom
02-22-03, 11:47 AM
Well this darn thing isn't working for me at all-I opened it and stuck it in my ZScripts folder and all I get when I open it in ZBrush is two letters -MK I believe-any ideas?

juandel
02-22-03, 01:03 PM
sounds major :cool: (as did the script-editor ;)), Keith! i wished you would indulge intp programming for macs asap :D

- juandel

JimMcKnew
02-22-03, 02:40 PM
rhom - it's a program. You have to run the program and then that generates the ZScript.

:} Jim

rhom
02-22-03, 05:51 PM
doh!well of course it is.
edit:Works like a charm-thanks Jim.

keith
02-22-03, 08:25 PM
Thanks. I couldn't do any testing on this as I have only the demo version and importing of alphas is disabled. I have tested the generated alphas in image viewers though. I have never seen them flipped so there may be something in the way alphas are imported. Which characters exactly?

Mac programming may be in the future. I don't know the first thing about it right now.

Keith

Frenchy Pilou
02-24-03, 12:58 PM
Hi Keith
I am as you :) I can't test
The first part seems very fine works !
Bravo !
There is no reason that the Import function don't work in the complet version !
Great job :cool:
Pilou

keith
02-25-03, 10:37 AM
Thanks Pilou. This project was a nice small self-test.

Flycatcher
02-25-03, 06:39 PM
Hi Keith. First well done on producing such a sueful little accessory program. It works fine for me with two exceptions:

1. Donna has already mentioned that the alphas come out flipped. In my case all of them required flipping vertically before use. I only tested it with 3 fonts though, so maybe it's inconsistent as Donna stated.

2. Character dimensions are severely distorted when choosing to acquire a whole string. The following image used the same font and same size, but the single letter A was generated as a separate letter, whereas the second line was generated as a whole string. You can see how grossly elongated the A is in line 2 copmared to line 1; the remaining letters are similarly distorted.

http://www2.zbrushcentral.com/zbc_uploads/user_image-1046227168cgh.jpg

This raises a third issue for me. It seems reasonable to suppose that someone may wish to use special characters from some fonts as well as alphanumerics (especially dingbat fonts). These cannot be selected using the alpha or numeric buttons, and since the text string option creates these distortions, the only option seems to be to do them individually as single character strings in a series of program runs. Would it be possible to have a further button for Special Characters (i.e. everything except alphas and digits) or possibly Full Character Set please?

keith
02-25-03, 07:26 PM
Okay, so maybe the problem is in sizes. Does anyone know if alphas have to be the same size vertically and horizontally to import them? It seems to make sense now that they should.

keith
02-25-03, 09:35 PM
Thanks Flycatcher. I added to the program. Added a flip vertical checkbox, save shortcuts and a character range. I recommend keeping save shortcuts off when using a character range especially one including the letters [,],". The text of all buttons except letters and alphabets are in ascii even when using different fonts.

Here it is:
TextAlpha.zip (http://www2.zbrushcentral.com/zbc_uploads/user_file-1046237684wed.zip)

Bonecradle
02-25-03, 10:57 PM
Looks like a great utility :tu:

As far as sizes go, I imagine that alphas are the same as textures and have to be imported with 'square' dimensions, i.e. height = width. Otherwise they come in distorted; zbrush will stretch the short dimension to make it square.

keith
02-25-03, 11:32 PM
Thanks Bonecradle, that confirms it.

I suddenly realized that buttons can have pictures and so I changed the program to generate buttons with the pictures that they will load. ZBrush may not recognize all characters in a set and thus some may show as the exclamation mark.

TextAlpha.zip (http://www2.zbrushcentral.com/zbc_uploads/user_file-1046244702tcg.zip)

Flycatcher
02-26-03, 04:37 PM
Thanks Keith - that was fast - excellent example of customer service! :tu: :) :tu:

Frenchy Pilou
02-26-03, 05:40 PM
Greeat Update :tu:
Pilou

Flycatcher
02-26-03, 06:22 PM
Had time to test it now and everything works fine.

http://www2.zbrushcentral.com/zbc_uploads/user_image-1046312212qen.jpg

The crisper outline on the above collection of 3 perfectly proportioned strings was achieved by ignoring the font size slider with its maximum of 72 and typing 240 in the box.

However, when I tried it at 600 (because I was testing it with an intricately detailed dingbat font at the time which didn't show up all that well even at 200 - the font's problem, not your program's), all I got was a large blank square by way of an alpha. Presumably this is because I'd exceeded an upper size limit inherent in your code; can you tell me what the maximum permissible size is please?

Belleski
02-26-03, 09:16 PM
Many Thanks for this great new toy. Hours of amusement and I'm sure it will come in very handy. ;)
http://www2.zbrushcentral.com/zbc_uploads/user_image-1046322984qrc.jpg

keith
02-27-03, 05:40 AM
There are no limits on the picture size. All pictures are created in memory so it may be a memory problem. I created a 600 font using wingdings and it went proper at 1034x1034. What is the size of the alpha you get?

Seeing your post Flycatcher, gave me a new idea - multiline:
TextAlpha.zip (http://www2.zbrushcentral.com/zbc_uploads/user_file-1046353221gjc.zip)

ZBuddie
02-27-03, 06:03 AM
hi keith
a Bud of mine ask me to Give this to you
::TEXT.zip (http://www2.zbrushcentral.com/zbc_uploads/user_file-1046354499rpt.zip)
just a sample on how you can shorten the code in 2 ways.
he said if you use .JPG instead of the .BMP
you won't need to Flip the Text ;)
Hope this helps...

its a sample with numbers i don't know why he named it txt
:D

Nikko
02-27-03, 06:10 AM
Truly excellent script :tu: :cool: :tu:
Thanks keith!

keith
02-27-03, 11:11 AM
Thanks ZBuddie. I was trying to think of a way to cut the generated script. I thought of using RoutineDef to load the alpha only when required. I'll try that tip as well and see which is shorter.

Does ZBrush support jpeg loading for alphas? If so, I may as well add support - saves space.

Keith

Flycatcher
02-27-03, 05:17 PM
Thanks Keith - another very useful addition that I thought of as I ran the three instances but was shy to ask for. :tu: :rolleyes:

I think you're right about the memory thing. I've tried to recreate the large sized alpha problem, but it's working fine now using the same program version. I suspect it was just my resources running low at the end of a long day on the PC.

Flycatcher
02-27-03, 05:20 PM
PS forgot to mention - I think I'm right in saying that JPG support for alphas and textures came in with version 1.55 - I'm not sure about the interim trial version which I didn't download, but it was certainly not included in earlier versions.

ZBuddie
02-27-03, 07:20 PM
hi keith
a bud of mine said use this if you want to get rid of the preload button.
this will only load the letter or number when called on.

[IButton,,,[FileNameSetNext,”alpha1.bmp”]
[IPress,ALPHA:IMPORT],,,,alpha1.bmp]

a sample
::alpha1.zip (http://www2.zbrushcentral.com/zbc_uploads/user_file-1046402675byw.zip)

keith
02-28-03, 02:38 AM
ZBuddie, won't that snippet import the texture each time you click on the button? You would have to import only if the alpha does not exist. And who is the mysterious bud? :)

ZBuddie
02-28-03, 02:51 AM
oh that what i thought you were trying to do.
mysterious bud
is a friend of mine hes a newsgroup reader and just the kind of guy who keeps to his self i can't get him to particapate in any forum board :p

keith
02-28-03, 11:00 AM
I added jpeg support and changed the generated zscript. However, now the program requires an extra dll called gdiplus.dll. I've included a link. Place this dll in the same dir as the executable. If you're running winXP, you do not need to download this dll.

TextAlpha:TextAlpha.zip (http://www2.zbrushcentral.com/zbc_uploads/user_file-1046458791ysx.zip)

GDI+ dll:
GDI+ Download (http://www.microsoft.com/downloads/release.asp?releaseid=32738)

PS: I may add antialiasing support later

Flycatcher
02-28-03, 03:58 PM
This is getting really polished - the antialiasing would be the icing on the cake! What's next - 3D extrusion? Shadow effects? Animation? :D Thanks again. :tu:

keith
02-28-03, 09:13 PM
Here it is with antialiasing. It can also be turned off to see the difference.

TextAlpha.zip (http://www2.zbrushcentral.com/zbc_uploads/user_file-1046495629weg.zip)

twindude
01-04-05, 08:45 AM
Can someone help me get this import or running..........its awesome!

aminuts
01-04-05, 10:53 PM
I don't have it in front of me at the moment but if I remember right you do your thing in the program then save out to alpha and zscript then in z2 you load the zscript you created and it does it for you.

but I have a memory like a truant....absent when presence required.

I will have a look at it later and see and let ya know.