UE3 Landscape Height Data

Hey guys,

I’m currently working on a UE3 Landscape Importer for 3dsmax. Therefor I read and parse the XML (-like) data to preview the Landscape sections with OpenGL. The users should later be able to de-/select single components for the import.
All of it work fine except the fact that there are unwanted artifacts, valleys and falloffs in the generated surface.
The documentation of LS says that all height data is stored in a 32Bit texture, precisely the height in 16 Bit R and G and the x and y offsets each in 8 Bit B and A.
If I compare the vertex data I read and convert from the XML height data to the floats in an exported OBJ I can clearly see that the conversion has failed.

Does anyone have experiences with the UE3 Landscape components or at least has an idea how to correctly read the height data?
Since the docs say that the data is packed into a texture it might need to be unpacked. Unfortunately there is no information about that point.

The following is the XML code of a single LandscapeComponent. Maybe that helps.
(I cut the line with the height data at ‘[…]’ for this post because it originally had a length of 147517 columns)

Begin Object Class=LandscapeComponent Name=LandscapeComponent_50 ObjName=LandscapeComponent_50
            SectionBaseX=756
            SectionBaseY=378
            ComponentSizeQuads=126
            SubsectionSizeQuads=63
            NumSubsections=2
            MaterialInstance=LandscapeMaterialInstanceConstant'LandscapeMaterialInstanceConstant_1'
            WeightmapScaleBias=(X=0.007813,Y=0.007813,Z=0.003906,W=0.003906)
            WeightmapSubsectionOffset=0.500000
            HeightmapScaleBias=(X=0.007813,Y=0.007813,Z=0.000000,W=0.000000)
            HeightmapTexture=Texture2D'Texture2D_0'
            CachedBoxSphereBounds=(Origin=(X=-31.210938,Y=398.195313,Z=3887.000000),BoxExtent=(X=8064.000000,Y=8064.000000,Z=3177.000000),SphereRadius=11838.476563)
            CachedLocalBox=(Min=(X=0.000000,Y=0.000000,Z=0.882813),Max=(X=126.000000,Y=126.000000,Z=25.703125),IsValid=1)
            ReplacementPrimitive=None
            PreviewEnvironmentShadowing=238
            Name="LandscapeComponent_50"
            ObjectArchetype=LandscapeComponent'Engine.Default__LandscapeComponent'
            CustomProperties LandscapeHeightData a8849c79 ae84a07b b384a17c b984a379 bd84a974    [...]
         End Object

Any help is much appreciated. :):
Thanks in advance!

Hmmm it’s really impossible to reverse-engineer this without a lot of trial and error. It looks like the data you have there (nothing like XML btw…) ‘adjusts’ the coordinates in the texture. So you may want to try getting the texture data into some usable form, and then applying the changes from that data file until it looks right.

So, lots of trial and error. My suggestion would be, either don’t do it, or invest a day or so getting your iteration speed as low as possible first, then start trying.