A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
  
 
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »(Utility) Halo Alpha Rescaler (fixes ammo meter gradients)

Author Topic: (Utility) Halo Alpha Rescaler (fixes ammo meter gradients) (11 messages, Page 1 of 1)
Moderators: Dennis

MosesofEgypt
Joined: Apr 3, 2013


Posted: Apr 3, 2013 04:29 PM    Msg. 1 of 11       
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".

http://www.imageuploaddirectlink.com/uploads/13650206371.png

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.

http://www.imageuploaddirectlink.com/uploads/13650206372.png
http://www.imageuploaddirectlink.com/uploads/13650206373.png



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.


Here's exactly what halo was doing to my meter:
http://www.imageuploaddirectlink.com/uploads/13650358031.png

I opened the tag in guerilla after I compiled it, screenshotted it, and then pasted it into the picture. What was actually happening to my meter ingame is that the first 3 missiles would fire and the meter would work like it should, but when i fired the 4th missile it didn't change the meter at all even though i MADE it perfect. then on the 8th missile instead of going down just one like it should it went down TWO. It shifted my meters values when it loaded it into the game. Unless my copy of Halo is different than yours I'm sure you will be able to notice this too.


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:

http://chief-01.deviantart.com/art/Halo-Alpha-Rescaler-363249172

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. Also, if you delete "conversion_gradient.png" from the same folder as the jar the program will not work. So don't do it.


Changelog:

V1.0 Initial Release
V1.1 Fixed a bug that caused the program to stay open and hog resources.


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 crucify me for using Java. I barely even know java to begin with so it took me 2 days to write this simple program.
Edited by MosesofEgypt on Apr 4, 2013 at 12:45 AM


Donut
Joined: Sep 30, 2006

I swear I'm not actually dead


Posted: Apr 3, 2013 04:36 PM    Msg. 2 of 11       
Donut checking in for the first time in like, 2 years. This is the same Moses that used to work in Sigma with me. Verifying the legitimacy of this tool.


MosesofEgypt
Joined: Apr 3, 2013


Posted: Apr 3, 2013 04:57 PM    Msg. 3 of 11       
I'd like it if everyone that uses it tells me if it worked for them, actually helped, and if they were able to notice the difference. You don't have to, but it's always nice to get feedback :)


Jesse
Joined: Jan 18, 2009

Discord: Holy Crust#4500


Posted: Apr 3, 2013 05:27 PM    Msg. 4 of 11       
Hm, I could see myself using this as I make HUD elements all the time. I don't understand one thing though, does this make smooth gradients show up as actual smooth gradients for a meter alpha? I noticed that PS never makes perfect gradients, and in halo, it's like the pixels are racing each other to get to the end first. I used Illustrator and got perfect gradients that had none of that all all, and so did Masterz for CMT's older MPV2 HUD.


MosesofEgypt
Joined: Apr 3, 2013


Posted: Apr 3, 2013 06:45 PM    Msg. 5 of 11       
This corrects it so that when halo views the image the values of all the pixels will appear exactly how you want them.

Example: Say I wanted an ammo meter with 60 rounds in it and each round is masked off with a gradient going up by 4 for each bullet. So for the bullets it'd be 4, 8, 12, 16, 20, 24, etc until it got to 240. Well you could compile that gradient into halo and the information in the tag would be exactly how you want it to look, but when halo actually USES the bitmap(i.e. loading it in guerilla or halo) it shifts the values around. So instead of your 6th bullet being masked off with 24 halo would see it as masked off with 17(thats actually what 24 converts it to). My utility here applies a reverse filter to it and that 24 is changed to a 34 so when halo views it it sees that 34 as 24, which is what you want it to see it as.

Hope that wasn't too confusing.


Jesse
Joined: Jan 18, 2009

Discord: Holy Crust#4500


Posted: Apr 3, 2013 07:31 PM    Msg. 6 of 11       
No I understand what you are saying now, thanks for clearing it up. What I don't get now is WHY we need the tool much. For weapon meters I would use the gradient method of determining which alpha value goes for each meter bullet, I think this would naturally circumvent the issue of alpha values not properly being read.

EDIT: With what you wrote, it seems you are using a gradient in a meter (segmented with bullets)? I use the solid alpha values and manually fill them in with PS or Paint.


MosesofEgypt
Joined: Apr 3, 2013


