Author Topic: AH 3 Skin File Format Guide  (Read 2732 times)

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6693
AH 3 Skin File Format Guide
« on: July 23, 2017, 09:44:44 AM »
AH 3 Skin Files Format Guide
By Greebo


AH 3 introduced a new file system for player created skins and existing older skins were automatically converted at least partially to this new format. Whereas the old AH 2 skins system used text files to alter some lighting effects globally over the whole skin AH 3 uses image maps to control these effects on a per-pixel basis. This guide is intended to explain the new AH3 format and assumes some knowledge of skinning whether for AH 1 or 2 skins or for some other game. It isn't intended to be a beginner-level “how to skin” guide.

AH 3 skins consist of one or more sets of five image files in a bmp format. To find out which files can be skinned for a particular ride you should log onto the AH Skins Management Page. Here the files for each plane and vehicle are listed with their minimum/maximum allowable size, their colour depth format and whether they are either mandatory or optional.  Default files can be downloaded from the hangar screen in-game or through the skin viewer which is available from the downloads section of HTC's website.

The file types used in AH 3 are as follows:

The Diffuse Map (filename.bmp) is the basic skin file that all skins share, it is simply a painting of the skin draped over the 3D shape. The main difference between AH 3 diffuse maps and earlier versions is that this file is now saved as a 32-bit bmp rather than 256 colour bmp. The diffuse map is always mandatory for any skin.

The Normal Map (filename_N.bmp) gives the illusion of bumps and dips on the surface of the skin by creating the shadows and highlights of these features derived from the current in-game position of the sun. The map stores information about the relative angle and height of each pixel to the surface of the 3D model. It is mandatory for all new skins, is a 32-bit bmp.

A more complete explanation of normal mapping can be found here:- http://wiki.polycount.com/wiki/Normal_map

Creating a normal map for AH 3 is a two-stage process. First you must create a bump map and then use special software to convert this into a normal map. The initial bump map is pretty much the same as the one used in AH 2 skins where height is defined in shades of grey, with white being maximum height and black minimum. The difference is that in AH 3 the file is saved as a 32-bit colour bmp not as a 256 shade greyscale bmp. So to convert an AH 2 bump map to AH 3 bump map you would just rename it from a “_B” suffix to a “_N” suffix and increase the colour depth to 32-bit.

Converting your bump map to a normal map requires a normal map generator. Luckily these are available as free plug-ins for the most popular graphics programs. There are also stand-alone programs but these usually cost money.

Nvidia make a free normal-generating plug-in that works with both Photoshop and Paintshop Pro:- https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop

There is also a free normal tool available for Gimp: http://registry.gimp.org/node/69

Your graphics program's help file should tell you exactly how to set up a plug-in if you don't know how. If you use Photoshop CS5 this list of normal mapping tutorials might be of use:-
https://www.youtube.com/results?search_query=CS5+Normal+plugin

To use the normal map generator save your bump map as a 32-bit bmp, load this bmp back into your graphics program and run the normal map plug-in. Once you activate the normal software it will bring up a window giving numerous display options. On the Nvidia plug-in that I use the only settings I have altered from default are "Invert Y" and "Scale". Ticking “Invert Y” changes the look of the normal file so that it appears light is coming from the top rather than the bottom of the image and this makes the resultant normal image a lot easier to understand. Scale alters the size of the bumps, a bigger number means bigger bumps. I use a scale of 3 for aircraft and 10 for tanks, any other bump editing I do by using more or less extreme shades of grey on the bump map. Click OK and you will now have a violet 3D-style normal map that the game can read.

Note that without the normal map present none of the other lighting effects will work properly, either in the viewer or in the game. So it is best to create this file after the diffuse map but before the specular, power and environmental maps.

