corrections to materials 3d to take correct variables

This PR fixes a problem with 3D materials where the incorrect number of arguments was called.