MODIFIED: continue working on the automatic texture applying for the terrain