UVController differences Morrowind/OpenMW

Everything about development and the OpenMW source code.
Post Reply
User avatar
Posts: 140
Joined: 27 Aug 2014, 15:37

UVController differences Morrowind/OpenMW

Post by Pherim » 04 Jun 2017, 18:49

Hello everyone!

I was trying to get my Kwama egg sacs to work in OpenMW and noticed some issues with the scrolling texture on them. I did not really understand how the NiUVController works when I made them so I just copied it from the vanilla mesh. However, when I made the pulsing animation I had to adjust the values because the animation was 8 seconds long, whereas the original scrolling animation was only 2 seconds long. Back then I solved it by setting "Frequency" to 0.25 and Stop Time to 8.0, leaving everything else as it was (I must have fiddled around with the NiUVData as well because some values are different, but I did not really know how they worked). This made Morrowind loop the 2 second animation 4 times in the 8 seconds.

In OpenMW however, the texture is only animated for the first 2 seconds and stands still for the rest of the time. I could solve this by adjusting the values in the NiUVData, making the animation last for 8 seconds as well. While it now worked great in OpenMW as well, I noticed a slight difference: In Morrowind, the animation would get slower towards the end of the cycle, stop for just one frame or so and accelerate again, whereas in OpenMW, the speed was constant. So I made a few more tests and it would seem that the "Forward" and "Backward" values in the NiUVData are responsible for this. It looks like OpenMW completely ignores them and just scrolls the texture with constant speed, whereas Morrowind needs specific values for this. However, I am not yet certain how they work exactly.

Then I noticed that if the values for "Forward" and "Backward" are 0, The UVs are scrolling in opposite directions in Morrowind and OpenMW. This may be related to this bug: https://bugs.openmw.org/issues/3203. However, I haven't been able to find values at which that is not the case. As it now works correctly for vanilla waterfall meshes and such in OpenMW, there must be a way to make it work, but I don't know how. Anyway,it would seem that OpenMW handles UV scrolling differently than Morrowind does, and I just wanted to point out my findings, which may be useful. I will conduct further tests with the "Forward"/"Backward" values and tell you if I find anything.

Also, does anyone have any idea what the "Phase" value in the NiUVController does? In NifSkope it says it "usually" is 0.0, but in most meshes it appears to be random large number. I was not able to find any information about that.

Post Reply

Who is online

Users browsing this forum: Stomy and 11 guests