Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Lt.Cannonfodder on June 27, 2008, 10:25:01 am

Title: Problem with mainhall ani files
Post by: Lt.Cannonfodder on June 27, 2008, 10:25:01 am
A weird problem I ran into recently while working on a new mainhall. Take a look at the following to images (easier if you zoom in):

http://i27.tinypic.com/24vr5u9.png
http://i29.tinypic.com/rqwwu9.png

When you compare them, you can see how the button around the text and all areas covered by the ani file go darker when the highlight is activated, for unknown reason. The ani file is created from standard 256-color pcx files and everything looks just fine in single frames and in aniviewer, but when the file is activated ingame, the colors go wrong.

I can't recall encountering this problem when I worked with BtRL interface and I'm doing everything here the same way I did before. Any help regarding the matter is appreciated.
Title: Re: Problem with mainhall ani files
Post by: Galemp on June 27, 2008, 11:42:53 am
If they're not using the same palette (or sometimes even if they are) you may end up with colors being adjusted so they no longer match. You need to fix them by making sure you have a blank image with a palette with everything you need in it, then pasting in the images you want and saving. That way the image uses the same palette for the same colors for both, instead of recalculating for each.
Title: Re: Problem with mainhall ani files
Post by: ShadowGorrath on June 27, 2008, 11:51:02 am
Is this for a mod? If so, what mod?
Title: Re: Problem with mainhall ani files
Post by: Lt.Cannonfodder on June 27, 2008, 12:00:14 pm
If they're not using the same palette (or sometimes even if they are) you may end up with colors being adjusted so they no longer match. You need to fix them by making sure you have a blank image with a palette with everything you need in it, then pasting in the images you want and saving. That way the image uses the same palette for the same colors for both, instead of recalculating for each.
Already done. The frames all use the same palette, and I've even tried to create the said palette in three different applications. Why it fails to work, I have no idea.

Is this for a mod? If so, what mod?
That would be telling. And I ain't going to :)
Title: Re: Problem with mainhall ani files
Post by: Water on June 27, 2008, 07:57:30 pm
Did you palettize the image and then export part images, or export images and then palettize them?
Title: Re: Problem with mainhall ani files
Post by: Lt.Cannonfodder on June 28, 2008, 12:01:20 am
The latter. Ani files are the only interface parts that still need 256-colors, the rest (excluding the masks) can be full color dds.
Title: Re: Problem with mainhall ani files
Post by: Water on June 28, 2008, 02:15:14 am
This is a longshot. The colour changes in game due a different gamma setting. Two colours that seems similar can end up shifted after FS gamma adjustment does it thing.
Title: Re: Problem with mainhall ani files
Post by: WMCoolmon on June 28, 2008, 03:23:05 am
This might be a long shot, too, but are you using -img2dds?
Title: Re: Problem with mainhall ani files
Post by: Lt.Cannonfodder on June 28, 2008, 03:29:10 am
This is a longshot. The colour changes in game due a different gamma setting. Two colours that seems similar can end up shifted after FS gamma adjustment does it thing.
Question is, why would the adjustement only apply to anis since the actual mainhall image looks exactly the same as it does on Photoshop?

This might be a long shot, too, but are you using -img2dds?
Nope, the problem persists even when I run the game without any flags.
Title: Re: Problem with mainhall ani files
Post by: Water on June 28, 2008, 05:20:23 am
Question is, why would the adjustement only apply to anis since the actual mainhall image looks exactly the same as it does on Photoshop?
I'm guessing the background is 16/24 bit dds vs 8bit for the ani?
Title: Re: Problem with mainhall ani files
Post by: Lt.Cannonfodder on June 28, 2008, 05:28:20 am
Yep.
Title: Re: Problem with mainhall ani files
Post by: Water on June 28, 2008, 05:59:33 am
I guess that means trying the background as a pcx using the same palette as the ani.
Title: Re: Problem with mainhall ani files
Post by: Lt.Cannonfodder on June 28, 2008, 06:40:03 am
Tried it. If the background image has it's own 256-color palette, there's still a noticeable color change with the anis. If the background images use the same palette as the anis, the problem dissappears but the whole thing looks just horrible with the few colors it has. To be honest, I'd rather live slight color change on a button than butcher the entire mainhall with banded gradients and other issues.
Title: Re: Problem with mainhall ani files
Post by: griffon67 on June 28, 2008, 12:34:45 pm
did you make your ani with anibuilder in the tools folder of freespace ? I've noticed it sometimes change the palette when creating a ani file.
Make sure that in advanced settings, in "Action when palette does no match" you have ignore.
I don't know why but sometimes, even with a single image ani, it changes the palette.
Title: Re: Problem with mainhall ani files
Post by: Water on June 28, 2008, 07:27:23 pm
Tried it. If the background image has it's own 256-color palette, there's still a noticeable color change with the anis. If the background images use the same palette as the anis, the problem dissappears but the whole thing looks just horrible with the few colors it has. To be honest, I'd rather live slight color change on a button than butcher the entire mainhall with banded gradients and other issues.
Another option may be instead of fixing the ani's, alter the background. All you need is to shift the colours on the background to match the ani's. That way you can keep the background at 24bit.
Title: Re: Problem with mainhall ani files
Post by: Lt.Cannonfodder on June 29, 2008, 04:54:38 am
Make sure that in advanced settings, in "Action when palette does no match" you have ignore.
I don't know why but sometimes, even with a single image ani, it changes the palette.
Yea, I've done that.

Another option may be instead of fixing the ani's, alter the background. All you need is to shift the colours on the background to match the ani's. That way you can keep the background at 24bit.
That's what I may have to do. I'll hate it though.