Results 1 to 3 of 3

Thread: (Utility) Halo Alpha Rescaler (fixes ammo meter gradients)

  1. #1

    (Utility) Halo Alpha Rescaler (fixes ammo meter gradients)

    I tried making an ammo gradient for a 13 missile vehicle and no matter how perfectly I set up the gradient in the alpha it would always be off. So I did some testing and figured out WHY this is happening. I will paste the readme from here on out to make it easier on me.


    Have you ever noticed that no matter how hard you try your ammo meter gradients never work exactly how you want them to? Well cry no more because I bring to you the Halo Alpha Rescaler(yea I couldn't think up a better name so shut up).


    What this tool does:

    In the image below take a look at the part that says "0 - 255". It's a perfect gradient that goes up by exactly 1 for every pixel it moves to the right until it hits 255. Now when I compiled it into a meter and opened the tag in Guerilla it displayed that perfect gradient as exactly how it looks in the area "HALO SCALED".

    Name:  Halo Alpha Scaling.PNG
Views: 247
Size:  10.2 KB



    Now what this means is that even if you made a perfect gradient in photoshop, halo would not read it as such. It will add a curve to it so any ammo meters that you try to make will not work correctly. This issue is most prominent with weapons with large magazines (and also don't use bars like plasma weapons do) such as SMG's and Assault Rifles.

    Well I took scaled the gradient halo turned mine into and, in combination with the original, came up with the "Conversion Gradient" seen above. When I ran this "Conversion Gradient" through tool and viewed the result in guerilla it gave me the "Converted Gradient" also seen above. It's almost perfectly identical to the "0 - 255" only there are about 20 or so values that cannot be obtained because halo skips over them (a few of them are 2, 7, 12, and 16).


    Now what does this tool actually DO? It takes a greyscale image and converts it using the "conversion_gradient.png" so when you compile the converted meter in tool and view it in guerilla it looks and acts how you intended for it to. Here's an original(top) and converted(bottom) of the ammo meter I was trying to make.


    Name:  Example1.PNG
Views: 232
Size:  29.7 KB
    Name:  Converted Example1.PNG
Views: 228
Size:  22.9 KB


    The difference isn't very noticeable unless you lay them on top of each other and toggle visibility, but it makes a big difference to Halo.



    How to use:

    1: Copy the alpha from your hud element's texture (the part that actually contains the gradients halo uses to fill the meter) and paste that into the RGB of a new image file.
    2: Save the new image into the Input folder as a .png (ONLY .PNG FILES WORK)
    3: Repeat steps 1 and 2 for any hud elements you need to convert.
    4: Double click "Halo Alpha Rescaler.jar" and it will convert all the files in the "Input" folder and save the converted versions in the Output folder.
    5: Load the converted image into your editing program and copy it into your hud element texture's alpha and save.


    DOWNLOAD
    Don't whine that it doesn't work if you didn't read the readme. THERE IS NO GUI. It's a simple run and done program.


    This program was written by me, Moses(though in places I go by Exelixis and my deviantart is Chief-01), and is my first standalone program I've ever written so don't complain about it lol. Arby(aka The Arbiter / Gabo7) WOULD have gotten a mention right here, but he complained and wanted me to make such a simple tool have a GUI, so no. Oh and TheKillerDonut(aka Donut) for a little help debugging.

    Also, I've included the source code in case you guys want to mess with it (though I don't see why you'd want to). Just make sure to credit me if you modify it. And don't bitch about me using Java. I barely even know java to begin with so it took me 2 days to write this simple program.
    Last edited by Moses; April 3rd, 2013 at 03:27 PM.
    Reply With Quote

  2. #2
    Kid in the Hall Kornman00's Avatar
    Join Date
    Sep 2006
    Location
    ◕‿◕, ┌( ಠ_ಠ)┘
    Posts
    3,130

    Re: (Utility) Halo Alpha Rescaler (fixes ammo meter gradients)

    Your rockets look like dongs lol

    Good job from the looks of it (I don't mess with HUDs, let alone bitmaps)
    Reply With Quote

  3. #3

    Re: (Utility) Halo Alpha Rescaler (fixes ammo meter gradients)

    Good job, mo.
    Reply With Quote

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •