So I see no reason to use it over the plain DXT5 export option.Īlso, here's a Script-Fu script I made to convert RGB maps to Grimrock style green-alpha ones automatically, including the mipmaps. It doesn't change the compression or mipmap generation algorithm. Then use your converting procedure, and if it ends up the same as the Grimrock 2 version, you did it right.Įdit: I've looked at the gimp-dds source, and the only differences between the DXT5 and DXT5nm export options are that DXT5nm adds the normalmap flag to the file (which Grimrock doesn't care about afaik), moves the red channel to the alpha channel, and fills the red channel with white (not black). You can test this by grabbing a normalmap from Grimrock 1 and the corresponding normalmap from Grimrock 2, for example, assets/env/chain_metal_normal.dds which is present in both asset packs and therefore in both formats. Fill the red and blue channels with black as usual. Copy the red channel to the green channel.ģ. Copy the green channel to the alpha channel.Ģ. So I finally looked into how the GIMP plugin does it, and what you have to do in order to convert an RGB normalmap to a green-alpha one in GIMP is:ġ. Otherwise the lighting on the normal map is off (tested that using a one color diffuse texture and a bumpy normal map with a single light source coming from one direction to see if the shading was correct). Phitt wrote:I'm not sure if the GIMP plugin creates different normal maps by default than the nVidia Photoshop plugin, but with the nVidia plugin using default settings you need to invert the green channel (or export with y inverted), then copy the green channel into the alpha channel, copy the red channel into the green channel and do the rest as you described. The DXT5 way offers much more usable quality, and is still 75% smaller than a completely uncompressed RGBA normal map (which is what Grimrock 1 uses). You use double the memory and disk space compared to DXT1, of course, but the quality of DXT1 normal maps is so awful that you would pretty much never want to use them anyway. In DXT5 with the green/alpha method, you have 6 bits for the green channel and 8 bits for the alpha channel, which gives you higher resolution, AND the channels are independent, which helps a lot with compression artifacts. DXT1 compressed normal maps are awful, they barely look better than uncompressed 8-bit rgb normal maps, because you only have a resolution of 6 bits for one coordinate and 5 bits for the other two (or one, if you drop the blue channel), AND the channels are interdependent leading to further compression artifacts. The only quality you lose comes from the DXT5 compression, since it is a lossy compression method. As long as you have two of the three coordinates, that's enough to compute the third one (which the shader typically does on the fly in cases like these). What information is lost in this transformation? The blue channel often has quite a bit of visual information in it, and by blanking it out, surely the normal map is degraded somewhat?No information is lost by dropping the blue channel. Gambit37 wrote:I'm curious about the "copy red to alpha, make blue and red black" method.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |