Thursday, October 29, 2015

Guide: DA:I Normals explained

Hello again for another episode of textures with Otte!

While I covered normals briefly in my "Guide: Texture information for aspiring modders", I opted to go into more detail now and really highlight the issues with the DA:I native normalmap format and how to work with them.

As I explained in the first guide, DA:I normals are in ATI2 (3Dc) format, it has two channels (X/Y instead of R/G/B). The DDS plugin decompresses the X/Y blocks and stores them in the R/G channels (the wrong way around).
I will be working with "DA3/Actors/BaseHeads/Inquisitor/Textures/hf_hed_inq_n" for this example.

As you can see, opening your file in Photoshop, Gimp and the Compressonator nets you flipped channel data! Now Photoshop has the added problem that, when the opened texture is flagged as a normal by the plugin, R/G/B is reconstructed from the R/G channels. As you can see, it messes up the normal. Here's how you fix it:

  • Open your extracted normalmap in Photoshop.
  • In the NVidia DDS Read Properties window select "Convert images to 32bits"
  • Upon opening, go to "Image → Mode → 16 bits/Channel". 
  • Select "Exposure and Gamma" from the dropdown and hit "OK".
  • Go to "Image → Adjustments → Levels..." and change the center value from 1.00 to 0.45
    < This workflow was taken from MediAsylum on DeviantArt, go call them a rockstar! >

Et voila, Photoshop falls in line with the rest:

Seeing the 3dc/ATI2 export flips the channels back correctly, if you'd just import and export your normals in your texture program without editing them, they'll come out right when you import them back into ModMaker. However, if you generate a new normalmap to overlay elements like you normally would without having flipped its channels, your details could end up the wrong way around ingame (extruded vs indented for ex).

To flip your channels in Photoshop:
  • Go to "Image → Adjustments →  Channel Mixer" and switch the red and green channel info (select red in the dropdown, change red 100% to 0 and green 0% to 100, then do the opposite for the green channel).
And in GIMP:
  • Go to "ColorsComponentsChannel Mixer" and switch the red and green channel info (select red in the dropdown, change red 100% to 0 and green 0% to 100, then do the opposite for the green channel). 

You can now generate and edit as you normally would. Before you save your edited normal, be sure to flip the channels back again.
Alternately you can also flip the channels on your generated normal before merging it with the original normal.

That's it for my normal advice. Hope you find it useful.

1 comment:

  1. Hi otte. i've been getting into ME3 and really wanna play my femshep wearing EDI's from ashes outfit. I managed to dig out a post where you replied to a guy who faced a similar problem to me. Mesh was a success but i am having problems with the norm file i believe. I used the reckoner armor but that norm file has 10 mipmaps whereas the one i extracted for EDI has 9. Tried removing topmost 512x512 and replacing the rest. All good except the whole body is tinged in blue.
    Do give me a shout when you see this.