The Specular Map (filename_S.bmp) controls how the surface of the skin reflects the sun's rays. Lighter areas are more reflective and darker less. This file makes a big difference to bare metal skins, the bright reflections on the metal areas and weak ones on the paintwork create a powerful illusion. The file is a 256 shade greyscale bmp. It is essentially the same as the specular map used in AH 2 but in AH 3 the file's suffix has changed from “_B_a” to a more logical “_S. It is mandatory for all new skins.

The Environment Map (filename_E.bmp) controls how the skin reflects the sky and land around it. It is easily created from a copy of the specular map and often looks quite similar to it. This is because different surfaces tend to reflect both the sun's rays and the environment to a similar degree, i.e shiny metal reflects both types of light better than paint. An area of the environment map that is close to white will give a chrome-like appearance to the skin. While this can look quite pretty my personal view is that this is not very realistic for a WW2 metal finish so I like to dull this effect down. So my environment map shades tend to be a fair bit bit darker than their specular map equivalents. The only areas that are near-white are things like glass navigation lights and highly polished inner gear pistons. The environment map is an optional file and is a 256 shade greyscale bmp.

The Power Map (filename_P.bmp) controls how sharp the specular reflections are on the skin. Like the environment map this is easily created from a copy of the specular map and also ends up looking similar to it. It looks similar because shiny surfaces like polished metal tend to have sharp highlights and matt surfaces like paint or rubber have vague highlights. My power maps tend to have grey values darker than the specular map but lighter than the environment map. On my power maps the shadow effects I use on the diffuse, specular and environment maps are deleted and white borders are added to the panel lines. The power map is an optional file and is a 256 shade greyscale bmp.

While the Environment and Power maps are optional I would recommend you create them anyway. If you don't the game will substitute the default skin's maps and this will likely spoil the look of your skin. Also it is very easy to do. Just rename two copies of your specular map, maybe make them a bit darker and that's job done.

The Alpha Map (filename_A.bmp) is used on some AH skins to create transparent holes in the shape. Examples include the holes on the SBD-5 dive flaps, holes in tank tracks and the bullet holes in WW1 aircraft damage files. Where an alpha map is included in the file list for a ride a power map isn't, as the game can only support one or the other file type per set. The alpha map is a 256 shade greyscale where white is visible and black transparent.

You can in theory use an alpha map on any skin to turn parts of it invisible (i.e. instant clip-wing Spitfire) but you will only be able to view the result offline, HTC won't let you submit it like that.

Mapping Example. The composite image below shows the same small sample of the five maps used to make an I-16 skin. Most of the detail on these was created on separate layers for use in the diffuse map and  then just reused on the other maps. If this looks a bit daunting bear in mind your maps do not need to be this detailed, just copying across your panel line layer would do for the normal map. Your paint and material finishes and panel line layers would be good enough for the specular, power and environment maps.

The diffuse map shows the worn silver paint used as winter camouflage over the original green with blue below. As well as the basic colours there are shadow and weathering effects like exhaust staining visible.

There are two screenshots of the normal map, one before the normal mapping conversion software is used and one after. On the first map there are black holes for the machine guns, dark panel lines, a rough texture for the exhaust pipe rust and gentle dips where the fabric has sunk between the framework that supports it. Raised details include the fillets between the tail surfaces and fuselage, internal framework and fabric stitching. The after conversion screenshot shows the same details but as the 3D image the game will read.

The specular, environment and power maps are all similar to each other. The shiny silver painted areas are lighter than the other matt colour painted areas so they will reflect more light more sharply from both the environment and the sun. On a natural metal finish aircraft I make this contrast more pronounced as polished aluminium tends to reflect even better than silver paint. Other common features are dark panel lines and a very bright navigation light glass on the rear of the fuselage. The power map is a bit brighter than the environment map but less bright than the specular. The power map also lacks the shadows of the other two and has bright lines either side of the panel lines to represent the sharp edges of the panels. The stitching is also bright so it relects light more sharply.




