How did medieval knights distinguish between friend and foe on the battlefield?

by salvator-mundi

I always wondered, how knights in the heat of a battle could tell an ally from an enemy when every full body armour looked very similar. Did they use different colored feathers on their helmets or did they have crests very visible on parts of their armour? I would be happy if someone could enlighten me! Thank you!

Searocksandtrees