Posted: Apr 3, 2013 08:37 PM    Msg. 7 of 11       
I am not using gradients for my bullets. Here's a clear cut picture of what was happening with my meter. Donut also said he had this problem with an SMG and redid it about 4 times and said screw it and left halo.

http://www.imageuploaddirectlink.com/uploads/13650358031.png

I opened the tag in guerilla after I compiled it, screenshotted it, and then pasted it into the picture. What was actually happening to my meter ingame is that the first 3 missiles would fire and the meter would work like it should, but when i fired the 4th missile it didn't change the meter at all even though i MADE it perfect. then on the 8th missile instead of going down just one like it should it went down TWO. It shifted my meters values when it loaded it into the game. Unless my copy of Halo is different than yours I'm sure you will be able to notice this too. When I ran it through my converter though, it worked ingame so that shows I at least did something right.

Edit: Also, I've extracted the raw dds from the tag using HMT after I compiled it into a map just to see if tool actually modified my meter when it saved it. It DIDN'T. The meter was exactly how i made it, 10, 30, 50, etc. Halo just INTERPRETS it differently than we want it to.

Edit: You can make photoshop make perfect gradients by turning the smoothness down to 0 in the gradient settings. That's how I made mine. I checked it and it is perfect. There might be 1 pixel thats shifted because of having to draw it with a mouse, but it's linear.
Edited by MosesofEgypt on Apr 3, 2013 at 09:19 PM


Corvette19
Joined: Feb 27, 2007


Posted: Apr 3, 2013 08:43 PM    Msg. 8 of 11       
Quote: --- Original message by: Donut
Donut checking in for the first time in like, 2 years. This is the same Moses that used to work in Sigma with me. Verifying the legitimacy of this tool.


nice to see you again


MosesofEgypt
Joined: Apr 3, 2013


Posted: Apr 3, 2013 11:31 PM    Msg. 9 of 11       
Also I forgot I had this image. Take a look at this histogram of what halo changed my gradient into. They SHOULD be evenly spaced apart.

http://www.imageuploaddirectlink.com/uploads/13650478481.png
Edited by MosesofEgypt on Apr 3, 2013 at 11:57 PM


MosesofEgypt
Joined: Apr 3, 2013


Posted: Apr 3, 2013 11:59 PM    Msg. 10 of 11       
Which stands for Sub-atomic Omni-directional Probative Hyper-responsive Indomitable Abdicator.

GOOGLE IT

Edit: Also, I found out through testing that xbox halo doesn't need to have the alpha channels converted for hud elements cause the meter is stored in the rgb instead of the meter image AND the rgb is collapsed into a monochrome channel so you're left with a black and white channel and an alpha channel.

AND I just found out that I can swap the conversion_gradient.png with the gradient in the "Halo Scaled" part and it'll convert the image back to normal. There is a bit of quality loss but it's better than nothing if you accidentally deleted your original.


You guys might want to redownload the program. I fixed a bug that was causing the program to stay open and possibly lag the system.
Edited by MosesofEgypt on Apr 4, 2013 at 12:46 AM


Jesse
Joined: Jan 18, 2009

Discord: Holy Crust#4500


Posted: Apr 4, 2013 12:51 AM    Msg. 11 of 11       
Quote: --- Original message by: MosesofEgypt

Which stands for Sub-atomic Omni-directional Probative Hyper-responsive Indomitable Abdicator.

GOOGLE IT

Edit: Also, I found out through testing that xbox halo doesn't need to have the alpha channels converted for hud elements cause the meter is stored in the rgb instead of the meter image AND the rgb is collapsed into a monochrome channel so you're left with a black and white channel and an alpha channel.

AND I just found out that I can swap the conversion_gradient.png with the gradient in the "Halo Scaled" part and it'll convert the image back to normal. There is a bit of quality loss but it's better than nothing if you accidentally deleted your original.


You guys might want to redownload the program. I fixed a bug that was causing the program to stay open and possibly lag the system.
Edited by MosesofEgypt on Apr 4, 2013 at 12:46 AM


I comprendo.

Do you have an AIM/MSN/LIVE/Xfire account you could add me at? PM me here at the forums with your answer.

 

 
Previous Older Thread    Next newer Thread







Time: Thu January 19, 2023 12:19 AM 141 ms.
A Halo Maps Website