Best way to do 3d HUD?

Blitz3D Forums/Blitz3D Programming/Best way to do 3d HUD?

Basically wanting to avoid putting any 2d on screen at all. What's your opinion on how to do a basic 3 digit hud quad overlay that shows something like armor (0 to 100)?

Offhand I'd say the best way to do it would be to have a quad that was always aligned to the viewpoint and write directly to the texture for that quad, theres plenty of code samples for this around these forums/archives.

Or have a quad for each digit (3 digits in this case) with an animated texture with the values 0-9 laid out sequentially in the image, then simply change the current texture frame of the quad when the numbers change.

Yep that's working great.

Now I just need to figure out how to imitate 2d coords. I have a sprite that's 1 unit in front of the camera. Camerarzoom is 1. graphicswidth is 0 to 1024 pixels.

EDIT: This looks about right...

hudx# =  100
hudx = 2 * Float ( hudx/GraphicsWidth() ) - 1


And this for Y positioning a 3d sprite in 2d coords. Seems kludgy though... :(

hudy# = 30
hudy = 1.35 * Float( -hudy/GraphicsHeight() ) + .7


If you want to spend money you could also look at Sprite Candy.

This used to be the web site.

http://www.x-pressive.com/

This is the forum.

http://playerfactory.proboards25.com/index.cgi

I use nSprite 2 for all 2D graphics in my 3D games, and it works really well.

Another vote for sprite candy. If al you want is a GUI then go with candy

I have one made by Sswift, dunno if he sells that anymore. Cheaper than SC and almost just as good.

I use FONText. I have no idea if it's still available since I bought it years ago. I got it for the bitmap font editor, but the HUD code that came with it has proven to be at least as useful, if not more so.

Thanks for all the tips guys! :)

I like Sswift's GUI library...the quick tech support when I couldn't get it working was a great plus (and, as usual, it was my fault that it didn't work). Great guy to work with...

Sswits system (there's a downloadable demo too):

http://www.blitzbasic.com/logs/userlog.php?user=963&log=268

Other stuff made by Sswift:

http://www.blitzbasic.com/logs/userlog.php?user=963