Author Topic: Question on Bitmap file compatibility  (Read 1481 times)

Offline 8thJinx

  • Silver Member
  • ****
  • Posts: 992
Question on Bitmap file compatibility
« on: May 26, 2018, 04:43:13 PM »
There are a handful of bitmap file conventions, only one of which appears to be compatible with AH3 (props to Easyscor for that cherry).  So as an experiment, I took a simple 4 mb diffuse bitmap from the export function in the OE.  I then colored in that square will all yellow, and saved it in Photoshop with 32 bit, A8.  That modified file can be part of a successful re-conversion in the OE to a proper shape (except now it's all yellow). 

If I try to generate a yellow 32 bit bmp with A8 from scratch, it does not work.  From all outside perspectives, the files are identical.  Size, resolution, color convention, you name it.  But the from-scratch file simply does not work.  The conversion fails and dumps you out of the OE.

I couldn't let this go, so I tried something.  I downloaded a hexadecimal file editor, and compared the headers of the two bmp files.  Looking at the two files side by side, they are identical in every way except for a certain string in the file header.  The bmp that works with AH3 is devoid of any information on the size of the file's raw bank of data (this is defined in offsets 34,35,36,37).  The one that doesn't work has the correct size value (roughly 4 mb) in those offsets.  Additionally, the file that works is devoid of any horizontal or vertical resolution info in the header offsets 38,39,40,41 and 42,43,44,45.  The file that does not work has all of the correct resolution info.

That is the only difference between the file that works, and the file that doesn't.

I am tempted to change the hex values in the file header size and resolution offset locations to all 00's, and see if the image works.  But before I do that, I want know if folks think I am missing something simple in trying to generate a bmp from scratch.
Join Date: Nov 2012

B-24H Liberator SN 294837-T, "The Jinx", 848th BS, 490th BG, 8th AF, RAF Station Eye, delivered 1943.  Piloted by Lt. Thomas Keyes, named by by his crew, and adorned with bad luck symbols, the aircraft survived the entire war.

Offline Vraciu

  • Plutonium Member
  • *******
  • Posts: 14203
Re: Question on Bitmap file compatibility
« Reply #1 on: May 26, 2018, 04:52:49 PM »
There are a handful of bitmap file conventions, only one of which appears to be compatible with AH3 (props to Easyscor for that cherry).  So as an experiment, I took a simple 4 mb diffuse bitmap from the export function in the OE.  I then colored in that square will all yellow, and saved it in Photoshop with 32 bit, A8.  That modified file can be part of a successful re-conversion in the OE to a proper shape (except now it's all yellow). 

If I try to generate a yellow 32 bit bmp with A8 from scratch, it does not work.  From all outside perspectives, the files are identical.  Size, resolution, color convention, you name it.  But the from-scratch file simply does not work.  The conversion fails and dumps you out of the OE.

I couldn't let this go, so I tried something.  I downloaded a hexadecimal file editor, and compared the headers of the two bmp files.  Looking at the two files side by side, they are identical in every way except for a certain string in the file header.  The bmp that works with AH3 is devoid of any information on the size of the file's raw bank of data (this is defined in offsets 34,35,36,37).  The one that doesn't work has the correct size value (roughly 4 mb) in those offsets.  Additionally, the file that works is devoid of any horizontal or vertical resolution info in the header offsets 38,39,40,41 and 42,43,44,45.  The file that does not work has all of the correct resolution info.

That is the only difference between the file that works, and the file that doesn't.

I am tempted to change the hex values in the file header size and resolution offset locations to all 00's, and see if the image works.  But before I do that, I want know if folks think I am missing something simple in trying to generate a bmp from scratch.

I take my layered .PSP file...save it under a new name and merge all layers.   I then add a single blank layer and save it, then convert it to the 32-bit .BMP with GIMP. 
”KILLER V”
Charter Member of the P-51 Mustang Skin Mafia
- THE DAMNED -
King of the Hill Champ Tour 219 - Win Percentage 100
"1v1 Skyyr might be the best pilot ever to play the game." - Via PM, Name Redacted

Offline 8thJinx

  • Silver Member
  • ****
  • Posts: 992
Re: Question on Bitmap file compatibility
« Reply #2 on: May 26, 2018, 05:29:57 PM »
That blank layer, is it completely translucent?  On the top or bottom?

Also when you start off in Photoshop, do you set it to 32 bit, 72 dpi, sRGB IEC61966-2.1 right off the bat?  Is sRGB IEC61966-2.1 the correct color profile?

And start with the correct size (1024x1024, etc)?
« Last Edit: May 26, 2018, 05:33:27 PM by 8thJinx »
Join Date: Nov 2012

B-24H Liberator SN 294837-T, "The Jinx", 848th BS, 490th BG, 8th AF, RAF Station Eye, delivered 1943.  Piloted by Lt. Thomas Keyes, named by by his crew, and adorned with bad luck symbols, the aircraft survived the entire war.

Offline Vraciu

  • Plutonium Member
  • *******
  • Posts: 14203
Re: Question on Bitmap file compatibility
« Reply #3 on: May 26, 2018, 05:41:28 PM »
That blank layer, is it completely translucent?  On the top or bottom?

Also when you start off in Photoshop, do you set it to 32 bit, 72 dpi, sRGB IEC61966-2.1 right off the bat?  Is sRGB IEC61966-2.1 the correct color profile?

And start with the correct size (1024x1024, etc)?

1) Transparent, top or bottom doesn’t matter, but mine default to on top.  GIMP needs a minimum of two layers to merge into an AH3-compatible format.  If you use only one the game will turn the file pink or rainbow.  It’s funny to look at but not much use in the game.  :)

