Let L L be a fixed branch – that is, an irreducible germ of curve – on a normal surface singularity X X . If A , B A,B are two other branches, define u L ( A , B ) := ( L ⋅ A ) ( L ⋅ B ) A ⋅ B u_{L}(A,B) := \dfrac {(L \cdot A) \> (L \cdot B)}{A \cdot B} , where A ⋅ B A \cdot B denotes the intersection number of A A and B B . Call X X arborescent if all the dual graphs of its good resolutions are trees. In a previous paper, the first three authors extended a 1985 theorem of Płoski by proving that whenever X X is arborescent, the function u L u_{L} is an ultrametric on the set of branches on X X different from L L . In the present paper we prove that, conversely, if u L u_{L} is an ultrametric, then X X is arborescent. We also show that for any normal surface singularity, one may find arbitrarily large sets of branches on X X , characterized uniquely in terms of the topology of the resolutions of their sum, in restriction to which u L u_L is still an ultrametric. Moreover, we describe the associated tree in terms of the dual graphs of such resolutions. Then we extend our setting by allowing L L to be an arbitrary semivaluation on X X and by defining u L u_{L} on a suitable space of semivaluations. We prove that any such function is again an ultrametric if and only if X X is arborescent, and without any restriction on X X we exhibit special subspaces of the space of semivaluations in restriction to which u L u_{L} is still an ultrametric.