Light sources are attached to mesh bounds centers instead of mesh origins when AttachLight NiNode is missing
Background: In Morrowind, many but not all light meshes have a NiNode named AttachLight
. In meshes without an AttachLight
, the object origin is often set far from the center of the mesh's visible geometry.
Problem: When there is no AttachLight
, Morrowind.exe and OpenMW have different fallback behaviors. From what I can tell by experimentation, Morrowind.exe seems to attach the light source to the mesh's origin, but OpenMW appears to attach the light source to the bounds center of the mesh's visible geometry. The difference is especially dramatic with the game's many tall candle holder meshes, such as meshes\l\light_com_lamp_01.nif
, which do not have AttachLight
nodes. OpenMW places the light source for that mesh far lower than Morrowind.exe or TESCS.
Attached screenshots, all taken in the cell "Pelagiad, North Wall":
-
TESCS, with the Light_Com_Lamp_01 rotated 180 degrees about its origin and light radius markers enabled. The origin is halfway between the tip of the candlestick and the orphaned flame particle (left behind because TESCS doesn't update flame particles until light markers are toggled off and on)
-
OpenMW 0.48, with Zesterer's shaders, with settings adjusted to emphasize point light glow (screenshot provided by Zesterer)
-
OpenMW 0.47 with an edited light mesh that contains an AttachLight NiNode at the mesh origin (the edited mesh is also attached to this issue)
In principle, this is obviously something that could be mitigated exclusively by content mods, such as Morrowind Optimization Patch. But I am unsure whether there is a good reason for OpenMW to behave differently from Morrowind.exe in this scenario. And there are thousands of references to meshes like this one and to retextured/renamed derivatives of them, throughout the base game and in many, many popular content mods. MOP alone can't cover all of those cases.