Page MenuHome

Hair info: tangent (direction)
AbandonedPublic

Authored by Mikhail Matrosov (ktdfly) on Mar 26 2021, 2:15 PM.

Details

Reviewers
None
Group Reviewers
Cycles
EEVEE & Viewport
Summary

Adds hair tangent (direction) output to hair info node.

Outputs a unit vector tangent to hair, pointing in the direction of hair growth. Works for Cycles and Eevee.

Why it is needed?

Naming

  • It is tangent to hair.
  • Name "direction" would be confusing for curly hair.
  • It is not "root normal" since it is not locked to a hair root, and is not constant along hair. Though, it is still works for a RCS request.

Diff Detail

Repository
rB Blender

Event Timeline

Mikhail Matrosov (ktdfly) requested review of this revision.Mar 26 2021, 2:15 PM
Mikhail Matrosov (ktdfly) created this revision.
Mikhail Matrosov (ktdfly) created this object with edit policy "Administrators".

The tangent is currently exposed as part of the Geometry node, I think this is the same thing?

Maybe there is an argument that it's more discoverable as part of the Hair Info node, though so far we have avoided duplicating such things.

The tangent is currently exposed as part of the Geometry node, I think this is the same thing?

No, it is not the same thing. In the Geometry node the exposed tangent is exactly Z-tangent and doesn't know anything about underlying hair structure. Here I propose basically a hair direction output socket.

In Cycles, the Geometry Tangent also returns normalize(sd->dPdu);.

In Eevee it seems to be doing something else indeed.

In discussion with @Brecht Van Lommel (brecht) he suggested to fix Geometry info node for Eevee to output hair tangent (and to be consistent with Cycles) to avoid duplicating functionality. See D10841: Geometry info -> tangent: Make consistent with Cycles for hair

The tangent is currently exposed as part of the Geometry node, I think this is the same thing?

No, it is not the same thing. In the Geometry node the exposed tangent is exactly Z-tangent and doesn't know anything about underlying hair structure. Here I propose basically a hair direction output socket.

When you say the tangent is exactly Z-tangent.
Do you mean it get's the direction of the surface the hair is sitting on?

Cause that would still be very useful for toony shading effects. I've talked about it prior, but Here I've narrowed down and described it a bit better

When you say the tangent is exactly Z-tangent.
Do you mean it get's the direction of the surface the hair is sitting on?

No, it's the tangent along the hair curve, not the surface it originated from.