Page 1 of 1

[Halo 2] How to edit A8R8G8B8 and X8R8G8B8 DDS textures

Posted: Fri Jun 30, 2006 11:00 am
by neodos
Hello everyone,

This tutorial will learn you howto change the colors of the A8R8G8B8 and X8R8G8B8 DDS textures.
Some people is going to say "ha! we can edit those textures with photoshop and the new DDS plugin"
Well not all textures for the moment :roll:

For those who wants to change the colors of the mainmenu, the arrows and icons but you never be able here is how to BY HEX EDITING! , i am still waiting for someone who can make an app because i dont know make programs :oops:

Tutorial:

What you need:
-CH2r v0.9.3
-Calc of windows to make conversions Hexadecimal to Decimal.
-Color palette, use windows paint for this.
-Basic knowleage of hexediting
-A hex editor(hexworkshop prefered for this tut)
-Patiente and concentration

So how it works a texture like that?

Well for the A8R8B8G8 and XA8R8B8G8:

A=alpha color
R=red color
B=blue color
G=green color

What are those 8??

8 = 8 bits in hex two words

So imagine that our 8 bits for the Red color are at 1
8= 1111 1111
on hex F F

And FF( 2 hex words) are trnslated in decimal by 255, when you are on the color pallet of paint you have RGB cases for the colors from 0 to 255 for the RGB colors so 00 to FF on hex.


How to do change the color of a A8R8B8G8 or XA8R8B8G8 DDS textures by hex?


For this example i will use the speaker, on the pregame lobby you can see if the microphone is connected or if someone is talking, with this indicator, the speaker has 3 bitmaps for this:
-Microphone disconnected Image
-Microphone connected Image
-Someone talikng Image

Extracting the bitmap:
Well open mainmenu with Ch2r v0.9.3 and extract the 3 bitmaps of the speaker:
ui\screens\game_shell\pregame_lobby\speaker.bitm

You have those 3 bitmaps on a folder make a backup!

You will need the Calc of windows to make conversions Hexadecimal to Decimal.
And a color palette, use windows paint for this.

Hex editing:

Open the fisrt bitmap on the hex editor, speaker.0.0.dds.
So as i said before,a color on hex = 2 words of hex= 0 to 255 on decimal

A= lighting(i am not sure) but we will ignore this valvues, actually A= FFFF FF00 so it is the higher valvules for RGB= 255 255 255
And 00 is another valvue(i dont know what)
This will help you to find the RGB colors.

How can we find the good valvues for RGB?
Well as you can see, sometimes there are a lot of repetitions ignore FFFF FF00.
For the RGB colors ignor what is after the 6 hex words:
FF85 05 :00<< ignore the 2 last words(its always different but i didn't tried to change it)

And find repetitions of a group of 6 hex words, at the begin of the file you will see "FF85 05" its a color.
Convert it to decimal with the calc like this.
FF = 255 = Blue color
85 = 133 = Green color
05 = 5 = Red color
Image

Now go in the color palete and put the valvules 255 133 and 5 on the RGB cases you will see what color us it, its blue.
Image

Now replace all "FF85 05" by the color that you chose, fo this example i will take
Blue color = 0 = 00
Green color = 191 = BF
Red color = 255 = FF

So the new color is orange.
This is how it should looks like on the hex editor 00BF FF.

Now replace(CTRL+H on the hex editor all) the "FF85 05" hex words by "00BF FF".

Chose "Replace all"
Image

It will replace 267 words of hex(colors RGB).
Now you see on red what you changed, but you only changed one color, there can be a lot of colors, of course replace always fisrt the color the most used.
Image

Now there's stay more colors to replace, the difference is there are not a lot repetitions for a color, if you really want something perfect with exaclty the sames gradiants of colors you should make a new draw on paint with all colors you found to compare the differencies of color.

But you can replace all colors by "00BF FF" because there's not much diference of color just a bit darker or lighther and as i said there are 2 words fllowing 6 words of RGB colors, i dont know what is that, but if i replace all colors by the same color(00BF FF) the picture is always with the same range of colors, maybe this mean that those 2 words of hex indicate the lighting or maybe it is the A8 valvues.

And now if you are so lazzy,like me,replace all colors valvues by 00BF FF.

here is the list of colors for this bitmap:
FF85 05
F99F 3E
FC95 24
FCEF DA
FDF0 D9
F9E3 C5
...
etc, there are more just find it yourself, you will have to do this for all bitmap, ha! and sometimes for big bitmaps you can have hundreds of uniques colors, so maybe it is not really resonable to chage it one by one?

Well for this bitmaps(speakers) there are not much colors to change,its for that i choose this one :wink:

So once you changed the colors, save and inject the bitmap with CH2r(choose "old bitmap editor") to inject on mainmenu.map


Resign, upload to your xbox go to the lobby pregame and look the the microphone indicator!! ohhhh its orange Image :shock:

Do the same manipulation for the other bitmaps, searching the principal colors on Hex.

Well that's all for the A8R8G8B8 and X8R8G8B8 DDS textures.

Yes i know everybody its going to say "ohhh.. its so long..." yes long long long and impossible when the picture have to much gradients of colors.
I think the only solution is to make an application but i dont know programming :roll:

If there's someone who wants to make an app it wloud be cool :wink:

-----------------------------------------------------------------------------------------

And now some research about HUD textures!

Firstly those textures are on shared.map everytime you mod it you will have to delete de the cache to reload the new textures.

Well the HUD textures(sensor, shield meter,weapons ammo...) are on A8R8G8B8 and X8R8G8B8 DDS textures format or A8Y8(for animated textures).
A8Y8 doesn't have R8G8B8 on the name :roll: this mean it doesn't have color.

After some research i bring the conclusion that the A8Y8 is maybe just like a bump map(A8) with transparent gradients(as looks like the shiled_meter) but i dont really know what mean this "Y8", if the texture is like that, that mean the texture dont have color but something on the game give to it a color.
And i think the used A8Y8 because its used for animated textures, if you look there are 8 bitmaps for the shield_meter.
One for when the shield is down, one when the sield is normal, and 6 for the shield recharge animation on the hud.

:) now i understand how works the Hud textures.

Just moded the fisrt texture of the shield_meter.bitm
By nulling out one range of the colors,Blue and Red colors of the Alpha.

Normal hud:
Image

Moded hud:
Image

Moded hud with overshield:
Image

So the normal color of those Alpha-RGB i changed were green(transparent,when editing!) but now i changed the color to yellow i completly transparent and ingame there's not blue color.

When overshield is on there's too a completly transparent zone(what i changed) so in conclusion, those texture doesn't have any color, it just a Alpha texture and a gradient map.

And coming back to the HUD with A8R8G8B8 and X8R8G8B8 DDS
textures, those contains 2 colors, blue and green.
Green is transparent.
And the color(blue for a spartant and purple for an elite) is not in the texture, the game give it a color.So if you tru to change the "color" in fact it will be completly transparent.
I think that some colors correspond to the level of transparence.

Thanks for reading hope it will help you :lol: