Hair Shading Model + SSAO

Our artists are reporting that when you use the Hair shading model in UE, it doesn’t get included in the Screen space AO pass. Is this expected? Is there any other approach to get some AO on hair? Thanks

Chris

Hi,

thanks for reaching out. This is expected behavior as the SSAO pass does not calculate the world normal for geometry that uses the hair shading model. That can be seen in the following lines in Engine/Shaders/Private/PostProcessAmbientOcclusionCommon.ush (the world normal is calculated for every shading model except hair):

// Otherwise sample Gbuffer normals if the shader model has normals.
FGBufferData GBuffer = GetGBufferData(UV, false);
if( GBuffer.ShadingModelID != SHADINGMODELID_HAIR )
{
	WorldNormal = GetGBufferData(UV, false).WorldNormal;
}

The Hair shading model is designed for physically-based rendering of hair strands and typically bypasses certain screen-space effects like SSAO. This is because hair is rendered using a different pipeline (with deep transparency and strand-based lighting) that doesn’t write to the GBuffer in the same way as opaque materials. SSAO relies on depth and normal data from the GBuffer, which hair doesn’t contribute to in the same way, making SSAO unreliable or visually incorrect for hair.

However, you can try to calculate a “fake” normal as described in this case: [Content removed]

Hopefully that helps. Let me know if you have any further questions.

Best,

Sam

Thanks Sam!

No problem. I will close this for now, but if you encounter any other issues, please open a new case.

Best regards,

Sam