refactoring
add octree grid to flatten the terrain