Here’s the way to create the problem. Bring in a metahuman with hair.
Create a cube in front of the metahuman and assign it a new material. Set the material type to translucent and set translucency pass to “Before DOF”. I also changed the Lighting mode to “Surface Forwardshading” to get access to translucency with roughness and normal. However this issue will happen even on the default lighting mode for translucency.
Create a point light in your scene and place it at a glancing angle (not necessary but shows the issue more clearly).
Everything renders correctly except the hair. I thought it was an issue with the hair material maybe but if you go into the metahuman BP and assign a new default material, the issue persists.
The only way to make it render correctly is by setting the translucency pass to “After DOF” (which is default) but now the glass or any translucent material doesn’t render correctly when it goes out of focus.
So I am essentially stuck, if I set to before dof to get right DOF, the hair shows up on top, if I set to after dof, the lighting is correct but the DOF is wrong for the glass.
I need to make a helmet glass for the metahuman so the hair renders behind the helmet glass and also works correctly with DOF.
r.hairstrands.composeaftertranslucency havnt helped me (tho I’m on 5.0)
but after some console investigation of commands with r.hairstrands.~ I found the:
r.HairStrands.DOFDepth = “1”
which worked like a charm and my metahuman now has reasonable hair render
Tried this right now and it instantly solved the issue!! Thanks for this!
Now I can get the hair to render behind the translucent surface and can set the translucency to “Before DOF” to get correct dof as well.
I would mark this as Resolved but I don’t think I can right? Since this is under the discussion category and not under question category?