HOW TO: Reduce the number of Palettes

HOW TO: Reduce the number of Palettes; support/discussion/questions

Moderator: thunderchero

Dr_Breen
Commodore
Commodore
Posts: 889
Joined: Wed Apr 30, 2008 2:00 am
Location: Zurich, Switzerland
Contact:

HOW TO: Reduce the number of Palettes

Post by Dr_Breen » Sun Mar 22, 2009 10:55 am

This Topic shows you how you can reduce the number of palettes used in BotF. As Dcer figured out quite a while ago the maximum numbers of palettes that trek.exe can use is 127. here's a small example how your ships look like when you use more than the maximum number of Palettes allowed:
zuvielepolys.gif
zuvielepolys.gif (96.87 KiB) Viewed 1329 times

In vanilla botf 122 palettes are already in use, so after adding 5 custom ships to the game you will run into this problem.

this little how to will show you how you can make 2 (or more) textures using one palette together.

here i am using a model of a cardassian hutet(it can be found in the downloads somewhere), the model uses 3 textures, and they have 3 different palettes. but all the textures look quite similar so it makes sense to make them use the same palette.

nr1:
cm1_c.gif
cm1_c.gif (112.04 KiB) Viewed 1329 times
nr2:
cm1_b.gif
cm1_b.gif (120.83 KiB) Viewed 1329 times
nr3:
cm1_a.gif
cm1_a.gif (81.87 KiB) Viewed 1329 times
as you see the texture nr2 has the widest spectrum of colors while nr3 only uses brown, white and orange colors, so if we'd use the palette of texture nr3 we would never be able to display the red spots in nr2 or the black ones in nr1...similar applies to nr1 too. so we use nr2's palette.

here i have loaded all three texture files into adobe's photoshop (this is CS 3 but i am sure it works with older versions as well, i have tested it sucessfuly with CS 2)
i highlighted the one i selected before (nr2), now i go to the the color table... menu :
colormenu.jpg
colormenu.jpg (123.36 KiB) Viewed 1329 times
and save the color table of this texture:
savetable.jpg
savetable.jpg (84.61 KiB) Viewed 1329 times
now i highlight the next texture, this texture is indexed as well, so i change it to RGB
changetoRGB.jpg
changetoRGB.jpg (134.18 KiB) Viewed 1329 times
and then back to indexed color...
changetoindex.jpg
changetoindex.jpg (136.1 KiB) Viewed 1329 times
Note: Don't go to the color table... menu again as photoshop doesn't recompute the picture again in this menu but simply replaces one palette by another which makes the picture look quite funny after it's done.

once i change back to indexed color... a menu pops up where i select the custom... option:
indexmenu.jpg
indexmenu.jpg (49.05 KiB) Viewed 1329 times
in the following menu i load my palette i saved from nr2 before.
loadtable.jpg
loadtable.jpg (86.63 KiB) Viewed 1329 times
now the texture uses the palette of nr2...the problem is that the texture also used colors that nr2 doesn't have...photoshop tried to recompute these colors as good as possible with the colors avaiable in the new palette. the diffusion option in the indexed color menu allows you to tell photoshop how exactly these colors should match the old ones...here you can experiment around as sometimes high values are good and in other times a low value looks better.

i have zoomed in a little bit to show you the difference of high and low values:

100% diffuse:
diffusion100.jpg
diffusion100.jpg (63.84 KiB) Viewed 1329 times
1% diffuse:
diffusion1.jpg
diffusion1.jpg (66.52 KiB) Viewed 1329 times
in this case i'd choose a low value it looks better but as i wrote before this is individual for every picture. as a rule of thumb the diffusion value must be higher when the palettes differ more from each other. so if you want a galaxy texture use the palette of a warbird texture (not really recommended :wink: ) you should use a very high value, on the other hand if you make a galaxy texture use a nebula texture's palette a low value will do fine.
Public BotF / EF2 Teamspeak 3 Server: 83.169.13.55

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5926
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Post by thunderchero » Sun Mar 22, 2009 11:09 am

Thank You Dr_Breen,

I know I needed this I am sure this will also help others.

thunderchero

Dr_Breen
Commodore
Commodore
Posts: 889
Joined: Wed Apr 30, 2008 2:00 am
Location: Zurich, Switzerland
Contact:

Post by Dr_Breen » Sun Mar 22, 2009 12:54 pm

yep i made it extra simple and explained every step i did so any newcommer in the botf modding community can follow it :wink:
Public BotF / EF2 Teamspeak 3 Server: 83.169.13.55

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5926
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Post by thunderchero » Sun Mar 22, 2009 11:14 pm

This does work great :lol:

I was playing with 1.0.2 with lowered palette with my explosions.rar at 102 palette count, and did only ferengi models. I used ferengi starbase as color table for all models, and I can not notice any difference. now palette count is 92 8O

also forget redid gifs for explosions.rar and lowered it even more to 89 8O

:idea: "How many more ships models can I add now?"

great job Dr_Breen, if I can do it that easy.....

thunderchero

Dr_Breen
Commodore
Commodore
Posts: 889
Joined: Wed Apr 30, 2008 2:00 am
Location: Zurich, Switzerland
Contact:

Post by Dr_Breen » Mon Mar 23, 2009 11:42 am