Putting it all together. The AH 3 skin viewer has a number of new buttons to help skinners work with these new files. These allow the effects of each map to be viewed in isolation, or with all the effects shown together or, as in the "Lighting Only" screenshot below, with all the effects except the diffuse map shown. Here you can see the effects of the normal map, the panel lines scribed into the surface and the fabric ripples in the highlights on the wing. Also the specularity, environment and power differences in the reflections between the silver and matt painted areas. The environment effect is not very powerful on this skin but you can see where the white wing stripe is not as blue as the silver painted parts of the wing which are reflecting the sky.



The in-game screenshots shows what it looks like when its all put together with the diffuse map.




« Last Edit: July 23, 2017, 09:54:44 AM by Greebo »

Offline Skuzzy

  • Support Member
  • Administrator
  • *****
  • Posts: 31462
      • HiTech Creations Home Page
Re: AH 3 Skin File Format Guide
« Reply #1 on: July 24, 2017, 12:00:14 PM »
For those who may be intimidated by the normal map, you can use the supplied normal map, from the default skin if you like.
Roy "Skuzzy" Neese
support@hitechcreations.com

Offline Krusty

  • Radioactive Member
  • *******
  • Posts: 26745
Re: AH 3 Skin File Format Guide
« Reply #2 on: July 25, 2017, 06:55:06 PM »
Greebo, can you share any more info on the environment map and power map? Specifically I'm looking at a P-47N skin of mine with large patches of bare metal but also large areas painted over.

Offline Skuzzy

  • Support Member
  • Administrator
  • *****
  • Posts: 31462
      • HiTech Creations Home Page
Re: AH 3 Skin File Format Guide
« Reply #3 on: July 26, 2017, 12:15:10 PM »
Greebo, can you share any more info on the environment map and power map? Specifically I'm looking at a P-47N skin of mine with large patches of bare metal but also large areas painted over.

Krusty, not sure if you saw the this post, and am further not sure if it will help, but it is an attempt to give a visual clue on the impact the specular, power, and environment maps.  Source is included.
Roy "Skuzzy" Neese
support@hitechcreations.com

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6693
Re: AH 3 Skin File Format Guide
« Reply #4 on: July 26, 2017, 03:50:49 PM »
A shiny surface is very smooth, so pretty much all the light that hits it bounces off in the same direction. This causes specular reflections from the sun to be very small and focused. Dull matt finishes though are rough like sandpaper so light that hits the surface gets scattered in all directions. This creates larger less focused reflections. The power map replicates this effect. Darker areas on the map give less focused reflections and lighter more focused.

The environment map controls how much the skin reflects what is around it. The simplest way to understand this is to add a pure white environment map to your skin and watch what happens. So long as you have environment mapping enabled in the game you'll get a chrome-like effect that is very pretty but looks kind of silly on a WW2 plane.

The thing is all you have to do here is make two copies of your specular map, rename them with the _P and _E suffixes and adjust their grey levels. Personally I'd make the power map a bit darker than the specular and the environment map darker still.

Offline Krusty

  • Radioactive Member
  • *******
  • Posts: 26745
Re: AH 3 Skin File Format Guide
« Reply #5 on: July 27, 2017, 08:16:49 AM »
Wouldn't the environment map simply be boolean black/white like an alpha mask?

edit: thanks skuzzy. I hadn't seen that one.
« Last Edit: July 27, 2017, 08:19:40 AM by Krusty »

Offline Skuzzy

  • Support Member
  • Administrator
  • *****
  • Posts: 31462
      • HiTech Creations Home Page
Re: AH 3 Skin File Format Guide
« Reply #6 on: July 27, 2017, 09:18:42 AM »
Wouldn't the environment map simply be boolean black/white like an alpha mask?

edit: thanks skuzzy. I hadn't seen that one.

Not at all. 

Go out to a parking lot one day and check how much of the surrounding environment is being reflected off of different colors and textures of the various vehicles.  If you really pay attention to that specific aspect, you will be surprised how different they reflect the environment.
Roy "Skuzzy" Neese
support@hitechcreations.com

