Hello, I would like some recommendations for an issue that we have seen with the hair shading model in certain lighting conditions. We are using Unreal 5.7.2 with Hardware Raytracing and Megalights.
What we have observed is that characters which are in an interior environment which has some skylighting influence from nearby windows are seeing much brighter than expected bounce lighting compared to the rest of the character and immediate surroundings.
We find the uniform method (r.HairStrands.SkyLighting.IntegrationType 1) and using additional samples ( r.HairStrands.SkyLighting.SampleCount 8 ) to reduce the noise, works for most cases. In my example video there are a few scenarios which I’ll describe, however the 2nd case is the most problematic:
Outdoors the hair and character look consistent. Toggling on/off the skylight light component visibility appears to affect the character and hair consistently.
Indoors and adjacent to bounce lighting the hair appears too bright. Toggling on/off the skylight light component visibility appears to affect the hair significantly more than the character.
Indoors in a fully interior lit scene the hair and the character look consistent. Toggling on/off the skylight light component visibility appears to affect the hair slightly but this is mitigated by the nearby light sources.
Given these differences have been challenging to maintain a consistent look. It becomes especially problematic if the character is moving through an interior environment and some areas appear to make the hair glow.
This does appear to be coming from the skylighting pass as r.HairStrands.SkyLighting 0 removes this, but this makes the hair model appear broken and very dark. Several other commands do not appear to have any effect. Are there any recommendations to help lower the intensity of the indirect lighting contribution with this shading model?
I just took a look at the video, and the bright contributions are due to hair strands sampling the Lumen radiance probes for sky lighting. These probes are prone to leaking when they are placed near a surface, which is why you are seeing overly bright hair in indoor scenarios. Unfortunately, we do not have a proper solution in place right now, but it’s on our to-do list. We advise people to use the sky lighting feature only in open spaces. Do you absolutely need the sky lighting for your hair lighting setup? We do not have an alternative solution at the moment, but I can look into it further if you need it. Let me know what you think.
I was out of the office last week, and as it so happens, my colleague who works on hair is now out until the end of this week. Does this issue urgently block you at the moment? I can likely get you another update by early next week. I am sorry for the inconvenience.
I got word from our team that, unfortunately, there is no good solution to work around this skylighting issue at the moment. The fact that we are sampling the irradiance from the sky directly out of the surface cache means that some light will leak when you are inside a building. We do have this issue on our to-do list, and we eventually want to get it fixed, but I cannot give you an estimate for when that will happen right now. I know that is a less-than-satisfactory answer, but I unfortunately don’t have more to offer you. If you have any follow-ups to this issue, please let me know.
Hi Tim, I would definitely recommend a deeper look at some options to mitigate this issue.
We have several cases where our environments are a mix of indoor and outdoor scenarios, and we might not be able to restrict the character to outdoor scenarios alone. In the second half of the video I also show the difference in value when toggling on and off the skylighting feature. In those scenarios have a drastic effect on the appearance and it seems as though all indirect lighting is lost on the hair.
A look at the lighting view shows effectively a pure black output, and we only get direct lighting only. Perhaps this is a bug that might not be specific to the skylighting feature as I don’t see how disabling this will look correct in any scenario. I’ve attached an additional screenshots in the lighting only viewmode to show the difference between r.HairStrands.SkyLighting 0/1
Ideally we would be able to get some type of control to adjust the intensity of this output and bring it roughly inline with the values seen on the characters skin. I’m open to any suggestions on how we can achieve this without using the skylighting feature.
I would not consider this an urgent blocker, so it can be reviewed next week. If we’re able to get a proper solution in the following weeks we can return to some of the impacted scenarios and validate the fix there.