Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Updates
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

[GTA:DE] - How to Change the Colors of Materials


ThePedro004
 Share

Recommended Posts

ThePedro004
Posted (edited)

This tutorial is one of the more advanced ones, so I suggest you have read at least as far as the models tutorial. We will need the HxD Hex Editor, you might remember how we used it to duplicate original materials from the game and use them under different names. In this tutorial we will do something similar, but a little more advanced.


Suppose you want to change the color of the sea water in the game, or even the radar, because now it is no longer based on images, but rather a 3D model (a kind of vector). To do this we will have to modify the material used in these models.

First, find the material you want to edit, let's suppose you want to edit the color of some element of the minimap, like the grass. Her Material Instance is located in SanAndreas\Radar:

Imagem
 

Now right-click on it and click Save Packages, select a save location, and click ok. This will save the .uasset and .uexp without extracting. Now extract the material as well by right clicking on it and clicking Export. In the folder you exported you should see these two files:

Imagem

By opening the .txt we will easily find a color parameter:

Imagem

 

We have the RGB there in float form, which goes from 0 to 1 instead of 0 to 255. We see that the R for Red is 0.016807, let's save this number, minimize the .txt. Now go to the folder where you selected Save Packages, you will see that there is the .uasset and .uexp file, you can delete the .uasset, it is not important in this case. Open the .uexp in the HxD Hex Editor:

Imagem

 

Now let's search for the value of Red, remember? 0.016807.

(For some reason, it seems that when you install HxD in certain languages like Portuguese, it exchanges dots for commas. So in this case you should actually look for 0,016807, if the program is in English you probably don't need to do this

Go to Find or press Ctrl + F.

Imagem

By default it is set to search for text, as in the models tutorial, but we need to search for the color float, use the little arrows up there and select Floating point number. Now paste the value of R in the search field (remembering to use a comma instead of a period, depending on your language) and click search all.

Imagem

Imagem

We found it! You can see the float value of this selection in the sidebar:

Imagem

It is almost never the exact value there, it usually has a few more numbers, but it is normal. Now that we have found the Red, let's check if the Green is the same? Select the 4 bytes to the right of what you found (every two characters together are one byte) and check in the sidebar:

Imagem

Imagem

0,078! If we go into the notepad and check the value of Green:

Imagem
 

Same value! So the next 4 bytes should be Blue and the 4 bytes after it should be the value of Alpha (which in this case is 1). Now, how do we change these values? Simple, in the sidebar, under Single (float32), you can enter whatever value you want, use this site to convert normal RGB colors to float. We will use the values in RGB Normalized Decimal:

Imagem

Choose your color, in my case I'm going to change the grass to a strong red, we see there that the value of Red has to be 0.921, so in my Hex Editor I'm going to select the 4 bytes corresponding to the Red value and change the value to 0.921:

Imagem
It will be in red where you changed it, now let's change the next 4 bytes that correspond to Green, in my case, 0.019.

Imagem

 

Notice that when you press enter, the value is never exactly the same as you typed, it approximates, this is normal. Now I will edit blue, and I guess I don't need to explain, right? See how it looks at the end:


Imagem

Now save the file, delete the .pak and compile the mod in the same path as the original files and test in-game.

Imagem

It works! Notice that not all the grasses on the map have changed, but that is because the grass has various materials (from 01_ to 0_3).

Tips:
At least with the radar materials, the color offset will always be the same in Hex! If you see in the images, the colors are between offset 00000110 and 00000120, you can simply go straight to edit there in the same place in any material of the mini-map (there are some that don't, like MI_HiddenZone). But don't try to copy a file with one color and rename it to replace another! It gets buggy, do it manually for each one, you can copy the values of the offsets mentioned above in each file, it works fine.

 

If you are going to make a color mod for the mini-map, make sure you also edit MI_Hiddenzone, because it controls the colors of the hidden parts of the map. If you want you can use as a base the one that comes in GTA 5's radar mod.


Next Tutorial: Soon

Back to the Tutorials Index

Edited by ThePedro004
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.