Hi there,
the issue is: Backlighting of transparent HairCards, especially of Metahuman Beards as well as bright eyelashes as seen in the example image (screenshot from our project:)[Image Removed]This is how it looks like when lit slightly from the side (in case you’re wondering: the hair on the head itself is masked, not transparent):
[Image Removed]
I’m pretty sure this is caused by the spotlight values that we use - often over 1000 candelas. It’s not possible to adjust these values, those are set. Also, our Lights don’t cast shadows at the moment!
I need to find a way to avoid these lighting issues - the eyelashes shouldn’t light up, and the beard should also not cause these issues. I already tested the workaround that the spotlights are not affecting Translucent Lighting (which does works for this issue at night), but that’s really not a good fix…
Oh and the fix needs to work with Lumen and without Lumen.
Any ideas? Happy to try out different recommendations.
Thanks!
Hi there,
Can you clarify your material setup, particularly what shading model you are using in your material? Perhaps it would be best if you made a reproduction project for this so I’m sure I am replicating the same issue. There are various different hair materials that Metahuman uses for facial hair, so I’m not sure which one is getting used here.
Assuming we are talking about a default lit shading model (not hair shading model), with translucent blend mode and the lighting mode set to Surface ForwardShading (this is one of the default facial hair material setups Metahumans use). In this case, the cards will only receive shadows from directional lights. This is a limitation of this shading model setup. The default Metahuman materials that use this model have a flip calculation on the two sided normal to ensure that the normal always points away from the face (assuming card normals have been authored correctly), no matter what side of the card you are looking at. This helps with these kinds of lighting artifacts since the normal for diffuse lighting calculations is likely to be pointing away from the light when the character is backlit.
Could you create a reproduction project, or share the material asset you are using with us, so we can better debug this issue.
Regards,
Lance Chaney
Thanks for the quick reply.
What you wrote sounds a lot like what is happening.
I added a zipped project with just a metahuman and a spotlight. The level is called “HairTest”. I have two versions of the metahumans in the level, one with Shading Model Default Lit and one with Shading Model Hair.
In our project, we currently use the default lit shading model for beard, eyebrows and eyelashes.
At the moment, Lumen is optional, so it should be tested with Lumen Off and Lumen On (added a postprocessvolume). There’s still a Directional Light in the level, that can be set to invisible to make the issue more clear, but the issue already shows even when the Directional Light is visible.
Hope you have some ideas on how to fix this “light up in the dark” issue
Thanks for repro project
I think by far the easiest solution for you is going to be to switch most of your hair cards to use a dithered masked material, instead of a translucent one. This is what default Metahumans are mostly setup with in 5.6. See my attached project to see an example of this (open PBLNight level). This example is using a mostly default preset metahuman, but I have set the melanin low in the hair so it is more blond and catches light more. The hair setup is mostly using the MI_Hair_Cards material, which uses the Hair shading model and Masked blend mode. This combination give correct shadowing and subsurface scatter effects. If you set the blend mode to Translucent with the Hair shading model, then it can’t be shadowed from local lights, so you get that extreme glow effect you are seeing from the subsurface lighting shining through from the backside. The horseshoe mustache and eyebrows are using the MI_Facial_Hair material, which is using a translucent, default lit material. Since this is using a default lit shading model, and not hair, there are no subsurface effects on this material, so light cannot shine through from the back. You can get away with this on facial hair that doesn’t wrap around the face too much (since the face will usually be blocking any back lighting that should contribute subsurface), and doesn’t curl back on itself too much (if the front face of the card ends up facing backwards then it will glow if there is a light behind it). Again, this material doesn’t get shadowed from local lights, so care needs to be taken that the card front face normals never face backwards towards the face, otherwise they will glow when there is a local backlight. For the eyelashes, I would simple switch / override the eyelash material blend mode to be masked. This should fix the glowing issue on the eyelashes with almost zero visual fidelity loss. All of these recommendations assume you are using one of the temporal anti-aliasing methods (TAA or TSR), as without this, the dithering on the masked hair will become very apparent. If your are building for mobile and need MSAA, then you will want to remove the dithering from your material and enable alpha to coverage to get some anti-aliasing on the masked hair materials.[Image Removed]
You might also want to look at your exposure levels in your scenes since you are using such bright local lights. I assume you are trying to use more physically realistic lighting values, so I would adjust my exposure values to match this. See the following useful cheat sheet. Apologies for the Unity reference sheet, but it is one of the most useful references I have found:
[Image Removed] Adjusting your exposure will remove some of the extreme lighting contrast and help tone down any remaining glowing.
Hopefully this is a workable solution for your project. Let me know if you have any further questions.
Regards,
Lance Chaney
Thank you for this detailed answer Lance, I shall tinker with the described settings.
No further questions on this topic, this can be closed.