code: def _unparse_material(material):
      
      # TODO EXPORT TEXTURES
      if isinstance(material, visual.texture.PBRMaterial):
          diffuse = material.baseColorFactor
          if diffuse is not None:
              diffuse = list(diffuse)
  
          emission = material.emissiveFactor
          if emission is not None:
              emission = [float(emission[0]), float(emission[1]),
                          float(emission[2]), 1.0]
  
          shininess = material.roughnessFactor
          if shininess is not None:
              shininess = 2.0 / shininess**2 - 2.0
  
          effect = collada.material.Effect(
              uuid.uuid4().hex, params=[], shadingtype='phong',
              diffuse=diffuse, emission=emission,
              specular=[1.0, 1.0, 1.0], shininess=float(shininess)
          )
          material = collada.material.Material(
              uuid.uuid4().hex, 'pbrmaterial', effect
          )
      else:
          effect = collada.material.Effect(
              uuid.uuid4().hex, params=[], shadingtype='phong'
          )
          material = collada.material.Material(
              uuid.uuid4().hex, 'defaultmaterial', effect
          )
      return material
docs: Turn a trimesh material into a COLLADA material.