The Torah states that Noach was a completely righteous man "in his generation". Rashi quotes the famous Gemara in Sanhedrin (.ח"ק ףד) which presents two opinions in reference to the words "in his generation." One opinion understands this Posuk to be praising Noach; even though he lived in such a bad generation, he was as good and as righteous as if he were in a good generation. Had he actually been in a good generation, he would have been even greater. The other opinion says that the only reason Noach was considered righteous was because he lived in a bad generation. Compared to the rest of the generation he was righteous, but in another generation he would not have stood out.
The Chasam Sofer comments that both opinions are correct. If Noach had been in Avraham's generation and acted the way he did in his own generation, then indeed he would not have been so special. However, if he actually had lived in Avraham's generation then he would have been influenced by Avraham and thus would have been even greater.
We learn from this that being in the presence of spiritually elevated people is very important. Everyone is influenced by the environment in which he lives. If one spends time around people who are great in learning or in Chesed, one can be influenced by them and can become like them. One must therefore carefully choose his friends and associates.
In Pirkei Avos (`ז הנשמ `א קרפ), Nittai HaArbelli advises us to distance ourselves from a bad neighbor and not to associate with a wicked person. Influences can be both positive and negative; we must all make sure to seek out the proper kind of influence.