Self-assembling of Ti- and Zr-based high-melting non-oxide ceramics