def get_object_material(object)
      if object.material.is_a?(MeshFaceMaterial)
        object.material.materials[0]
      else
        object.material
      end
    end
def get_object_material(object)
      if object.material.is_a?(MeshFaceMaterial)
        object.material.materials[0]
      else
        object.material
      end
    end
For the moment just ignore objects that have multiple materials with different animation methods
 Only the frst material will be taken into account for deciding which depth material to use for shadow maps