Just to simplify the calculation a bit… If CG Dealers' calculation is correct (and to my eyes, looks like it mostly is), there's a bit that actually cancels out, and some inaccuracy caused by Gaea's UI.
Unreal Engine X/Y scale: 100 * [Desired resolution in meters] / [heightmap resolution]
Unreal Engine Z scale: 100 * [Gaea
Scale] / 512
CG Dealers' full calculation for X/Y makes sense. Note that
Real scale would be usable for the X/Y scale, if Gaea didn't calculate it based on its "Standard" (powers of 2) resolution, rather than the UE resolution selected - and also chops off probably a few too many decimals for it to be usable. E.g. a map with Terrain Definition
Scale set to 4000 and exported as 4033 will show 4000/4096 ≅ .977px/m rather than 4000/4033 ≅ .992px/m. So, you're better off doing that calculation yourself - like CG Dealers does.
As for the Z scale, CG Dealers' full calculation is:
Height] / [max height in meters] ) multiplied by
([max height in meters] / [Gaea
Height-Scale Ratio]) multiplied by
100 * (1 / 512)
1/512 is straight from Unreal Engine's documentation. And 100 is due to UE's standard unit being centimeters. Note that CG Dealers divides by his "max height in meters" only to multiply by it in the next part of the calculation. The two cancel out.
Height-Scale Ratio in Gaea, which CG Dealers uses, is calculated simply by dividing the Terrain Definition
Scale - and then, again, chopping off probably a few too many decimals. So, like
Real scale, better to just do that calculation yourself too - height divided by scale. But making that change shows us that we're actually multiplying by
Height and dividing by
Height - the two cancel out. Leaving us with 100 * [Gaea
Scale] / 512.
This, of course, assuming that the rounded
Real scale and
Height-Scale Ratio aren't also the ones Gaea uses to save the files. 😉