Engineering Far-field and Near-field Thermal Radiation Using Metamaterials