Refactored terrain material registration for better extensibility. (#34, #1)