@MASTERSTHESIS\{IMM2007-05302, author = "I. R. Hafthorsson", title = "Ambient Occlusion - Using Ray-tracing and Texture Blending", year = "2007", school = "Informatics and Mathematical Modelling, Technical University of Denmark, {DTU}", address = "Richard Petersens Plads, Building 321, {DK-}2800 Kgs. Lyngby", type = "", note = "Supervised by Assoc. Prof. Niels J{\o}rgen Christensen and Assistant Prof. Bent Dalgaard Larsen, {IMM,} {DTU}.", url = "http://www2.compute.dtu.dk/pubdb/pubs/5302-full.html", abstract = "Ambient occlusion is the concept of shadows that accumulates at surfaces where the surface is partially hidden from the environment. The more the surface is hidden, the more ambient occlusion we have. The result is a subtle but realistic shadow effect on objects. Ambient occlusion is implemented. To achieve this, existing methods are evaluated and utilized. Ray-tracing is used for casting rays from surfaces. The amount of rays that intersect the surrounding environment is used to find ambient values. The more rays that hit, the more shadow we get at the surface we are working on. We use textures for storing and displaying the ambient values. Overlapping textures are implemented to eliminate visible seams at texture borders. A blending between the textures is introduced. The blending factor is the normal vector at the surface. We have three textures at the surface that each contain ambient values. To eliminate the possibility of having visible borders and seams between textures we suggest that the contribution of each texture will be values from each normal vector. The normal vector is normalized, and then we know that its values squared will sum up to 1. This is according to the well known Pythagoras theorem. We then consider each of these values to be a percentage and we know that they sum up to be 100\%. This allows for us to control the contribution of each ambient texture, assigning one texture color with one normal vector value. The result of this is a smooth blending of ambient values over the entire surface of curved objects." }