HDRP Hair Graph documentation or tutorials?

Hi,

Found, that HDRP 5.10 in Unity 2019.1 beta have a special Harl Graph for making hair shaders. But, I can’t find any documentation or example of this shader. What is Hair Strand Direction and etc? Also, what is the best way to set the hair, Transparent or Masked+SubSurfaceScattering, really want to check some example of this shader.

I’d love to know that too! And more generally, I would love to know when all the other newly added nodes would receive documentation (parallax, decal etc.). It looks like node documentation was not updated for some time. :slight_smile:

This repo contains some example shaders for Hair, Fabric, and Decal. https://github.com/Unity-Technologies/ScriptableRenderPipeline/tree/HDRP/ShadergraphSamples

The Parallax node works in two ways

The parallax node feeds into the UV channel for your textures. The Depth Offset you will have to enable in the settings.

5 Likes

Thank you!

No Problem.
Changed a few of the images, these should be better to see

Also, you can use it on Decals.

@Grimreaper358 I apologize for further hijacking the thread, but do you know if it’s possible to make the parallax plane shifted? Usually, parallax is interpreted as “no offset at white pixels” and “full inward offset at black pixels”. However, for surface decals, the optimal interpretation is shifted outward by 0.5: outward offset at white pixels, no offset at gray pixels and inward offset at black pixels. Without that, edges of any decal depicting protrusions and depressions float away from intended position. Here are couple of animations illustrating the difference.

Traditional POM with white origin:

ScratchyGracefulGrayfox

POM with shifted middle gray origin:

GrandSociableEarwig
ImpoliteColdHectorsdolphin

Showing traditional POM (with all boundaries completely swimming away from proper places) and then switching to shifted POM (with all middle gray height elements staying glued in one place):

FatOblongAmazontreeboa

This is fairly trivial to implement if you have access to the POM algorithm source, so even if this is not supported by the existing POM node in any way, maybe I can add it by editing POM node source code. However, maybe you have an idea for achieving the same effect without editing the POM node?

Doesn’t seem like this is possible with the current implementation but it would be really nice to have. Didn’t noticed this when I played with your shaders a few years back.

There’s a new custom Node API available with Shader Graph. Maybe you could use that to implement it? Also not sure if you would need to edit HDRP code but the shader graph nodes are all separate files.

The Parallax node is Located at this location if you wanna take a look at it.
com.unity.render-pipelines.high-definition\Editor\ShaderGraph\Nodes
It’s HDRP specific so the other nodes you’ll find in the shader graph package

The package will be in Library\PackageCache - If you get it from the Package Manager

For the Custom Function node, you can either link it to an HSL file or with the HSL directly in the node.
4407286--401221--upload_2019-4-8_22-11-13.png

I cant find the shadergraph for the hair, the link doesn’t work do you still have this graph i would really like to have a look at how it works.

It’s now integrated into the HDRP package in the Package Manager. So after you download it you should see three sample packs that you can import to your project. it’s the Shader Graph Samples
4813406--460871--upload_2019-8-1_22-18-41.png

2 Likes