• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MCX DDS Normal map back conversion

Messages
1,040
Country
ca-ontario
Hi Everyone,

Recently, I have lost the source files of my textures that included a displacement texture, but I still have the DDS ones that were created during the MSFS2020 SDK compilation into a scenery package. Now, I am trying to at least reverse-convert them to the PNG NORMAL texture. So - I am trying to figure out a reverse conversion of a NORMAL texture in DDS format (they usually appear green), to a NORMAL texture in PNG format, and then back to a DISPLACEMENT texture (grayscale heightmap). Here is the forward process of creation - I am not sure of the proper nomenclature, so I will designate them like so:

From Source (Displacement grayscale PNG heightmap):
1709654652801.png

To NORMAL PNG using NVIDIA Photoshop filter:
1709654699529.png

and then, after being processed by MSFS2020 into a package, DDS type:
1709654775974.png


Now, I can open the DDS (the green one) in MCX, AND, I can convert it back to NORMAL PNG (blue type) using MCX's "convert normalmap to FS" option:
1709655773718.png


However, there seem to be a few problems with this conversion:

First, the DDS type gets vertically flipped during conversion, but the back-converted map is not vertically flipped. You can tell by the location of 4 little circular vents around the middle of the image.

Second, Saving this as PNG, the resulting map contains transparency, and the Red and Green channels, where normal data is, are different from what the original NORMAL PNG source was.
Third, I tried saving this in different formats (through MCX) and the results are different in every case: For example, saving as JPG, the red channel is completely dark with a hint of a few normals. Saving as TIF, the channels have transparency, just like PNG.

So, my question is, can I reliably back-convert my DDS NORMAL (the green type) to a PNG NORMAL (blue type)? How is that done? If not with MCX, what software is out there for this conversion?

Also - can I safely vertical-flip the normal map? will that mess up the normals?
 
Hi,

I don't think you would want to go to the FS normal map layout, as FSX also uses a non normal layout. So I think you would want to go to the glTF layout. I can't remember if that's available in the texture conversions in MCX as well.
 
Hi,

I don't think you would want to go to the FS normal map layout, as FSX also uses a non normal layout. So I think you would want to go to the glTF layout. I can't remember if that's available in the texture conversions in MCX as well.
Thanks Arno,

by "layout", you mean texture format? There is no glTF option in MCX's texture converter, only "convert normalmap to FS", at least, in the UI.

Playing with it a bit more, I noticed that the DDS can be saved as PNG, TIFF or BMP (JPG too but artifacting is noticeable). Then, that map can be opened in Photoshop, vertically flipped, and its BLUE channel filled with WHITE instead of BLACK. Then, it seems I get a very close version of the NORMAL PNG file (the blue one) that I started with. I compared it with the original I created from the grayscale displacement map and converted it with NVidia filter, and the result is almost identical, there are very subtle differences on a few very small areas.
 
You can directly load the dds in Photoshop, change the blue channel to white, and then save as PNG. No flipping needed. MSFS compiler converts to DDS without any flipping, or mipping. The sim doesn't use the blue channel, so maybe you don't need to even change the blue channel.
 
You can directly load the dds in Photoshop, change the blue channel to white, and then save as PNG. No flipping needed. MSFS compiler converts to DDS without any flipping, or mipping. The sim doesn't use the blue channel, so maybe you don't need to even change the blue channel.

Hi, thanks!

Sorry, but I am observing vertical flipping during the MSFS2020 SDK conversion, from PackageSources to Packages. This is also verified with MS's own packages, for example:

1709666875228.png
1709666917394.png
1709666835188.png


As for opening those DDS's, the only way I can open DDS Normal files converted by SDK tools is MCX. I have 2 versions of Photoshop, CS3 and CC 2018, and both of them open the DDS file with nothing but garbage, either all channels black or with some linear artifacts.

On my CS3 I have a working version of NVidia Normal map filter, and on CC 2018 I have tried to enable the same NVidia filter but when I try to use it, my Photoshop does CTD. Apparently I do have some DDS plugin extensions that allow me to open DDS file, but, as I mentioned, nothing but garbage in the channels.

What version of Photoshop are you using, and with what plugins, if I may ask?
 
Hi,

The shader in MCX makes a distinction between the normal maps in the glTF layout (as used before going through the MSFS packager tool) and those in the processed MSFS layout as they end up in the package. They only differ for the blue channel btw. So as Dick said if you make the blue channel white you should have the normal map as before the processing. Maybe I should add the conversion to and from MSFS normal map to the material editor as well.
 
Nowhere is the DDS texture flipped in MSFS.
View attachment 91751

Wow. Ok, that is weird. My normal DDS doesn't preview in explorer:
1709670492934.png

But if I open it in MCX through "special tools->Texture Converter", it is definitely flipped.
1709670643453.png

That's a bit of a mystery. Would you mind opening that same file in MCX "special tools->Texture Converter"?
 
The photoshop plugin is here: https://developer.nvidia.com/downloads/texture-tools-photoshop-plugin I have Photoshop CS2
The greenish tint of your normals tells me that it is from an MCX conversion, and any flipping must be done in MCX... not Photoshop or MSFS.
Aha. So it is MCX that empties the blue channel and possibly does the flipping.

blue channel all white -> blue tint
blue channel all black -> green tint
When I create a normal map using NVidia filter, blue channel is filled with white and all normal maps are blue tinted.
 
MSFS compiles the Normal Blue channel to 50% grey. MCX uses black. The industry standard is white. MCX lets you change it to white... but it vertically flips it as you can see. Everything in FSX and P3D using DDS is flipped. In MSFS is it not. MSFS does some odd things, like this and the placement of objects defaulting to -180 degrees.
 
Hi,

The shader in MCX makes a distinction between the normal maps in the glTF layout (as used before going through the MSFS packager tool) and those in the processed MSFS layout as they end up in the package. They only differ for the blue channel btw. So as Dick said if you make the blue channel white you should have the normal map as before the processing. Maybe I should add the conversion to and from MSFS normal map to the material editor as well.
Thanks Arno! A while ago I've been converting some of my scenery using MCX (if you remember, I was asking questions) and all the conversion went without any problem, so I think that part is fine (as in, the normal maps, among other things, converted fine, with the blue channel filled white)

The part that confuses me is when I open the DDS Normal map in MCX using "special tools->Texture Converter". It seems this action clears the blue channel (from white to black), making the texture appear greenish, and there is also some vertical flipping going on as well.
 
MSFS compiles the Normal Blue channel to 50% grey. MCX uses black. The industry standard is white. MCX lets you change it to white... but it vertically flips it as you can see. Everything in FSX and P3D using DDS is flipped. In MSFS is it not. MSFS does some odd things, like this and the placement of objects defaulting to -180 degrees.
Aha, ok, good to know. Ya, I noticed 180 degree flipping of buildings as well. Thanks!
 
The part that confuses me is when I open the DDS Normal map in MCX using "special tools->Texture Converter". It seems this action clears the blue channel (from white to black), making the texture appear greenish, and there is also some vertical flipping going on as well.
The texture converter will not clear channels. When you do a conversion from normal map to FS normal map or vice versa the channels might be affected. But simply loading a texture will never do that.

The flipping is probably because MCX flips all DDS textures (as FSX does that), MCX has no way to know if this is a FSX or a MSFS DDS texture.
 
Back
Top