NFSAddons Forums

Team RSR Forums => NFS:HS Workshop => Topic started by: Freak-DS on Feb 13, 2012, 1:48 PM

Title: Alpha channels with GIMP
Post by: Freak-DS on Feb 13, 2012, 1:48 PM
Thanks to AJ_Lethal for this tutorial! I'll post it over here to make sure it won't get lost.
-----------------
(download off-line tutorial here (https://skydrive.live.com/embedicon.aspx/P%c3%bablico/tutorialtga-gimp.rar) - click on the icon, then "download")

NFSHS (and NFS3) car textures (car00.tga) do have something called "alpha channel", which tells the game what kind of colors are assignated for the car. To edit them, people usually has Photoshop or Paint Shop Pro to do the job, but if you are broke (and want to stay legal), there's a third way: GIMP.

GIMP is basically the freeware alternative to Photoshop, with some interesting features. But when it comes to editing alpha channels, it could be a royal PITA to accomplish the task. Luckly, I figured it out and I'm going to tell you how to do it.

Step 1: Meeting GIMP and asking her out
The first time you fire up GIMP, it would look like this:
(http://img69.imageshack.us/img69/2657/gimp1stboot.th.jpg) (http://imageshack.us/photo/my-images/69/gimp1stboot.jpg/)
[list=1]
The toolbars can be customized to your liking, but we're going to use the default layout for this tutorial.

Step 2: Let's put the channel together
At this point, I will assume you will have your shiny new texture map ready for this. But you don't want to risk your precious job in case you screw up, right? Well, I packed a testing texture map file (test.bmp) attached to this tutorial in here.

The map as you see, is weird (since it's a testing map, don't try to figure out it's sense, otherwise you will end up in a psych ward for the rest of your life)

Alright, let's put our hands to work.

Step 3: Saving the alpha (and the file)
Now that we have the alpha ready, it's time to save it, alongside the file. Right-click the "Background" layer and select "Apply Layer Mask". Now the alpha will merge with the image. Then go to File > Save / Save As... (keyboard: Ctrl+S / Ctrl+Shift+S) and save it as car00.tga.

A dialog will appear. Set it this way:
(http://img845.imageshack.us/img845/1764/tgasetting.jpg)
And you're done. Is not that difficult, isn't?


Additional notes
If you want to edit an existng file's alpha channel, right-click the "Background" layer, select "Add Layer Mask", check the "Transfer Layer's Alpha Channel" option. Edit as you desire and save as described in Step 3.

I hope this tutorial will be useful to you. AJ signing out.
Title: Re: Alpha channels with GIMP
Post by: AJ_Lethal on Feb 14, 2012, 10:36 AM
Step 3 fix: the origin should be "Bottom left", otherwise the texture will appear flipped in ZModeler.
Title: Re: Alpha channels with GIMP
Post by: Zpectre on Feb 17, 2012, 3:42 PM
Does it save in the "correct" NFS4 tga format? I remember PSP9 saved the file in a format that NFS4 could read correctly, but NFSWizard displayed the tga with a yellowish hue.
Title: Re: Alpha channels with GIMP
Post by: AJ_Lethal on Feb 18, 2012, 7:44 AM
I guess so.
Title: Re: Alpha channels with GIMP
Post by: AJ_Lethal on Aug 18, 2023, 12:34 PM
Massive necrobump, but I updated the tutorial a time ago to include values for GIMP 2.10
https://nfsmodderscorner.blogspot.com/2021/05/creating-alpha-channels-for-car.html
Title: Re: Alpha channels with GIMP
Post by: bfut on Sep 02, 2023, 6:00 AM
https://www.nfsaddons.com/downloads/nfshs/tools/7891/bfut-nfstgaconverter.html

In case you want to convert alpha channels between NFS3, NFSHS, and MCO, the above scripts are available. Includes documentation. Does not require GIMP or other huge installations.