Implement z-bucketizing in NewSurfaceMesh