2) I use the default equivalent of 16M colors.    What you wind up doing with conversion is sizing down to a 32-bit .BMP that AH3 can read.

3) it depends on the skin.   Download the default skin for the object you are rendering and use that size.   Most are 1024 x 1024 but a few are 2048 x 2048 (B-17?).
« Last Edit: May 26, 2018, 05:53:10 PM by Vraciu »
”KILLER V”
Charter Member of the P-51 Mustang Skin Mafia
- THE DAMNED -
King of the Hill Champ Tour 219 - Win Percentage 100
"1v1 Skyyr might be the best pilot ever to play the game." - Via PM, Name Redacted

Offline 8thJinx

  • Silver Member
  • ****
  • Posts: 992
Re: Question on Bitmap file compatibility
« Reply #4 on: May 26, 2018, 07:02:00 PM »
I got it to work!

This is Photoshop CC Release 19.1.4, in conjunction with GiMP 2.10.2.

1. Open Photoshop.
2. You will land on the main file window, with the selections Recent, CC Files, LR Photos, Create New..., and Open... along the left side of the file window.  Select Create New.
3. The New Document popup appears.  It will show you recent items and templates.  Start with the Default and build a template.  Height and Width in Pixels, 1024 each, resolution is 72 ppi.  Color Mode RGB Color, 8 Bit. Background contents remain as White.  Color Profile remains as sRGB IEC61966-2.1. Aspect Ratio is Square Pixels.  Then select Create.
4. Create your image file as you desire.  Multiple layers is easier to work with. 
5. When you are done, save it as a PSP file, with the layers box checked, and the ICC Profile box checked. 
6. Next, with the visible layers you want all active, select Layer/Merge Visible.
7. Save this as PSP with a new file name.  The only option box checked is ICC Profile.
8. Add a new blank layer.  Save the file.  Layer and ICC Profile will be checked.
9. Close PSP and Open GiMP.
10. Select File/Open.  In the Open Image box, select the All Files from the pull down.  Find your file and select it.  Then select Open.
11. The Conversion Popup appears.  Keep the sRGB IEC profile shown.  Keep the GiMP built-in option.  Keep the Relative Colorimetric rendering intent.  Keep the Black Point Compensation.  Select Convert.
12. Select File/Export As.  The Export Image popup appears.  Under Select File Type, pick Windows Bitmap all the way down the bottom.  Select Export.
13. The Export Image as BMP popup appears.  Do not select anything under Compatibility Options.  Under Advanced Options, make sure it is selected as 32 bits, A8.

