Author Topic: AH III normal mapping issue  (Read 661 times)

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 7075
AH III normal mapping issue
« on: March 30, 2016, 08:39:51 AM »
AH III replaces the AH II's bump mapping with normal mapping, which does a much better job of simulating bumps and dips on the surface of the skin. There is an issue with it on some skins though which skinners should be aware of. Items on the bmp which are reversed, (i.e. where text has to be mirror imaged to appear correctly on the skin) will also have reversed normal mapping on the skin. So in these areas panel lines will appear to be raised rather than sunken and so on. I have run across this issue before on the LH side of the B-29's vertical stab, and recently on many of the Mosquito's parts.

It would be a load of work for HTC to fix the bump mapping for all those shapes in the game with reversed components so it will be down to skinners to correct this issue if they want to. The way round this is to mirror image the bump map used to create the normal map, but just in the affected areas of the bmp. This means panel lines in these specific areas would be made white instead of black and so on.

In Paint Shop Pro the easiest way of doing this is to create an "Invert" adjustment layer in the bump map file and place it at the top of the layer list. All the areas painted white on this layer get inverted and all the black areas don't. The bump map's base grey layer needs to be set at 128 RGB for this method to work.

The deliberately exaggerated normal-mapped raised stitching effect on these screenshots shows the issue. The light is coming from above but on the LH side it appears to be coming from below.

« Last Edit: March 30, 2016, 09:57:41 AM by Greebo »

Offline Devil 505

  • Aces High CM Staff
  • Plutonium Member
  • *******
  • Posts: 9187
Re: AH III normal mapping issue
« Reply #1 on: March 30, 2016, 05:38:40 PM »
Thanks for pointing this out Greebo.

My question is why does this occur? Newer AH model no longer use many mirrored parts, from a bitmap especially on external parts. If both sides are drawn white in the normal map, why are they not both raised in the game? This makes no logical sense to me. Of course I have seen this on other planes with the older bumpmap as well - the entire underside of the right wing on the 109E is opposite. It is even worse not in the beta, where it seems the entire plane is opposite. 

Then there are the issued of bumped/recessed parts not showing highlights from the correct angle. I was hoping these kind of things would have been fixed in the new version, but it seems not.
« Last Edit: March 30, 2016, 05:40:50 PM by Devil 505 »
Kommando Nowotny

FlyKommando.com

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 7075
Re: AH III normal mapping issue
« Reply #2 on: March 31, 2016, 04:34:59 AM »
Just to be clear I'm not talking about mirrored parts where one part on a bmp is used more than once on the skin, but reversed parts where the part is displayed back-to-front on the bmp compared to how it looks on the skin.

I haven't been aware of this issue in AH II but then I haven't really looked for it. Normal mapping does not just take into account the relative height of a pixel on the skin like bump mapping but also its relative angle to the surface. So my assumption is that the plane shape is coded to de-reverse the diffuse map where needed but is not coded to de-reverse the normal map angles. To fix this HTC would have to go through every shape checking for reversed normal mapped areas and re-code the shape to correct this. I guess this isn't worth the man-hours involved as its unlikely players would ever notice.

BTW one of the Mosquito's wings is reversed on the bmp but displays correctly in the normal map. The RH fuselage and cowl tops are also reversed on the bmp but the normal map needs to be corrected for them to display correctly on the skin. So I'd suggest looking over any shape carefully when editing the normal map the first time to check for areas with incorrect orientation. Best bet is to set the normal map far too strong at first to make the issue stand out.
« Last Edit: March 31, 2016, 04:41:13 AM by Greebo »

Offline Devil 505

  • Aces High CM Staff
  • Plutonium Member
  • *******
  • Posts: 9187
Re: AH III normal mapping issue
« Reply #3 on: March 31, 2016, 03:42:24 PM »
BTW one of the Mosquito's wings is reversed on the bmp but displays correctly in the normal map. The RH fuselage and cowl tops are also reversed on the bmp but the normal map needs to be corrected for them to display correctly on the skin.

Tu-2 is like this also.
Kommando Nowotny

FlyKommando.com

Offline Greebo

  • Skinner Team
  • Platinum Member
  • ******
  • Posts: 7075
Re: AH III normal mapping issue
« Reply #4 on: April 03, 2016, 02:36:19 AM »
Looking at the Mosquito in-game I now realise that the affected areas of the shape are only reversed in one direction WRT lighting direction. What this means is that whatever I do with the normal map it will always display incorrectly. So if I adjust an area of the map to be a negative image it may fix the light direction in say the up/down axis but it will also break it in the left/right axis.