Ricci-flat branes