Similar Items: Learning Material-Aware Hamiltonian Risk Fields for Safe Navigation