Thank you, Vraciu <S>.
Join Date: Nov 2012

B-24H Liberator SN 294837-T, "The Jinx", 848th BS, 490th BG, 8th AF, RAF Station Eye, delivered 1943.  Piloted by Lt. Thomas Keyes, named by by his crew, and adorned with bad luck symbols, the aircraft survived the entire war.

Offline Vraciu

  • Plutonium Member
  • *******
  • Posts: 14203
Re: Question on Bitmap file compatibility
« Reply #5 on: May 26, 2018, 07:05:52 PM »
WTG. :cheers:

You’re welcome, man.  Glad to help—if I did that is.  Sounds like you derived a solution of your own.    :rock  :salute
”KILLER V”
Charter Member of the P-51 Mustang Skin Mafia
- THE DAMNED -
King of the Hill Champ Tour 219 - Win Percentage 100
"1v1 Skyyr might be the best pilot ever to play the game." - Via PM, Name Redacted

Offline 8thJinx

  • Silver Member
  • ****
  • Posts: 992
Re: Question on Bitmap file compatibility
« Reply #6 on: May 26, 2018, 07:35:05 PM »
Saving it with a blank layer I think is the key.
Join Date: Nov 2012

B-24H Liberator SN 294837-T, "The Jinx", 848th BS, 490th BG, 8th AF, RAF Station Eye, delivered 1943.  Piloted by Lt. Thomas Keyes, named by by his crew, and adorned with bad luck symbols, the aircraft survived the entire war.

Offline Vraciu

  • Plutonium Member
  • *******
  • Posts: 14203
Re: Question on Bitmap file compatibility
« Reply #7 on: May 26, 2018, 07:43:45 PM »
Saving it with a blank layer I think is the key.

It was for me.  Glad it worked for ya.  :salute
”KILLER V”
Charter Member of the P-51 Mustang Skin Mafia
- THE DAMNED -
King of the Hill Champ Tour 219 - Win Percentage 100
"1v1 Skyyr might be the best pilot ever to play the game." - Via PM, Name Redacted

Offline 8thJinx

  • Silver Member
  • ****
  • Posts: 992
Re: Question on Bitmap file compatibility
« Reply #8 on: May 28, 2018, 10:40:42 AM »
Something went horribly wrong.  Now I can't get the process to work in AC3D.  The only BMPs that AC3D will accept are the unmodified exported versions from the OE.  Back to square one.
Join Date: Nov 2012

B-24H Liberator SN 294837-T, "The Jinx", 848th BS, 490th BG, 8th AF, RAF Station Eye, delivered 1943.  Piloted by Lt. Thomas Keyes, named by by his crew, and adorned with bad luck symbols, the aircraft survived the entire war.

Offline Vraciu

  • Plutonium Member
  • *******
  • Posts: 14203
Re: Question on Bitmap file compatibility
« Reply #9 on: May 28, 2018, 10:46:03 AM »
Something went horribly wrong.  Now I can't get the process to work in AC3D.  The only BMPs that AC3D will accept are the unmodified exported versions from the OE.  Back to square one.

Try mimicking their format. 
”KILLER V”
Charter Member of the P-51 Mustang Skin Mafia
- THE DAMNED -
King of the Hill Champ Tour 219 - Win Percentage 100
"1v1 Skyyr might be the best pilot ever to play the game." - Via PM, Name Redacted

Offline 8thJinx

  • Silver Member
  • ****
  • Posts: 992
Re: Question on Bitmap file compatibility
« Reply #10 on: May 28, 2018, 10:54:07 AM »
I am, down to a tee.  The only differences I see are in the hexadecimal file viewer, with the header offsets.  I can't change that in Photoshop or GiMP.
Join Date: Nov 2012

B-24H Liberator SN 294837-T, "The Jinx", 848th BS, 490th BG, 8th AF, RAF Station Eye, delivered 1943.  Piloted by Lt. Thomas Keyes, named by by his crew, and adorned with bad luck symbols, the aircraft survived the entire war.

