Aces High Bulletin Board

General Forums => Custom Skins => Topic started by: 8thJinx on May 26, 2018, 04:43:13 PM

Title: Question on Bitmap file compatibility
Post by: 8thJinx 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.
Title: Re: Question on Bitmap file compatibility
Post by: Vraciu 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. 
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx 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)?
Title: Re: Question on Bitmap file compatibility
Post by: Vraciu 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?).
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx 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>.
Title: Re: Question on Bitmap file compatibility
Post by: Vraciu 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
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx on May 26, 2018, 07:35:05 PM
Saving it with a blank layer I think is the key.
Title: Re: Question on Bitmap file compatibility
Post by: Vraciu 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
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx 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.
Title: Re: Question on Bitmap file compatibility
Post by: Vraciu 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. 
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx 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.
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx 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?
Title: Re: Question on Bitmap file compatibility
Post by: Vraciu 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.
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx 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.

Title: Re: Question on Bitmap file compatibility
Post by: Vraciu 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.
Title: Re: Question on Bitmap file compatibility
Post by: Devil 505 on May 28, 2018, 01:03:03 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.

This stuff is out of my league. I just draw the pretty pictures.  :devil
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx on May 28, 2018, 01:04:42 PM
This is what I am trying to skin.

(https://farm1.staticflickr.com/901/42363949132_e246c040b8_c.jpg)


(https://farm1.staticflickr.com/902/42363947262_b4bfe54ae5_z.jpg)
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx on May 28, 2018, 01:13:44 PM
I can skin that perfectly fine using the export BMPs from the game.  No problem whatsoever.  And it's probably what I'm going to end up having to do, and it's not that big of a deal.  I just wish it worked my way.

If you guys can skin an airplane with new BMP skin textures, I should be able to do the same with a building.  The only thing that's different between what I do and you do, is that there's a the AC3D texturing step I have to go through.  I think HTC actually applies the textures for your skins, using whatever software they use.

Unless anyone knows where I should be looking, I'm going to just move on and texture with the available building skins. 

At this point, I can make and texture buildings, berms, and square land tiles, and I can make terrains.  I need to set the idea of custom textures down and just move on and make something for cripes sake.
Title: Re: Question on Bitmap file compatibility
Post by: Vraciu on May 28, 2018, 01:20:58 PM
I can skin that perfectly fine using the export BMPs from the game.  No problem whatsoever.  And it's probably what I'm going to end up having to do, and it's not that big of a deal.  I just wish it worked my way.

If you guys can skin an airplane with new BMP skin textures, I should be able to do the same with a building.  The only thing that's different between what I do and you do, is that there's a the AC3D texturing step I have to go through.  I think HTC actually applies the textures for your skins, using whatever software they use.

Unless anyone knows where I should be looking, I'm going to just move on and texture with the available building skins. 

At this point, I can make and texture buildings, berms, and square land tiles, and I can make terrains.  I need to set the idea of custom textures down and just move on and make something for cripes sake.

Query Hitech and Skuzzy directly and point them here.  They are quite helpful with this stuff.   Take a crack at Waffle as well.
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx on May 28, 2018, 03:02:50 PM
I'm ok for the time being.  Making progress.

(https://farm2.staticflickr.com/1743/40607879460_f9a5315cc4_c.jpg)
Title: Re: Question on Bitmap file compatibility
Post by: Vraciu on May 28, 2018, 03:06:40 PM
Nice stuff.
Title: Re: Question on Bitmap file compatibility
Post by: Devil 505 on May 28, 2018, 03:21:20 PM
That looks great.
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx on May 28, 2018, 03:29:10 PM
It has fewer verts and polys than a typical town building.

I should have this finished today.  The berms hopefully done this week.  And hopefully have them all in an AVA terrain in time for next week's Tank Night.

Put a few in a valley spawn area, along with some berms, and you have a decent fight.
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx on May 28, 2018, 04:43:30 PM
Just a heads up, I played around and found out how to get it to work.  I can do it all right from Photoshop.  GIMP is not needed.

1. Open PS.
2. Open an existing, loadable diffuse BMP (any one of the files that gets produced from the 'Export to AC3D' function in the Object Editor).
3. Make any change, add any layer you want.
4. Save the file with a different name.  Do no change any options.
5. Merge the visible layers.  Save the file with a different name.
6. Add the blank layer.  Save the file with a different name.
7. Save the file as BMP.  Do not change any options.  You should automatically get the 32 bit A8 R8 G8 B8 option selected.

This works like a charm, and loads cleanly into AC3D.
Title: Re: Question on Bitmap file compatibility
Post by: Vraciu on May 28, 2018, 05:44:37 PM
Very nice.  I have to use GIMP because I am in PaintShopPro 5.   :rofl
Title: Re: Question on Bitmap file compatibility
Post by: hitech on May 29, 2018, 10:50:14 AM
Also the past few weeks I have been working on being able to import fbx files instead of just ac3d.

HiTech
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx on May 29, 2018, 08:12:30 PM
Also the past few weeks I have been working on being able to import fbx files instead of just ac3d.

HiTech

That would awesome, because AC3D's support isn't all that great.
Title: Re: Question on Bitmap file compatibility
Post by: Easyscor on May 30, 2018, 02:53:52 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.

In GIMP, if you export as 32 bit RGB, A8 R8 G8 B8, you can then open it in MS Paint and save. This will convert it into an acceptable format for the OE's convert ac3d, so probably works for the skinviewer as well.
64 bit GIMP 2.8.16 and Win7
Title: Re: Question on Bitmap file compatibility
Post by: 8thJinx on May 30, 2018, 04:24:26 PM
In GIMP, if you export as 32 bit RGB, A8 R8 G8 B8, you can then open it in MS Paint and save. This will convert it into an acceptable format for the OE's convert ac3d, so probably works for the skinviewer as well.
64 bit GIMP 2.8.16 and Win7

I will have to try that, thanks Easyscor.