Noah had become a farmer and had planted a vineyard.
He got drunk and passed out naked in his tent. Ham walked into the tent and saw his father naked.
Ham went outside and told his two brothers; so they [Shem and Japeth] walked into the tent backwards so that they couldn't see their father's nakedness and cover him.