Fake Rim Lighting

Requirements

Compatibility

Debugging

startquest CobbRimLightQuest

stopquest CobbRimLightQuest

Customization in TES5Edit

Rim lighting is the practice of lighting characters from behind, often to simulate the way light bounces around a scene. Fallout 4 uses rim lighting to shade character models more realistically. In Skyrim, it's possible to fake rim lighting by creating an EffectShader that applies a faint glow to a character model's edges. It's a subtle effect (and it sometimes gets drowned out by Skyrim's high-contrast lighting), but in many lighting conditions, it makes characters look quite a bit more realistic.This video demonstrates the effect: I turn rim lighting on and off throughout to illustrate the difference in a variety of lighting conditions. The effect is subtle, so you may want to watch it on YouTube at a larger size or in full-screen. There are also a few animated GIFs and PNGs (before then after) in the Images section.This effect doesn't use scripts, and shouldn't have any notable performance impact. It doesn't require ENB or any other add-ons. It's just a single ESP file that should work right out of the box.This mod uses spells to apply the rim lighting shader to characters, so you'll likely need a Brawl Bugs patch to prevent those from breaking brawls.This mod is incompatible with any other mods that rely on EffectShaders; character models typically can't have more than one EffectShader at a time. Known incompatibilities include:The bloodstain effects in Bloody Facials are implemented as EffectShaders and will not be compatible with Cobb Rim Lighting.Wet and Cold has a feature to let snow and ash build up on your character model; these effects are EffectShaders and will not be compatible with Cobb Rim Lighting. However, Wet and Cold's dripping water effect should be fully compatible.If you need to toggle the rim shader on and off, the following console commands will work. The shader is synched to a quest that starts automatically; it should only be visible on the player while that quest is running. After stopping the quest, it may take up to five minutes for the shader to disappear from NPCs.If you wish to modify the mod in the Creation Kit or xEdit, these are the values you need to be aware of:When the effect is at full intensity, it uses an alpha of 0.06. If you multiply this by 255, you get roughly 16, and that is the RGB added to a character's edges. When the effect is at low intensity, it uses an alpha of 0.04, which comes out to 10 RGB. The "transition" effect, used to fade from dim to bright, also has an alpha pulse amplitude; this needs to be the smaller intensity divided by the larger intensity (i.e. 0.04 / 0.06 = 2/3 = 0.66...).Do not change the fade times or alpha pulse frequency on the shaders.There is a global variable used to set the threshold at which the low-intensity shader kicks in; it defaults to 20. You can change this value by editing the ESP, or even change it for a specific playthrough using the debug console. However, because GetLightLevel isn't fully accurate (we're using it for visual purposes, when it's only as good as it needs to be for AI purposes), thresholds below 20 are likely to be very hit-or-miss. There are cases where an actor at the very edge of a light source may still have a low light level, and other cases where the same light level can correspond to very different visual brightnesses. The 20 threshold produced the best compromise in my experience.