Difference between revisions of "Editing MBM Textures"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Created page with "== Editing .MBM Textures == Before we start, we need these tools: • Photoshop • Hex Editor HxD Let's take an example of model with two textures. • model.mu • mo...")
 
(Editing .MBM Textures)
Line 1: Line 1:
== Editing .MBM Textures ==
 
 
 
Before we start, we need these tools:
 
Before we start, we need these tools:
  

Revision as of 19:48, 5 February 2013

Before we start, we need these tools:

• Photoshop

• Hex Editor HxD


Let's take an example of model with two textures.

• model.mu

• model000.mbm

• model001.mbm


01) First we rename model000.mbm in to model000.pbm and model001.mbm to model000.pbm.


02) Now we open model000.pbm with HxD and see picture like this:

Hex 01.png






First 20 bytes is what makes MBM format different from PBM - Portable Bitmap Format.


03) Also, pay attention to Magical Number. Each model000.mbm has it's own Magical Number, so always make backup, or write somewhere these first 20 bytes for later, to restore image to original formatting.

Hex 05.png







04) Now we select them and replace them with one of these 20 bytes and replace them with one of these lines:

• For 1024 x 1024 pixel images use this row:

Hex 02.png






• For 512 x 512 pixel images use this row:

Hex 03.png






• For 256 x 256 pixel images use this row:

Hex 04.png







05) Open .PBM images with Photoshop, and do anything you want with it. Then save. Avoid changing texture size, because I didn't tried to change texture size, so I can't tell if it will work correctly or not.


06) Now open changed .PBM image with HxD again:

Hex 08.png







07) And replace with original 20 bytes that were there:

Hex 06.png







08) And don't forget about corresponding Magic Number:

Hex 07.png







09) Save and now rename back model000.pbm in to model000.mbm and model001.pbm to model000.mbm.


10) Enjoy!