OK. I know this has been requested before, but was never answered/added.
There HAS to be a way to kind of... render text to a picture.
Like... a monitor, for example, that shows the players ammo count.
You could, of course, make a picture for each number, but a chain gun with 2000 bullets would mean 2000 pictures and that's just horrible.

1) Is there a way to do this in the current version of Dim3?
2) If not, it has to be added as soon as possible.
Actually, you'd only need 10 pictures (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) and you'd switch them out, but that still sux. Yes, somehow putting text onto a models texture would be useful.
ccccc Wrote:Actually, you'd only need 10 pictures (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) and you'd switch them out, but that still sux. Yes, somehow putting text onto a models texture would be useful.
Just because I don't know better .. you can display a 2000 bullets ammo count as a number in the HUD, right? It doesn't has to be represented by a graphic?
Yeah, but a HUD doesn't exactly scream realism. To display the number on the gun gives a logical way to tell the player the number of bullets left.
On the other hand, they have HUDs (very expensive) that work precisely like that. Saw it on TV. Shows a crosshair, etc. But that's beside the point. Text to image would require a text area to be defined on the image. Not sure how one would go about doing that. Possible top left corner pixel offset and adjusting the font size/line breaks accordingly.
This is a good idea that would be best served in the core; but you could do it by the "puzzle" method of using a bunch of textures together and switching them around.
That said, how this would be represented I'm not sure, as there's no real concept of a font, I'd have to piece it together myself, but that's all something that could be worked out.
[>] Brian
Honestly, a 2000 round chaingun shouldn't have an ammo counter anyway! Besides, games like Doom 3, Quake 4 and Halo 3 just used images, text to texture would be pretty ugly.
Dr. Infested Wrote:Honestly, a 2000 round chaingun shouldn't have an ammo counter anyway! Besides, games like Doom 3, Quake 4 and Halo 3 just used images, text to texture would be pretty ugly.
I need this for a mech cockpit in Metal Wolves and it would be good to somehow have a counter that's easily adjustable (using a variable).
What I mean is some way of display text on a texture of some kind.
The same could be used for other things of course.
I know that Doom 3 and Prey (and probably Quake 4) had monitors with text on them and that the text wasn't directly on the monitor texture, but could be changed dynamically by changing a variable. :/
EDIT: Would this actually be possible using a shader? That would be nice.
But shader parameters aren't changeable by script, are they?
Oh okay, I understand then. If it's a mech, that's different, so yeah I can see that being very useful. From reading the book "The Making of Doom 3" I can remember them saying that there were about 16000 graphics used for the terminals and things, so I dunno.
This seems like a pretty obvious lack in games. Here's a suggestion: Try modding the bitmap files for Halo 1 for Mac. You'll notice that what Halo 1 does is have 10 images for the digits 0-9, and it maps them out onto a surface, between the surface's texture and the surface's multipurpose map (think specular and other stuff rolled into one). It does this with a shader, I think.
Simply, you only need 10 images, and a way to figure out how to arrange the 1/10/100 columns. I think a great example of this is the Assault Rifle's ammo counter.
Well, either it does all that or it just...renders text onto the texture.
I dunno. But it sounds good, right?