Looking at something has an effect on ones mind and that in turn can have a physical effect on ones baby. This even applies to animals . The gemara in Avoda Zara 24a explains that they would bring a cup of red wine in front of the para(heifer) in order that it will see it and its baby will be a parah adumah.
With regards to people , the gemara in gitten 58a brings that the Roman's would tie Jewish captives to the bed while having relations in order for their children to look beautiful like the captives. The Maharal explains that they also had sculptures in the house for the same reason,that the images should be ingrained in their mind so they have good looking children.
The gemara in brachos 20a brings that Rav Yochanan would sit outside the mikvah and the women would see him and in effect have beautiful children ,since Rav Yochanan was very handsome(Rashi)[ The Divrei Yatziv explains that it wasn't his physical beauty,but rather his holy countenance].
The Ohr Hachaim at the beginning of parshas Tazriah writes that if one has bad thoughts then it can have negative effects on the baby. On the other hand,if one has good thoughts then it can have positive effects on the baby.
From ספר אוצר פלאות התורה.