Working on heightfield encoding.