How Ham could have done such an evil deed so early in the season following the flood is a curious matter. The influence that inspired and motivated Ham to procreate with his mother had to come from somewhere. The ability to raise up fruit that would be grafted into the bad tree had to come from somewhere. From part two of this study it was revealed how Genesis 3:18 is a prophetic declaration that thorn and thistle men would be brought forth from the cursed ground for Adam for the full duration of his abiding in the dust body. Even though the surface of the earth was purged of the seed of the serpent by the flood, the promise assured their return with little delay.
In the post-flood age, the serpent's seed must be brought forth in the same manner as before the flood, through procreation with the daughters of men. In the garden it was the serpent Tree with Eve, and afterward, the fallen angel sons of god with the daughters of men. The thorns and thistles must be brought forth, and another sire would be required.
Hath not the potter power over the clay, of the same lump to make one vessel unto honour, and another unto dishonour?
Ham may have been made from the same lump of clay as his brothers, but he was somehow made unto dishonour. How did this come to pass? It's easy to understand how people are who and what they are because of what's inherited from their parents, genetically. It's harder to understand how we're not simply as we were when we came into the world. What we now know from scientific study is that our genes change over time due to viral and other factors. Could Ham have mutated somehow? In the biblical narrative, immediately before we're told of Ham's sin, we're given what must be considered a clue.
Then Noah began farming and planted a vineyard. He drank of the wine and became drunk, and uncovered himself inside his tent.
Some years must pass before a vineyard matures and yields grapes. More time must pass before the grapes can produce alcoholic wine. During this season, the food brought with Noah and his family on the ark ran out and they began to eat what grew from the ground. The ground had recently been purged by the flood but yet was, in fact, no less cursed than it had been before the flood. The flood did nothing to change the status of the cursed ground, or the promise that it would produce for Adam a "thorns and thistles" people! During this season, Ham also ate of the cursed ground. This son of Noah (who was "perfect in his generations") produced Canaan, who was specifically cursed, but Ham also begat Cush, who brought forth Nimrod. It's in the biblical account of Nimrod where some light appears to be shed on what happened to Ham.
Cush hath begotten Nimrod; he hath begun to be a hero in the land; he hath been a hero in hunting before Jehovah; therefore it is said, `As Nimrod the hero [in] hunting before Jehovah.'
Genesis 10:8-9 (Young's Literal Translation)
As Tom Horn points out, Nimrod didn't start out life as a hero, a giant, or, "gibborim." He "began to be," genetically changing, mutating. It seems likely to me that by a similar dynamic, Ham came to be inspired, motivated and enabled to begin fulfilling the promise of Genesis 3:17, as suggested in the clue offered in Genesis 9:20. Ham was the chosen vessel through whom those prophetic words would begin to be fulfilled in the new age.
I believe "environmental" factors had a role to play, and I'm also convinced that choices made about obedience, about sin, have an effect on one's DNA. Have you ever noticed the difference in appearance between those who habitually practice sinful deeds and those who habitually practice good deeds? It does not seem at all likely that Ham just woke up one day with the idea of procreating with his mother, then just followed through. Over time, Ham changed.
Beyond the environmental factors and those due to choices Ham must have made it seems likely to me that there were also certain genetic factors that were present from birth, and that it was the sum of all these that brought Ham to "uncover his father's nakedness" and become the father of more than one line of bad tree fruit.
That Noah was perfect in his generations we know because the Bible declares it. Whether Noah's wife, the mother of Ham and Canaan by Ham, may have had genetic corruption that transferred through her 23 chromosome contributions is not something I can say with certainty, but it seems likely. If she was not as Noah was, "perfect in her generations," there is certainly the potential for corruption in her children. As I was taught genetics, the male who contributes the Y chromosome determines the blood and therefore the soul component. What influence a mother has genetically, who can say. The Lord knows, and I just know that I don't. If Noah's wife had corrupted DNA then certainly Shem and Japheth had the potential for some degree of corruption. The wife of Ham, who was probably the mother of Cush (who begat Nimrod), may have had corrupted DNA that passed to her children. The wives of Shem and Japheth must also be considered for their potential in the repopulating the earth with genetically impure offspring.
It's really necessary in the broader context to consider the underlying spiritual nature of such matters as our behavior and genetic identity. There is always the matter of legality to be considered, which establishes the relationships and domains of the supernatural agents involved. For, truly, we wrestle not against flesh and blood as it is written in Ephesians 6, but against spiritual entities who have appointed domains of activity and authority. Angels and demons that can and do manipulate matter have a role to play in who does what and becomes what, ultimately according to the will and purposes of the sovereign God.
Ham, a vessel of dishonor made from the same lump of clay as his brothers, after eating what grew from the cursed ground for a season decided to procreate with his mother. Thorns and thistles were going to be produced for Adam. The Lord God made provision for his Word to be fulfilled.