Author Topic: Saving INDEX file for mainhall mask .PCX  (Read 2070 times)

0 Members and 1 Guest are viewing this topic.

Offline Flattop

  • 22
Saving INDEX file for mainhall mask .PCX
What are the settings that need to be used in photoshop (IMAGE> MODE> INDEXED COLOR) when saving your mainhall mask RGB/8 photoshop file to an INDEXED .PCX ?

I used default settings and they didn't work.
Default settings converted all the different RGB values to 255.
I then tried another setting, and while it kept the values the same the index file didn't work when used as a mask even though I used the same values from the mainhall creation tutorial:

Exit Button [255,255,255]
Barracks Button [254,254,254]
Ready Room Button [253,253,253]
Tech Room Button [252,252,252]
Options Button [251,251,251]
Campaign Button [250,250,250]

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Saving INDEX file for mainhall mask .PCX
The problem is probably that you don't have your index mapped correctly. I can show you how to do this when I'm not on my phone.

However, the easier way (since this is not a terribly useful skill these days) is to open one of the retail or even one of my mask files and just edit that. Be careful not to add layers or anything that would cause Photoshop to try to save it as a PSD instead when you hit ctrl-s.

As a side note, I should make a new tutorial showcasing the new main hall features...
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Flattop

  • 22
Re: Saving INDEX file for mainhall mask .PCX
What I have done to get it to work at the moment is just open the 2_mainhall_SOC-m index file, and paint over it, then resave.
The issue is when creating/saving an entirely new index file from a new RGB photoshop file from scratch (without using the 2_mainhall_SOC-m).
I'm not sure what you mean by the term 'mapped correctly'.
If you mean whether or not the RGB values are in the appropriate place for the buttons, then yes they are.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Saving INDEX file for mainhall mask .PCX
An indexed image is a little more complicated than an RGB image. An indexed image includes a color map in the file that has a list of numbers associated with a list of colors. Then each pixel, instead of including three or more numbers for RGB(A), only has one, the index number that relates to the color for that pixel. This is a form of compression and is a good idea in the world of 256 colors or less. In the world of millions of colors that we have today, it's not very useful. Mainhall masks, is a clever use of it, though.

Here, take a look at this. To do this in Photoshop, you need to go to Image -> Mode -> Color Table. You'll then see the indexed color map. If you change the colors there, then you'll see the colors on your image change wherever they are linked to that particular index.

Additionally, I have found that Photoshop maps it's color table slightly differently than what FSO expects to find. It took me a lot of trial and error to get an indexed image out of Photoshop that FSO agreed with and in the end, I think I had to use another program inbetween. I haven't tried since, because it's not worth it. It's way easier to open an existing mask file, change it however I need and then save it as a new mask. You're creating the file you need without having to deal with the outdated, numbery/mathy stuff that goes on behind the scenes.

TLDR: It's definitely possible to create an RGB/8 image in Photoshop and then save it as an indexed .PCX for FSO to use as a mask file, but it's difficult and complicated. Just use an existing mask file edited to your heart's content.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Flattop

  • 22
Re: Saving INDEX file for mainhall mask .PCX
It took me a lot of trial and error to get an indexed image out of Photoshop that FSO agreed with and in the end, I think I had to use another program inbetween.

Well, this time I tried using 'Custom' from the color table.
I selected the appropriate RGB values corresponding to the doors, then saved as an index.
I then put it in my interface folder to check if it worked, but it didn't.
When I scrolled over with the mouse the buttons would not register.
Comparing it with the 2_mainhall_SOC-m file, it is virtually identically in the sense that you can select the colors and they will display with the same RGB numbers.

So obviously I'm missing something.
You mentioned you had to use another program inbetween? Do you remember what it was?
It would be useful to know because the problem with reusing the 2_mainhall_SOC-m index file is that you can't drag any other image on top of it to use as a guide when painting.
A guide would show you where your buttons are located on the image so you don't have to guess where to paint.

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: Saving INDEX file for mainhall mask .PCX
I don't remember, it could have been IRFanView or something.

I still don't think it's worth the trouble. Here's what I do. Open the image you want to use as a guide in Photoshop. Create a new layer and build your mask on that layer using the proper RGB values. Then open the 2_mainhall_SCO-m file in Photoshop. Change it's width/height to what you need for the new mask. Go back to the layer you created, select all and copy it. Return to the SOC-m and paste it. It should paste right on top without creating a new layer. Because of how Index images work, that should set it up properly. It's been a while since I made a mask file and I'm writing this from work off the top of my head... so I may have missed a step. Guess we'll find out.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 

Offline Zacam

  • Magnificent Bastard
  • Administrator
  • 211
  • I go Sledge-O-Matic on Spammers
    • Steam
    • Twitter
    • ModDB Feature
Re: Saving INDEX file for mainhall mask .PCX
Flattop: Please don't delete relevant Q/A threads once you've been supported, it makes it impossible for anybody else to find them useful.
Report MediaVP issues, now on the MediaVP Mantis! Read all about it Here!
Talk with the community on Discord
"If you can keep a level head in all this confusion, you just don't understand the situation"

¤[D+¬>

[08/01 16:53:11] <sigtau> EveningTea: I have decided that I am a 32-bit registerkin.  Pronouns are eax, ebx, ecx, edx.
[08/01 16:53:31] <EveningTea> dhauidahh
[08/01 16:53:32] <EveningTea> sak
[08/01 16:53:40] * EveningTea froths at the mouth
[08/01 16:53:40] <sigtau> i broke him, boys

 

Offline Flattop

  • 22
Re: Saving INDEX file for mainhall mask .PCX
Sorry, didn't know you wanted it kept.
I removed it since the problem was resolved, and it tends to get a bit cluttered in that section of the forum.