Offline 8thJinx

  • Silver Member
  • ****
  • Posts: 992
Re: Question on Bitmap file compatibility
« Reply #11 on: May 28, 2018, 12:42:08 PM »
When I export to BMP from GIMP, it's changing the header significantly.  From all outward appearances, even from within GIMP, the original loadable file and the slightly modified file are the same.  Same size, same bit depth, same resolution, same color profile.  But GIMP is changing the header from 40 offsets long to 124 offsets long, and AC3D is rejecting it wholesale.  It's a different file.

Vraciu can you post a 16 mb skin if you have one?
Join Date: Nov 2012

B-24H Liberator SN 294837-T, "The Jinx", 848th BS, 490th BG, 8th AF, RAF Station Eye, delivered 1943.  Piloted by Lt. Thomas Keyes, named by by his crew, and adorned with bad luck symbols, the aircraft survived the entire war.

Offline Vraciu

  • Plutonium Member
  • *******
  • Posts: 14203
Re: Question on Bitmap file compatibility
« Reply #12 on: May 28, 2018, 12:45:04 PM »
When I export to BMP from GIMP, it's changing the header significantly.  From all outward appearances, even from within GIMP, the original loadable file and the slightly modified file are the same.  Same size, same bit depth, same resolution, same color profile.  But GIMP is changing the header from 40 offsets long to 124 offsets long, and AC3D is rejecting it wholesale.  It's a different file.

Vraciu can you post a 16 mb skin if you have one?

Are you wanting 16M colors or 16MB?   

Devil is the GIMP expert.  What version do you use?   I had to use an older one to get things to behave.
”KILLER V”
Charter Member of the P-51 Mustang Skin Mafia
- THE DAMNED -
King of the Hill Champ Tour 219 - Win Percentage 100
"1v1 Skyyr might be the best pilot ever to play the game." - Via PM, Name Redacted

Offline 8thJinx

  • Silver Member
  • ****
  • Posts: 992
Re: Question on Bitmap file compatibility
« Reply #13 on: May 28, 2018, 12:55:36 PM »
Here's some more info.

I am using GIMP 2.10.2.

When I got it to work yesterday with the 1024x1024 file, I wasn't mapping any of the textures.  I was just converting the AC3D file with the bitmaps using the Object Editor, and it did fine.  Inside of the OE, it basically draped the texture over the AC3D model.  Today, I took the same two files, and instead tried to map the texture to the individual polys by loading the texture into AC3D.  Even that BMP (the one that converted fine when it was a simple draping), failed to load into AC3D.  And header of that file is way different than the older BMPs that came out of the OE export function.

The problem is GIMP.  GIMP is not creating a BMP with a header that AC3D can interpret.  And AC3D is the older piece of software.  Like a decade old. 

Somebody somewhere in the community must know how to do this.  That person is most likely in the special events community.

Vraciu, when you guys submit skins, who does the mapping.  I know there's a skin viewer, but who or what actually maps the skin onto the model.  If you guys are creating skins for planes on an ongoing basis, I need to know how that gets mapped onto the model.  Maybe I should be using whatever software that is.

Join Date: Nov 2012

B-24H Liberator SN 294837-T, "The Jinx", 848th BS, 490th BG, 8th AF, RAF Station Eye, delivered 1943.  Piloted by Lt. Thomas Keyes, named by by his crew, and adorned with bad luck symbols, the aircraft survived the entire war.

Offline Vraciu

  • Plutonium Member
  • *******
  • Posts: 14203
Re: Question on Bitmap file compatibility
« Reply #14 on: May 28, 2018, 12:59:29 PM »
Some of these are Skuzzy, Hitech, Greebo, Devil505, Bustr, etc. questions.   

Let me go see what version of GIMP I am using for starters.  The newer ones don’t work for what I am doing.
”KILLER V”
Charter Member of the P-51 Mustang Skin Mafia
- THE DAMNED -
King of the Hill Champ Tour 219 - Win Percentage 100
"1v1 Skyyr might be the best pilot ever to play the game." - Via PM, Name Redacted