UE2 - UT2kX Certain types of meters

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

forrestmark9

New Member
Aug 6, 2009
56
0
0
I've been working on a project that ports Halo to the UE2 engine, and I've gotten most things working except a certain kind of meter that has me stumped.

Here is a picture of the meters that has me stuck
Oac0DMV.jpg


I do not know how to properly do these in UnrealEngine as I've never really worked fully with Canvas or scripted textures, I could easily do them if they were just straight bars then I could just use DrawTileStretched, but sadly Halo uses a custom type of meter that uses a greyscale and alpha to figure out how the meter moves and is drawn
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
The HUD components must be drawn as individual parts. I don't know how the Halo HUD works, but UT2004 has quite a number of examples already.
For example, the Assault Rifle draws the number of grenades left as individual grenade icons. The HUD itself draws bars of varying length for remaining ammo in the weapon bar or weapon charge above the ammo counter.

That thing on the weapon model itself may in fact just be a texture with a green/blue color transition that is panned according to charge level and combined with the weapons "static" skin parts by adding or alpha-blending with a fixed mask. Such a combination technique can be seen on the UT2004 Linkgun.
The UT2004 Shockrifle shows how to modify a skin parameter at runtime without using ScriptedTextures, though it's an alpha value, not a panning position. For that you'd probably use a TexScaler with scale 1 and mess with the offset values to achieve the desired effect.
 

forrestmark9

New Member
Aug 6, 2009
56
0
0
The HUD components must be drawn as individual parts. I don't know how the Halo HUD works, but UT2004 has quite a number of examples already.
For example, the Assault Rifle draws the number of grenades left as individual grenade icons. The HUD itself draws bars of varying length for remaining ammo in the weapon bar or weapon charge above the ammo counter.

That thing on the weapon model itself may in fact just be a texture with a green/blue color transition that is panned according to charge level and combined with the weapons "static" skin parts by adding or alpha-blending with a fixed mask. Such a combination technique can be seen on the UT2004 Linkgun.
The UT2004 Shockrifle shows how to modify a skin parameter at runtime without using ScriptedTextures, though it's an alpha value, not a panning position. For that you'd probably use a TexScaler with scale 1 and mess with the offset values to achieve the desired effect.

Hmm interesting I figured out how to do most meters by using a sprite widget then using FMin with value/valuemax but I'm current trapped on the ammo meters as they are not meters but instead icons, I've gotten alot of examples such as using DrawPattern and scaling to do them, and using a custom font. Sadly all the suggestions are things I do not know how to do as HUD elements is something new for me so doing most things is rather hard for me to accomplish

To show the ammo meters I was talking about here is the main bitmap from Halo



Has also used a secondary bitmap called hud_ammo_alphas which is the same bitmap but uses a special alpha as a mask to tell the engine what to set the icon to the disabled color

Here is that bitmap
https://dl.dropboxusercontent.com/u/52828637/hud_ammo_meters.tga

I can't figure out how to get a tga to show in the forums so I just provided the file itself
 

forrestmark9

New Member
Aug 6, 2009
56
0
0
The HUD components must be drawn as individual parts. I don't know how the Halo HUD works, but UT2004 has quite a number of examples already.
For example, the Assault Rifle draws the number of grenades left as individual grenade icons. The HUD itself draws bars of varying length for remaining ammo in the weapon bar or weapon charge above the ammo counter.

That thing on the weapon model itself may in fact just be a texture with a green/blue color transition that is panned according to charge level and combined with the weapons "static" skin parts by adding or alpha-blending with a fixed mask. Such a combination technique can be seen on the UT2004 Linkgun.
The UT2004 Shockrifle shows how to modify a skin parameter at runtime without using ScriptedTextures, though it's an alpha value, not a panning position. For that you'd probably use a TexScaler with scale 1 and mess with the offset values to achieve the desired effect.

Also with the Plasma Rifle meter how Halo does that meter is it uses a custom shader called shader_transparent_meter here is an example of how the meter works

http://i.imgur.com/W3PTGrN.png

What it does is in the texture is has a grey scale, the meter starts at black and ends at white, in the shader I showed the gradient colors is what is shown in the picture and background tint is what's seen at the end there which the meter has as a color when not being affected by the heat level. The gradient is does exactly what a gradient does as the heat level rises the engine moves the meter up the texture and changes the color

I do not know how this would be done in UE2

Here is the texture for the plasma rifle and the other for the plasma pistol
1SX7HeC.png

HsAMJ13.png