   BRDF implementation problem
  Hello guys,I have a weird situation now, i'm trying to implement BRDF for my raytracer. This is my situation : Given : outgoing direction of ray   incoming direction of ray   normal   color at that point   variance of the gaussian lobeand I want to :implement BRDF by centering a gaussian normal distribution around the reflection direction for perfectly specular reflectionquestion is : how to center the gaussian distribution!   
  Why do you need a gaussian distribution for perfect specular reflection? In case I did not understand your statement, what are you trying to do exactly? Coulnd't you use the angle between the out direction and the specular direction?;  I did this by choosing the ray from a canonical distribution first (i.e., around the vector (0, 1, 0) ).  Then I built a matrix that transforms the vector (0, 1, 0) onto my reflection ray, and applied it to my point on the canonical distribution.  In my case I was writing a path-tracer, so building the matrix once for many rays was pretty cheap (relatively speaking).  I would also like to know if there is a better/faster method of doing this.   ;  @cignox1well actually i want to have a distribution (whose variance is known) around the view direction, this is what i wanted to know, how to center this distribution around my view direction   ;Quote:Original post by mahendragr@cignox1well actually i want to have a distribution (whose variance is known) around the view direction, this is what i wanted to know, how to center this distribution around my view directionWell, then I would transform the points using a matrix, as crowley9 suggested.