Editing Bitmaps: Difference between revisions
From MM6 Wiki
mNo edit summary |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[category: modding]] | [[category: modding]] | ||
=Editing Existing Bitmap= | |||
Bitmaps are the textures used for drawing over the geometry in 3D world. They are stored in BITMAPS.LOD. | Bitmaps are the textures used for drawing over the geometry in 3D world. They are stored in BITMAPS.LOD. | ||
Line 8: | Line 9: | ||
In this example we will take the grass tile image and make some changes. | In this example we will take the grass tile image and make some changes. | ||
[[File:Grasstyl.png | [[File:Grasstyl.png]] | ||
First of all make sure your image is in RGB mode. | First of all make sure your image is in RGB mode. | ||
Line 14: | Line 15: | ||
<code>'''Image → Mode → RGB'''</code> | <code>'''Image → Mode → RGB'''</code> | ||
[[File:Convert_to_RGB.png | [[File:Convert_to_RGB.png]] | ||
''That will allow you to use whatever colors you want instead of a limited range of the original image.'' | ''That will allow you to use whatever colors you want instead of a limited range of the original image.'' | ||
Line 22: | Line 23: | ||
For example: | For example: | ||
[[File:Grastyl_mod.png | [[File:Grastyl_mod.png]] | ||
After you finished making changes to the image convert it to indexed mode: | After you finished making changes to the image convert it to indexed mode: | ||
Line 28: | Line 29: | ||
<code>'''Image → Mode → Indexed'''</code> | <code>'''Image → Mode → Indexed'''</code> | ||
[[File:Convert_to_Indexed.png | [[File:Convert_to_Indexed.png]] | ||
You will be brought to the following menu: | You will be brought to the following menu: | ||
[[File:Convert_to_Indexed2.png | [[File:Convert_to_Indexed2.png]] | ||
Here you will need to set the '''Maximum number of colors''' to '''256''' | Here you will need to set the '''Maximum number of colors''' to '''256''' | ||
Line 42: | Line 43: | ||
Here's what we've got: | Here's what we've got: | ||
[[File:Grastyl_mod_indexed.png | [[File:Grastyl_mod_indexed.png]] | ||
''You might have noticed a visual difference, that is because we've got much less colors right now and the image is following the specific palette that we've just generated. That helps to reduce the size of the image greatly and is the only mode the game's engine accepts.'' | ''You might have noticed a visual difference, that is because we've got much less colors right now and the image is following the specific palette that we've just generated. That helps to reduce the size of the image greatly and is the only mode the game's engine accepts.'' | ||
Line 50: | Line 51: | ||
''It should have the same name as the bitmap you are replacing if you are not intending to add an entirely new bitmap.'' | ''It should have the same name as the bitmap you are replacing if you are not intending to add an entirely new bitmap.'' | ||
==Importing | ==Importing a new bitmap into the game== | ||
Open BITMAPS.LOD of the game you are importing the bitmap to with [https://grayface.github.io/mm/#MMArchive MMArchive]. | Open BITMAPS.LOD of the game you are importing the bitmap to with [https://grayface.github.io/mm/#MMArchive MMArchive]. | ||
Line 56: | Line 57: | ||
Find the files that begin with "pal". You need to find the last one, in our case it is 721. | Find the files that begin with "pal". You need to find the last one, in our case it is 721. | ||
[[File:MMArchive_bitmaps.png | [[File:MMArchive_bitmaps.png]] | ||
Now make a copy of the bitmap and rename the duplicate. Basically you need to name the file so that it starts with "pal" and in the same time has a unique index in the end. So we just add 1 to the last "pal" file and get "pal722". Make sure it has no extension (remove the .bmp part from the filename). | Now make a copy of the bitmap and rename the duplicate. Basically you need to name the file so that it starts with "pal" and in the same time has a unique index in the end. So we just add 1 to the last "pal" file and get "pal722". Make sure it has no extension (remove the .bmp part from the filename). | ||
[[File:MMArchive_preimport.png | [[File:MMArchive_preimport.png]] | ||
''We do that because the engine requires the palette to be stored among the bitmaps in the archive. The MMArchive will convert the marked bitmap to a palette file after adding it to the archive.'' | ''We do that because the engine requires the palette to be stored among the bitmaps in the archive. The MMArchive will convert the marked bitmap to a palette file after adding it to the archive.'' | ||
Line 68: | Line 69: | ||
<code>'''Edit → Add'''</code> | <code>'''Edit → Add'''</code> | ||
[[File:MMArchive_add.png | [[File:MMArchive_add.png]] | ||
- to add the "pal" file and then the bitmap in the following order. | - to add the "pal" file and then the bitmap in the following order. | ||
Line 74: | Line 75: | ||
Make sure that the index in the bottom left corner corresponds to the "pal" file you've just imported. | Make sure that the index in the bottom left corner corresponds to the "pal" file you've just imported. | ||
[[File:MMArchive_postimport.png | [[File:MMArchive_postimport.png]] | ||
And the last step: admire the beauty of the thing you have created: | And the last step: admire the beauty of the thing you have created: | ||
[[File:Bitmaps_admire.png | [[File:Bitmaps_admire.png]] | ||
==Extra Notes== | ==Extra Notes== |
Latest revision as of 16:22, 6 April 2019
Editing Existing Bitmap
Bitmaps are the textures used for drawing over the geometry in 3D world. They are stored in BITMAPS.LOD.
This page will show how to modify and add new bitmaps with the help of MMArchive and GIMP.
Editing and exporting
In this example we will take the grass tile image and make some changes.
First of all make sure your image is in RGB mode.
Image → Mode → RGB
That will allow you to use whatever colors you want instead of a limited range of the original image.
Now make any changes to the image you want.
For example:
After you finished making changes to the image convert it to indexed mode:
Image → Mode → Indexed
You will be brought to the following menu:
Here you will need to set the Maximum number of colors to 256
Optionally if 256 colors is not enough you can set Color Dithering to Positioned
Afterwards click on Convert to get the result.
Here's what we've got:
You might have noticed a visual difference, that is because we've got much less colors right now and the image is following the specific palette that we've just generated. That helps to reduce the size of the image greatly and is the only mode the game's engine accepts.
Now export your image in .BMP format.
It should have the same name as the bitmap you are replacing if you are not intending to add an entirely new bitmap.
Importing a new bitmap into the game
Open BITMAPS.LOD of the game you are importing the bitmap to with MMArchive.
Find the files that begin with "pal". You need to find the last one, in our case it is 721.
Now make a copy of the bitmap and rename the duplicate. Basically you need to name the file so that it starts with "pal" and in the same time has a unique index in the end. So we just add 1 to the last "pal" file and get "pal722". Make sure it has no extension (remove the .bmp part from the filename).
We do that because the engine requires the palette to be stored among the bitmaps in the archive. The MMArchive will convert the marked bitmap to a palette file after adding it to the archive.
Use the add command -
Edit → Add
- to add the "pal" file and then the bitmap in the following order.
Make sure that the index in the bottom left corner corresponds to the "pal" file you've just imported.
And the last step: admire the beauty of the thing you have created:
Extra Notes
Each bitmap has to have a palette (be an indexed image) and the palette that it uses must be stored along it in the archive.
If you are modifying the bitmaps for the vanilla version of the game (1.0 — Mok's patch) make sure to reuse the palettes. The limit is 50 for the entire map. However the further patched games which contain MMExtension can have up to 200 on one map (the cap can be raised even higher).