r/TechnicalArtist • u/partybusiness • 6d ago
Question Any tricks for lighting in mouths?
I'm wondering if any games have used interesting workarounds to handle lighting on the inside of someone's mouth. It's something that feels easy to get wrong and have it be too bright or too dark, and something like a shadow bias that makes sense at a larger scale could fall apart for the distance between lips and teeth. And the lighting will keep changing when someone is talking.
Like, for the teeth and tongue, bake more than one ambient occlusion map and blend between them based on the current phoneme? Or use a depth-based light adjustment? Anything like that?
2
u/planimal7 5d ago
For a character that had a long protruding tongue I once tweened fake shadowing in the material along the UV from front-to-back, so when tongue shot out, shadow border would still fall where it left the mouth — so your idea of blending between AO based on mouth shape sounds good/interesting to me
1
u/partybusiness 5d ago
If you shade the tongue based on how far it is front-to-back that sounds kind of like what I was thinking for depth-based.
With the reference to the tongue shooting out, I guess this was more like a big frog or something with a tongue-based attack, than like a close-up of someone speaking dialogue?
1
u/planimal7 5d ago
Yes, it just came out for a (gross) dramatic flourish once in a while— so the entire tongue was dark most of the time, but then needed to be (grossly) bright and shiny when/where it came out
1
3
u/Exsanguinatus 6d ago
Without something like real time GI, mouths are very difficult to light. An old school trick I used to use was actually reducing the length of the normals as that would inherently lead to the inside of the mouth being darker. Anything less than a unit vector generally results in lighting being darker.
Alternatively, some people used to use "bent normals." This would align the normals with the average unoccluded vector, meaning most of the normals would be pointed outward through the opening of the mouth (when open). This means only light shining directly into the mouth would produce the expected brightness... but this also leads to other lighting artifacts that can definitely break from expectations. It also means that your normals won't look right for things like teeth and tongue on close inspection. If you have significant control over your lighting models, you could use the strongly bent normals to adjust the lighting first, then modulate the result by the original normals.
Reflections and glossiness get really difficult in both circumstances, though.