Metal shader (Chrome, Gold etc.)

   6710   2   0
User Avatar
Member
398 posts
Joined: July 2005
Offline
Hi all!
I write a shader for reflecting metal surfaces like gold and chrome. And I have some questions:
1. How I can apply a Fresnel function to my shader? If I'm using a fresnel like this:


fresnel(normalize(I), normalize(N), eta, Kr, Kt, R, T);
Cf = Kr * reflectlight(P, R, bias, Kr);


I got not a metal but a glass
I think fresnel for metals not same as fresnel for dielectrics.
2. I would like to add support of the blurred reflections dependent on distance between object to which it is applied a shader and the reflected object. How to calculate a distance to the reflected object?
Picture: http://www.visualparadigms.com/houdini/forum/download.php?id=46 [visualparadigms.com]
f = conserve . diffuse . advect . add

fx td @ the mill
User Avatar
Member
136 posts
Joined: July 2005
Offline
2. I would like to add support of the blurred reflections dependent on distance between object to which it is applied a shader and the reflected object. How to calculate a distance to the reflected object?
int samples = 32;
float angle = radians(10);
Cf = Kr * reflectlight(P, R, bias, Kr,“samples”, samples, “angle”, angle);
User Avatar
Member
398 posts
Joined: July 2005
Offline
AndrewVK, this is same what i'm doing Hahaha okay, now i know it
But what with Fresnel? And what if i don't want blur independent on distance?
f = conserve . diffuse . advect . add

fx td @ the mill
  • Quick Links