thunderchero wrote: :idea: "How many more ships models can I add now?"
after calculating two days and nights i came to a result of 38 :lol: :lol: :lol:
Public BotF / EF2 Teamspeak 3 Server: 83.169.13.55

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5926
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Post by thunderchero » Mon Mar 23, 2009 10:59 pm

Dr_Breen wrote:
thunderchero wrote: :idea: "How many more ships models can I add now?"
after calculating two days and nights i came to a result of 38 :lol: :lol: :lol:
X3 :lol: :lol: :lol: :lol:

Also was tring to combine the *pton.gif's into one palette.

these files are complete differant colors, But i thought of a way :wink:


I created a 512x768 canvas and put all six 256x256 gifs on canvas. then saved as gif. opened gif and saved color table, Then used that color table on all 6 *pton.gif's files.

It worked great :lol: :lol: So this method could be used for the hard to combine palettes.

thunderchero

Dr_Breen
Commodore
Commodore
Posts: 889
Joined: Wed Apr 30, 2008 2:00 am
Location: Zurich, Switzerland
Contact:

Post by Dr_Breen » Tue Mar 24, 2009 9:03 am

yeah i was thinking about that option when i was looking for a model with more than 1 texture file...looks like it works as long as 1 of the textures does not have to many different colors so that theres enough space left in the palette for the other texture files.

Good work
Public BotF / EF2 Teamspeak 3 Server: 83.169.13.55

stardust
Rear-Admiral
Rear-Admiral
Posts: 1381
Joined: Sat Apr 26, 2008 2:00 am
Location: good ole Blighty

Post by stardust » Sun Mar 29, 2009 10:50 am

I can happily report this works a treat on CS4 as well.
Just used it to sort out the ferengi ships i've re-textured over the last few days :)
Computers! [Expletive deleted]

My 4shared folder

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5926
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Post by thunderchero » Tue Apr 21, 2009 1:48 am

Hi everyone,

I have been reducing palletes for Flagship mod and here is some file that can be used.

This file has combined explosions, photons (with matching phasers), planets and misc files, and vanilla ferengi.

You will still need to set each gif file to use own palette and reduce palettes. Also with explosions other than c****.gif theywill need to be removed. they are no longer used with new explosion files.

Lower palette files

even with new ships I have flagship mod lowered to 87 palettes. 8O

thunderchero

stardust
Rear-Admiral
Rear-Admiral
Posts: 1381
Joined: Sat Apr 26, 2008 2:00 am
Location: good ole Blighty

Post by stardust » Thu Apr 23, 2009 4:12 pm

thunderchero wrote:
even with new ships I have flagship mod lowered to 87 palettes. 8O

thunderchero
Now all you need is a way of being able to extend the ship list by 200 so you can add 50 more ships to get that palette count up a bit :lol:
Computers! [Expletive deleted]

My 4shared folder

User avatar
Paddy
Cadet 2nd Year
Cadet 2nd Year
Posts: 5
Joined: Sat Apr 26, 2008 2:00 am

Post by Paddy » Thu Aug 06, 2009 7:10 pm

Hello everyone. Thunderchero can you upload all the ships you have worked the palettes with so we can get them fighting? UDMIII + loads of other mods with low palettes + lots of ships.............. (wiping up slabbers) lol

Paddy

User avatar
Borg
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 50
Joined: Mon May 19, 2008 2:00 am

Post by Borg » Wed Apr 07, 2010 2:55 pm

I only just started moding I need to aks have you got to use adobe's photoshop? or can you use a diffrent program, becouse I only got GIMP 2 its called and I don't think it can do the same job has photoshop, GIMP 2 was free program I have downloaded a year ago.

User avatar
Glorfindel7
Cadet 2nd Year
Cadet 2nd Year
Posts: 8
Joined: Mon Mar 29, 2010 2:00 am
Location: San Diego

Post by Glorfindel7 » Sat Apr 10, 2010 7:46 pm

I used UE to reduce the pallette count (I was at 138 or something after adding ships, 88 after). I followed the tutorial as best I could (which was pretty easy after the first step or two, which I fear I screwed up). Anyway, the game crashed on start up, repeatedly, and when I went back into UE to see if I could fix the problem, I kept getting 'missing Texture Index 328' message when readding ships. Could not find this file anywhere (in vanilla or my preserved semi-modded files). Have rebuilt the whole thing and am about to do the pallette reduction thing again (with a sense of dread and trepidation). Pretty sure my problem is in the original adding of files to alt.res. Any advice would be appreciated.

User avatar
AlexMcpherson79
Commander
Commander
Posts: 261
Joined: Thu Sep 04, 2008 2:00 am

Post by AlexMcpherson79 » Sat Apr 10, 2010 7:53 pm

Could someone do a 'vanilla botf-reduced pallettes' pack by any chance?

It's just that loads of differen things like this aren't actually applied for individual stuff, and I think if no-one else will, I might just collect all these seperates to create a base from which to make whatever addition changes one might want to make with UE.

'course, that'll mean me needin' to switch from single install to the multi-install thing.

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 5926
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Post by thunderchero » Fri May 07, 2010 9:42 am

AlexMcpherson79 wrote:Could someone do a 'vanilla botf-reduced pallettes' pack by any chance?
if you get this file from my post above it will lower a fresh install to 80

Lower palette files

thunderchero
Last edited by thunderchero on Wed May 12, 2010 5:19 pm, edited 1 time in total.

Post Reply

Return to “HOW TO: Reduce the number of Palettes”

Who is online

Users browsing this forum: No registered users