Offline Krusty

  • Radioactive Member
  • *******
  • Posts: 26745
Re: AH 3 Skin File Format Guide
« Reply #7 on: July 27, 2017, 09:48:42 AM »
No, I get that. I thought that the environment simply said what surfaces did reflect, and that the spec map and power map would dictate the "power" of that reflection, or something.

Okay, I've got some things to work on for my P-47 updates. I'm having issues with the plugins not showing up in CS5 for me to generate that normal map, but I can work on the rest.

Offline Easyscor

  • Plutonium Member
  • *******
  • Posts: 10856
Re: AH 3 Skin File Format Guide
« Reply #8 on: November 17, 2017, 02:24:09 PM »
I hadn't been able to find the latest 64bit Normal Map plug-in for GIMP. The GIMP page for the Normal map plugin hasn't been updated in years, but Greebo's link got me to the latest normal map plug-in, eventually.


From his link here:
http://registry.gimp.org/node/69

Find the link on that page to:
http://code.google.com/p/gimp-normalmap/

Then ignore the in-page body, 'Contents' list and notice the additional Project page links on the left, and click the Downloads link.

The latest version is gimp-normalmap-win64-1.2.3.zip, or the 32 bit version but it's said to lack the preview feature. The file is dated Jun 23, 2012.

A nice thing about this package is that if you installed an older version, he didn't change the file names, you'll see what I mean. The four files will replace the old ones saving you from removing them.
Easy in-game again.
Since Tour 19 - 2001

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 6693
Re: AH 3 Skin File Format Guide
« Reply #9 on: May 09, 2020, 06:32:44 AM »
As I mentioned in the original post AH3 now requires a skin's diffuse and normal maps to be submitted as 32-bit bmp files, which are 24-bit bmps with an alpha channel added. Since I wrote this though actually doing this has become a bit of a problem. The few current graphics programs I have found that can do this conversion tend to increase the bmp's header size by various amounts compared to the older bmp spec that AH was originally written for. This has in the past caused issues with how skins look in the game and viewer offline but these are fixed now.

However there is another problem which is that the AH skins submission page is designed to only accept bmps with exactly the right file size. It is expecting 32-bit bmps with the old header size and so rejects files converted with most current programs. The way most skinners have been getting round this is to convert to 32-bit using a really old version of Gimp, v2.06. Later versions of Gimp save the bmps with bigger headers and these are rejected by the submissions page. Changing the submissions page to read the newer files is not an easy job apparently as it was not designed to read a range of file sizes.

The problem with using Gimp 2.06 is that this version is obsolete and is very hard to find on the web nowadays. So I have been looking for a better solution that I can recommend to new or returning skinners. HT suggested saving the 32-bit bmp with Microsoft Paint. I was a bit dubious at first as this program can't convert 24-bit bmps to 32-bit itself but I can report that it works. I converted and saved a skin's diffuse and normal maps using the latest version of Gimp, then re-saved the files using Paint. Doing this reduced the header back to old size the submissions page is expecting. I was therefore able to submit the skin with no problem and it looks as intended now its online.

So for anyone new or returning to AH skinning here is what you need to do to submit your skin's 32-bit files:-

If you have not done so already download the latest version of Gimp, it is free to use. MS Paint is included with Windows.

Open your 24-bit diffuse or normal file with Gimp and select "Layer/New Layer". Check the "Fill with:" box says "Transparency", if so hit "OK".

Now select "File/Export as", check it is saving as a bmp, then hit "Export", "Replace" and "Export". in the various boxes that appear.

Next open your converted files in MS Paint and select "File/Save".

You should now be able to submit your skin through the submissions page.




Offline Kazan_HB

  • Skinner Team
  • Silver Member
  • ****
  • Posts: 899
Re: AH 3 Skin File Format Guide
« Reply #10 on: January 06, 2022, 04:24:03 AM »
Nice normal map generator online:
http://cpetry.github.io/NormalMap-Online/
The Few
Since Tour 93