Overhaul to how meshes are generated and some initial work on materials for meshes.