Unity-Technologies/com.unity.demoteam.hair

Feature request: Dynamic strand diameter

Closed this issue · 3 comments

Hi, currently the only way to set width on parts of strands individually is using the High Quality Line Renderer, which is difficult to use due to outstanding bugs and performance considerationts.

Would be really nice to have the option to set the strand diameter for rendering of e.g. "Builtin Strips" with different ratio / extends for roots and tips to make them appear thinner compared to the diameter of the rest of the hair.

Hi. This is possible since 0.13.x, although currently only via HairAsset properties: Look for "tip scale" and "tip scale offset". For alembic source curves, or custom curve data, the importer will also attempt to infer these parameters from curve vertex width.

It's also technically possible to modify width purely visually using the widthMod input on the HairVertex node, though there are pitfalls to doing this.

In the near term, this setup will be simplified a bit so things are more obvious--it's technically a fine balance, since the coverage based LOD selection requires things to be defined up-front, and e.g. increasing width (mod > 1) in shadergraph will risk causing pop-in, which conflicts with the promise of seamless automatic LOD.

Ah, cool, sounds good! Ideally The same would be possible for root, as I like to make hair also thinner at the root for certain hair styles. Would be possible with the HairVertex node. In ideal case I think having option in HairInstance to dynamically set offset reach and factor (multiplier or power) for root and tips would be great.

Implemented as part of 0.17.0-exp.1 (504bce7), which solidifies workflow around tapering, including runtime adjustments for tapering via HairInstance. Additionally, scaling strand width near roots can be accomplished via the HairVertex 'widthMod' input in ShaderGraph.