Projecting the HUD onto a model
by James \"Corvidae\" Williams · in Torque Game Engine · 09/02/2002 (7:12 pm) · 7 replies
Over the last couple months, I've been following the development of Metroid Prime (Gamecube). One thing that is a great effect in it is the way the HUD is mapped onto the inside of Samus's helmet (screenshot).
In one of my OpenGL experiments, I managed to get something similar by rendering the HUD, mapping it to a texture with glCopyTexImage2D, then replacing a known texture in the model with this one. I'd like to put this in Torque, but I'm running into a couple of significant snags.
1: I need a way to render a specified GUI at the very start of the frame and save it to a texture so I can use it later. When the time comes to draw the other GUIs, it should skip over the one I've already rendered.
2. When I'm drawing a model, I need to be able to replace one texture (something like "hud.png") with the texture I stored off earlier.
Does anyone have any idea how I might be able to solve these in Torque? I've been trying to puzzle it out, and it's really pretty confusing. :)
Thanks in advance,
-Corvi
In one of my OpenGL experiments, I managed to get something similar by rendering the HUD, mapping it to a texture with glCopyTexImage2D, then replacing a known texture in the model with this one. I'd like to put this in Torque, but I'm running into a couple of significant snags.
1: I need a way to render a specified GUI at the very start of the frame and save it to a texture so I can use it later. When the time comes to draw the other GUIs, it should skip over the one I've already rendered.
2. When I'm drawing a model, I need to be able to replace one texture (something like "hud.png") with the texture I stored off earlier.
Does anyone have any idea how I might be able to solve these in Torque? I've been trying to puzzle it out, and it's really pretty confusing. :)
Thanks in advance,
-Corvi
About the author
#2
Just like a normal gui. Only geared towards looking more like a helmet (with top and bottum of helmet visible).
It does look good though. A similar thing could be done in torque with a good artist i reckon.
What torque needs i reckon is animated textures.
Such as watching a computer screen on a map update with 4-5 different bitmaps e.t.c
Is this possible ? Ive never looked into it. Never seen it either.
09/02/2002 (8:05 pm)
From what ive seen its not mapped onto the model.Just like a normal gui. Only geared towards looking more like a helmet (with top and bottum of helmet visible).
It does look good though. A similar thing could be done in torque with a good artist i reckon.
What torque needs i reckon is animated textures.
Such as watching a computer screen on a map update with 4-5 different bitmaps e.t.c
Is this possible ? Ive never looked into it. Never seen it either.
#3
If it's not on a model, it's sure convincing.
09/02/2002 (8:12 pm)
I'm pretty sure it's mapped onto a model, because when you run, the view bobs in a different direction than your view does.If it's not on a model, it's sure convincing.
#4
09/03/2002 (5:20 pm)
Well this would be a nice feature still, you could have digital ammo counters on your guns!
#5
The ammo indicator was built into the gun, and it (despite cool graphics) was what got my attention. Heh, realistic scenery... but a tiny 3d ammo indicator! WOW!
To do it in Torque, I guess you could use a similar technique to those seen in the many "skin changing" tutorials. This time around, you don't change the vast majority of the skin and only edit the material list to change one of the textures. This way, you have one larger gun texture, and one tiny one that has the numerical values printed on it.
If you've played around in OpenGL, you should be able to figure out how to generate a texture using a font. Just edit the material list of the object and force an update and viola... changing textures dynamically on a model.
Just think of the environment maps. It is basically a dynamic texture. This time, instead of relating to the angle you're looking at it and the environment map texture it will check the ammo count of the current weapon and texture the model.
Good luck on this. It'll be cool to see in action.
09/03/2002 (7:02 pm)
I can't remember the name of the game (reminded me of Halo meets Tribes... might have been Tribes Attack or Halo even... I haven't played much Xbox) I saw in action over at Microsoft.The ammo indicator was built into the gun, and it (despite cool graphics) was what got my attention. Heh, realistic scenery... but a tiny 3d ammo indicator! WOW!
To do it in Torque, I guess you could use a similar technique to those seen in the many "skin changing" tutorials. This time around, you don't change the vast majority of the skin and only edit the material list to change one of the textures. This way, you have one larger gun texture, and one tiny one that has the numerical values printed on it.
If you've played around in OpenGL, you should be able to figure out how to generate a texture using a font. Just edit the material list of the object and force an update and viola... changing textures dynamically on a model.
Just think of the environment maps. It is basically a dynamic texture. This time, instead of relating to the angle you're looking at it and the environment map texture it will check the ammo count of the current weapon and texture the model.
Good luck on this. It'll be cool to see in action.
#6
deep-shadows site
is the site for the engine etc.
09/03/2002 (7:57 pm)
There is a game which has the ammo on the gun... the game is on PC and called venom... mmm something different now thou... Codename Outbreak I think... But it used an engine called Vital Engine Z. deep-shadows site
is the site for the engine etc.
#7
Thanks for the tip. I'll let you know how it turns out. :)
09/03/2002 (9:54 pm)
Matt: Of course! I shoulda thought of that. :)Thanks for the tip. I'll let you know how it turns out. :)
Torque Owner Alexander Porter