Jump to content


Sam.

Member Since 10 Jun 2008
Offline Last Active Today, 08:33 AM

Posts I've Made

In Topic: [MOD] BG:EE Classic Movies

10 March 2024 - 05:48 PM

I believe several people have made upscaled versions of the movies over the years, particularly with how AI upscaling has become popular/accessible in recent times.  I know lefreut has done it.  Having seen examples of the results produced by AI, there are some aspects I feel my version does better, and some areas where AI does better.  It comes down to a matter of personal preference.  No one will be stepping on my toes if they want to make a similar mod with their own upscaled movies or chapter backgrounds, but so far I haven't seen anyone else take that final step or support the various language variants.


In Topic: palette swaps via weidu?

31 January 2024 - 11:02 AM

Are you asking about taking a false color (aka "paletted" - yes I know the language is ambiguous) character animation that implements the colors specified on the creature and equipped items like

post-10485-0-94146600-1542071897.png

and converting it to the PST equivalent?  If so, the formats are different "under the hood" and there is no 1:1 mapping.  I'm not aware of anyone attempting this conversion before, and even if you managed a rough approximation the results would almost surely be sub-optimal.


In Topic: palette swaps via weidu?

31 January 2024 - 08:02 AM

Nice I will try. But one thing bothers me. How to extract .bmp. I tried DLTCEP and when I save the palette as a bmp, there is no file anywhere...

 

E: The above bam is empty and that bmp in NI contains nothing :P.

 

E2: Right, so i'am using palette generator and ps bam, something is starting to come out...

 

E3: It seems that after importing the new BAM animations, with their own color (and the palettes a little mixed up) it looks fine in the game anyway xD.

 

So. I don't know anything. 


I recommend exporting MDR1_AQ1.bmp from the game using Near Infinity since you're apparently already using it.  This BMP may outwardly appear to only have a single green pixel, but we don't care about that.  It is an indexed 8-bit per pixel paletted windows bitmap.  It's the internal palette we'll be using, not the single pixel.  The BAM I pointed you to is certainly not empty.  Download the raw file.  Follow my simple example until you get it right before adding more complexity.  I have no idea what you're on about with E3.


In Topic: palette swaps via weidu?

30 January 2024 - 03:39 PM

The answer is that you must remap all the BAMs to use the same palette, make your edits, and then overwrite all the palettes with the new one.  To minimize error, color information from all the BAMs should be quantized together at once to generate an optimal palette to start with.  This makes the whole process many stepped.

 

Hm, I think I understand, although not completely. How would I remap the BAMs? What do you mean?

Looking, BAMWorkshop doesn't appear to be able to replace palettes.  BAMWorkshop II can, and it overwrites the palette not remap it.  I just checked Near Infinity, and I think it remaps the palette so that's one option.  I'm biased as I wrote the tool, but if it was me I would use PS BAM (here's the forum) as it can batch multiple files at once and can both overwrite and remap palettes.  However, it is command line only.

 

I'll provide a practical example of how to use PS BAM.  Download PS BAM from GitHub and extract the entire contents into whichever folder you like.  Go get mdr11100.bam from here.  Also extract MDR1_AQ1.bmp from BG2 or BG2EE and put it in the same folder.  Create a windows batch file (*.bat) in the same folder and put the following in it:

"C:\Path\To\PS BAM_x64.exe" ^
--CompressionProfile Recommended ^
--DropDuplicatePaletteEntries 0 ^
--DropUnusedPaletteEntries 0 ^
--DebugLevelL 1 ^
--DebugLevelP 2 ^
--DebugLevelS 1 ^
--ReplacePalette "%~dp0MDR1_AQ1.bmp" ^
--ReplacePaletteMethod Force ^
--ExportPalette PAL ^
--LogFile "%~dp0Log.txt" ^
--OutPath "%~dp0repaletted" ^
--Save "BAM" ^
"%~dp0MDR11100.bam"

pause
exit

Change the path to PS BAM to wherever you extracted it.  Save and run the batch file.  This will load the BAM, replace/overwrite the palette with the aqua dragon color variant, and compress and save the new BAM.  If instead you want to remap the palette (not what you want to do in this particular case), instead of

--ReplacePaletteMethod Force ^

use

--ReplacePaletteMethod Remap ^

 

You can use wildcards in the filename of the BAMs to process multiple in one go.


In Topic: palette swaps via weidu?

30 January 2024 - 12:31 PM

I'm still not sure I follow what it is you're doing, with which tools, and where things are going wrong.  Let me back up a bit and make sure we're clear on what it means to swap a palette.  When you're changing a file's palette for a different palette, there are two ways to go about it.

 

Option 1 is to directly overwrite the first palette with the second one.  The pixels themselves with stay the same, they'll just be pointing to a different color.  Changing the palette colors individually with NI or BAMWorkshop (II) is essentially doing this.  Say you edit the palette colors of the first BAM in a creature animation so that the animation now looks the way you want, and you want to apply those changes to the other BAMs for that creature.  It is okay to overwrite the palettes of the other BAMs with your edited one if and only if those other BAMs used  the exact same palette as the original one before you edited it.  If not, the colors will look garbled.

 

Option 2 is to remap the pixel values from the first palette to the second so that each pixel is pointing to the new palette color that is as close as possible to the old palette color.  If you edited the first BAM's palette as before and then tried remapping the other BAMs to use the new palette, the results will be terrible because each new pixel value is trying to match the original color.  The intent of you editing the palette to change the creature's color will be lost.

 

So, if a creature animation has multiple BAMs that don't all use the same palette, how do you apply manual palette edits in one palette to all the BAM?  The answer is that you must remap all the BAMs to use the same palette, make your edits, and then overwrite all the palettes with the new one.  To minimize error, color information from all the BAMs should be quantized together at once to generate an optimal palette to start with.  This makes the whole process many stepped.