Haydee 2

Haydee 2

View Stats:
Conversion to standardized Normal Maps
Is there any way to turn the dds normal maps the game uses back into standard blue-base normal maps?
Last edited by Insane Hoof Addict; Nov 18, 2022 @ 9:32am
< >
Showing 1-6 of 6 comments
real_m9ico Nov 19, 2022 @ 9:00pm 
Here is the normal map in RRRG format. A regular map in RGB format. RGB to RRRG is converted without problems, but on the contrary, there is a problem since the B channel is missing.
Insane Hoof Addict Nov 20, 2022 @ 10:01am 
I'm not sure I quite follow you, sorry. I have tried just switching around layers in gimp like one does with unity but that hasn't gotten me usable results, I figure the way the .dds files store normals is a bit more unique than that.
real_m9ico Nov 20, 2022 @ 10:40pm 
I'll try to explain more clearly. In the Aurora HD engine (Haydee 2), the normal map format is .dds DXT5 with an alpha channel (RGBA), but each channel of this format is used to store data in a slightly different way. The original normal map with RGB channels in .dds, .png or other formats looks like a blue picture. It is converted to .dds DXT5 RGBA format as follows: The original Red channel is copied to the Red, Green, Blue channels, and the original Green channel is copied to the Alpha channel. Therefore, information from the original Blue channel is not used. As for Unity, I don't remember exactly which .dds format is used for normal maps. There are several different .dds formats, the main ones being DXT and BC, but there are others. Therefore, forget about converting normal maps from Haydee to any other format. Of course, you can make a normal map from the diffuse map, but this is a bad way if the normal map is very necessary, but it is not.
antales  [developer] Nov 21, 2022 @ 4:59am 
BC1 = DX1, BC2 = DX3, BC3 = DXT5. Same thing, different names.

The problem with normal maps is the DXT compression algorithm which mixes colors. It's not a big problem for color information (because of how we perceive colors), but is a big issue for normal maps. To avoid information loss we use DXT5(BC3) compression storing RG (normal map X and Y componens) separately in RGB and Alpha channels, because DXT5 compresses them separately. Considering Z normal map component - it's mostly around the value of 1, so it can be discarded.

So the conversion process looks like this: RGB (XYZ) -> RRRG(XXXY).

To convert it back having an RGBA image you need:
1. Copy Alpha to Green channel
2. Fill the Blue channel with 1 (255)
3. Discard Alpha channel
Last edited by antales; Nov 21, 2022 @ 6:35am
real_m9ico Nov 21, 2022 @ 5:48am 
Originally posted by antales:
BC1 = DX1, BC2 = DX3, BC3 = DXT5. Same thing, different names.

The problem with normal maps is the DXT compression algorithm which mixes colors. It's not a big problem for color information (because of how we perceive colors), but is a big issue for normal maps. To avoid information loss we use DXT5(BC3) compression storing RG (normal map X and Y componens) separately in RGB and Alpha channels, because DXT3 compresses them separately. Considering Z normal map component - it's mostly around the value of 1, so it can be discarded.

So the conversion procell looks like this: RGB (XYZ) -> RRRG(XXXY).

To convert it back having an RGBA image you need:
1. Copy Alpha to Green channel
2. Fill the Blue channel with 1 (255)
3. Discart Alpha channel
Thank you. I thought that from RRRG to RGB is not converted. I'll know.
Insane Hoof Addict Nov 21, 2022 @ 10:36am 
Originally posted by antales:
BC1 = DX1, BC2 = DX3, BC3 = DXT5. Same thing, different names.

The problem with normal maps is the DXT compression algorithm which mixes colors. It's not a big problem for color information (because of how we perceive colors), but is a big issue for normal maps. To avoid information loss we use DXT5(BC3) compression storing RG (normal map X and Y componens) separately in RGB and Alpha channels, because DXT5 compresses them separately. Considering Z normal map component - it's mostly around the value of 1, so it can be discarded.

So the conversion process looks like this: RGB (XYZ) -> RRRG(XXXY).

To convert it back having an RGBA image you need:
1. Copy Alpha to Green channel
2. Fill the Blue channel with 1 (255)
3. Discard Alpha channel
Perfect, thank you.
< >
Showing 1-6 of 6 comments
Per page: 1530 50