When human beings begin to multiply on the earth, the text says that the sons of God see that the daughters of men are beautiful and take as wives any they choose. The Nephilim are then born, famous men of old. The passage is brief and its interpretation is debated, but the account moves on to what matters: the Lord sees that the wickedness of man is great and that every inclination of the thoughts of his heart is only evil continually.
The Lord is grieved that he made man and decides to wipe from the earth humanity and the animals. But Noah finds favor in the eyes of the Lord. Noah was a righteous man, blameless in his generation, and he walked with God; he had three sons, Shem, Ham and Japheth. The earth was corrupt and filled with violence, and God decides to put an end to all flesh.
God tells Noah to build an ark of gopher wood, with rooms, sealed with pitch inside and out, 300 cubits long, 50 wide and 30 high, with a window, a door in the side and three decks. God announces the flood and establishes his covenant with Noah: he, his wife, his sons and their wives will enter the ark, along with a pair of every living creature, with food provided. Noah did all that God commanded him.