Page 1 of 1

Editing Lightmap Palettes in Photoshop

Posted: Mon Mar 05, 2007 4:39 pm
by Aequitas
Note: I'll be using Lockout as an example.


UberLightmapTool™

Open the map in UberLightmapTool™ and count the number of palettes displayed. In this case, it's 31. Make a backup of the palettes for later use ("Edit" >> "Backup").

Image


Photoshop

Open Photoshop and create a new image with the pixel width of 256, and the pixel height equal to the palette count (31).

Image

Go to the Channels window and click the "Create new channel" button.

Image

Save the image as a BMP. When it prompts you with "BMP Options" click on the "Advanced Modes" button. Select 32 Bit "A8 R8 G8 B8" and check the "Flip row order" box. Click OK.

Image

Close the image in Photoshop.


Hex Workshop

Open the UberLightmapTool™ backup in Hex Workshop

Now it's time to do a little math.
  • block size = 1024 * palette count
    offset = file size - block size
For this example:
  • block size = 1024 * 31 = 31744
    offset = 31801 - 31744 = 57
Still in the UberLightmapTool™ backup in Hex Workshop, go to "Edit" >> "Goto...". Select "Dec" and "Beginning of File". Enter the above calculated offset (57), and click "Go".

Image

Now go to "Edit" >> "Select Block". Select "Dec" and "Size of Block". Enter the above calculated block size (31744), and click "OK".

Image

"Edit" >> "Copy"

Use Hex Workshop to open the BMP you created.

Go to "Edit" >> "Goto...". Make sure that "Dec" and "Beginning of File" are still selected. This time, enter 54 as the offset, and click "Go".

Image

Now go to "Edit" >> "Select Block". Make sure that "Dec" and "Size of Block" are still selected and that the block size is the same as above (31744), and click "OK".

Image

"Edit" >> "Paste"

"File" >> "Save"

Close the BMP in Hex Workshop.


Photoshop

Open the BMP with Photoshop. Each horizontal line represents the colors from one palette.

Image

Edit the colors however you like. For example, say all you wanted to do is change the color of Lockout's green room:

Image

Image

Save the BMP with the same settings as it was originally saved.


Hex Workshop

Open the BMP and the UberLightmapTool™ backup with Hex Workshop and select the same bytes as above. This time, copy them from the BMP to the backup.

Save the backup.


UberLightmapTool™

Open the map in UberLightmapTool™ and restore the palettes from the backup ("Edit" >> "Restore").


BEFORE
Image


AFTER
Image

Posted: Mon Mar 05, 2007 4:44 pm
by SpecOp44
Very nice.

Posted: Mon Mar 05, 2007 4:47 pm
by Aequitas
UberLightmapTool

Posted: Wed Mar 07, 2007 6:01 am
by Blackout046
Great Job man! :D

Re: Editing Lightmap Palettes in Photoshop

Posted: Mon Feb 16, 2009 3:39 pm
by mr_penguin
I know this is a very long bump...

Uh, what happened to the tutorial?

Re: Editing Lightmap Palettes in Photoshop

Posted: Mon Feb 16, 2009 3:55 pm
by DemonicSandwich
Same thing that happened to several other topics/entire forums. Got lost when shifted the phpBB3.

And sadly the topic wasn't backed up on the Way Back Machine.