hi,
I'm implementing a parallax shader and that has to take use of these functions & variables to calculate the local tangent space of shading point. I just find primitive variables provided by VRay SDK are dPdx and dPdy. Dose VRay SDK provide the functions & primitives mentioned as title ?
I find that there's a function called "computeTangentVectors" in misc_ray.h but the calculation different from i've ever seen in renderman, i remember in renderman the tangent vectors along s and t are calculated as follows:
vector along t = Du(t)*dPdu + Dv(t)*dPdv
vector along s = Du(s)*dPdu + Dv(s)*dPdv
So the questions about this issus are:
1. Does the "computeTangentVectors" do exactly the same thing ?
2. Does this function also work if i pass in a bumped normal vector rather than geometry normal ?
3. What space should i convert the normal vector to before passing to the function ?
4. If VRay don't provide infomation such as dv & dv, is it possible to retrieve the area of mircopolygon ?
I'm implementing a parallax shader and that has to take use of these functions & variables to calculate the local tangent space of shading point. I just find primitive variables provided by VRay SDK are dPdx and dPdy. Dose VRay SDK provide the functions & primitives mentioned as title ?
I find that there's a function called "computeTangentVectors" in misc_ray.h but the calculation different from i've ever seen in renderman, i remember in renderman the tangent vectors along s and t are calculated as follows:
vector along t = Du(t)*dPdu + Dv(t)*dPdv
vector along s = Du(s)*dPdu + Dv(s)*dPdv
So the questions about this issus are:
1. Does the "computeTangentVectors" do exactly the same thing ?
2. Does this function also work if i pass in a bumped normal vector rather than geometry normal ?
3. What space should i convert the normal vector to before passing to the function ?
4. If VRay don't provide infomation such as dv & dv, is it possible to retrieve the area of mircopolygon ?
Comment