Add serialize in and out functions in regiment graphics