JH_Engelhardt

JH_Engelhardt

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Render Curve as Tube with Shader. Jan. 21, 2020, 5:56 p.m.

The same issue with visually varying results occurred to me at work today. Especially for light coming from the back.
I took the code from the hairnormal node and modified it, wich worked as a fix for me.

My math knowledge is not deep enough to understand this line:
“if ($bow) $Nhair += ($u*2-1) * normalize(dPds);”
Can anyone explain?

Instead of adding to the normal, I rotated it around the tangent:

float angle = asin(u*2-1);
matrix rot = ident();
vector axis = $ht;
rotate(rot, angle , axis);
vector rotateNn = $Nhair * rot;

The result is visually very close to the polywire version. But somehow does not work with classic-shader/principled-shader, as the normal is clamped on the edges (why?). It works with the basic pbr-components though.
Buil my workaround into bebe´s file.