POV-Ray : Newsgroups : povray.general : Diffuse, Normal, Displacement, etc. maps : Re: Diffuse, Normal, Displacement, etc. maps Server Time
23 Apr 2024 21:53:46 EDT (-0400)
  Re: Diffuse, Normal, Displacement, etc. maps  
From: Thomas de Groot
Date: 30 May 2019 03:03:25
Message: <5cef803d@news.povray.org>
On 30-5-2019 7:29, Mike Horvath wrote:
> I found a texture online that I like.
> 
> https://3dtextures.me/2018/04/23/brick-wall-010/
> 
> It comes with Diffuse, Normal, Displacement, Roughness, and Ambient 
> Occlusion maps. Is there a POV tutorial on how to use all of these? Thanks.
> 

Diffuse: self-evident;

Normal:
#local NormalMap =
function {
   pigment {
     image_map {
       jpeg "Mynormalmap.jpg" gamma 1
     }
   }
}

sphere {
   0, 1
   pigment {rgb 1}
   normal {
     function {
       NormalMap(x,y,z).red +
       NormalMap(x,y,z).green +
       NormalMap(x,y,z).blue
     } 1.5
     scale 0.5
   }
   finish {
     diffuse 1
   }
   //rotate -20*y
   translate z*1
}

Displacement: can be used as another, more traditional, normal map;

Roughness: Same I guess;

Ambient Occlusion: That is an interesting one, but needs a lot more 
explanation. I have used ambient occlusion in the far past but involving 
the whole scene. It is, among other things, a good way to light up dark 
corners. However, I think it is much less useful with the later versions 
of POV-Ray (my 2 cents).

-- 
Thomas


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.