Baking heightmap into normals alpha

Hi,

Quick question… I’m trying to bake a heightmap into the alpha channel of the normal map (basically trying to optimise my landscape material to only need two texture samples for each texture (base/colour with roughness alpha and normals with heightmap alpha). But finding a snag… If I set the normals texture asset to use default rgba compression and a colour texture sampler, I get a weird sheen/desaturation on the landscape (see link below), but if I set the normals texture to normal map compression and a normal texture sampler it removes the alpha channel data in compresssion…

Does anyone know if there’s a way to use the default compression/colour texture sampler for a normal map without getting the normal discolouration? Any help would be really appreciated.

https://forums.unrealengine.com/development-discussion/content-creation/1720839-sheen-appears-on-landscape-as-it-moves-away-from-camera

Hi, only me again :slight_smile: Sorry I should have done a bit more searching first before posting…

Apparently texture asset Default compression compresses rgb channel values into the 0 to 1 range, whereas normalmap compression compresses them into the -1 to 1 range (it also optimises out the blue and alpha channels)… So if you want to use default texture compression with linear colour texture sampler, simply attach *2-1 maths expression nodes to the texture sampler rgb output and get exactly the same output as using the normals compression…