A diamine compound is proposed as well as polymers, copolymers, polyamic acids, polyamic acid esters, or polyimides based on such compound. The compound is represented by one of the general formulae (Ia) and (Ib). It could be shown that such structures, in particular for a specific choice of the residue B, provide, if e.g. used as orientation layers, a photostable, vertically aligning material with an improved VHR.