quinlor opened this issue on Nov 28, 2003 ยท 8 posts
quinlor posted Fri, 28 November 2003 at 12:35 PM
An anisotropic shader usually has a preferred direction of highlight. From there names, assume that xdir_x, xdir_y and xdir_z in the poser5 shader node give this direction. But I can see no difference if I change the values of this parameters. Are I am totally wrong about their purpose? If I am not totally wrong, which coordinate system are they using? Local, world or camera space? Does anybody know? Stefan
stewer posted Fri, 28 November 2003 at 1:10 PM
Ignore the x,y and z values - use u_size and v_size, at least that's what I do.
quinlor posted Fri, 28 November 2003 at 1:22 PM
Yes, one can get very nice results using u_size and v_size. However, I was trying to recreate some renderman shaders I read about, that use direction depended specular reflection to create surfaces that have a regular micostructur, like brushed metal. Stefan
stewer posted Fri, 28 November 2003 at 2:02 PM
That should be possible to recreate with the u and v parameters, I think. Do you have a link to those shaders?
quinlor posted Fri, 28 November 2003 at 2:24 PM
I have only a printout, but the calculation of the specular illuination is the following:
point Nf = normalize(faceforward(N,I);
point delta = normalize(dPdu);
color spec = specular(Nf-delta,I,roughness);
ci = Cs*(Ka*ambient() + Kd *diffuse(Nf)) + Ks specularcolor spec;
I dont have seen a render with this shader, so I dont know if it is any good, but it gave me the idee to explore the anisotropic node a bit more. I try to use the available wealth of information about renderman shader as inspiration for poser shaders, but I was not really successful in translating anything nontrivial.
Maybe I should try to actually program some renderman shaders first, just to get a better feeling for them.
quinlor posted Fri, 28 November 2003 at 2:26 PM
A variation has the third line as color spec = specular(Nf-delta,I,roughness)+ specular(Nf,I,roughness);
stewer posted Fri, 28 November 2003 at 2:39 PM
This one's creating an anisotropic highlight based on u and v - therefore, the u_size and v_size parameters should be sufficient to recreate it in Poser. I should look up the syntax of specular() or compile that shader in Aqsis to get the details - later. It's Friday night, I'm out for a beer ;)
quinlor posted Fri, 28 November 2003 at 3:11 PM
If I am understand that thing correctly (but I am a bloody beginner with this stuff), it calculates the specularity with the normal tilted away from the surface tangent in U direction. So it should be more reflective when illuminated in a flat angle from that direction. I really should get my things together and install a renderman compatible renderer to try it out myself. Viel Spabei deinem Bier!