Modcraft - The community dedicated to quality WoW modding!
Content creation => Modelling and Animation => Topic started by: iindigo on November 10, 2015, 03:54:46 am
-
So I’ve been going through Azeroth and adding lights to the various lamps, torches, etc scattered throughout (3.3.5) with LightAdder. This works great, but as some of you here are aware, M2s with lights added by LightAdder have a bug: their bounding boxes don’t match up to the sphere of light that the light(s) you added cast, meaning that all of the light the model is casting just disappears when the model isn’t in the player’s field of vision. This creates a distracting, unpleasant effect where lighting kinda pops in and out of existence as you walk along.
To fix this, as suggested, I tried grabbing 010 editor and editing my custom M2 files with a template. I’m able to modify the M2 fine and it saves alright, but after logging into the game I see no difference, even after changing values to extremes (100+).
So now I’m wondering if I’ve done something wrong. Am I editing the appropriate values? What is the range of numbers that I should be editing within — what units do these numbers represent? Is there a known mapping between M2 light distance values and M2 bounding box values?
Below is a screenshot of the values in question.
(http://cl.ly/image/3s2S3m2J1s15/Screen%20Shot%202015-11-09%20at%206.51.45%20PM.png)
-
There is supposedly a client limit of a certain amout of lights per field of view. I think I have an idea. Try to scale the bounding box bigger, so that it definitely covers the range of spreading light. The issue might be very possibly related to bounding boxes.
-
The box you have to edit is "vertex box" which is bounding, "bounding box" is for collision. I updated the naming to be consistent with Blizzard some weeks ago on the wiki.
-
Also the problem seems to be fixed in WoD as the light is no longer depending on surrounding geometry vertices.
-
You changed float boxes not bouding boxes those are actualy in anim block
-
Take the values from vertex float boxes (max, min and radius.. 7 in total), and then go to the stand animation, and copy them into that animation's bounding boxes. That should do the trick.
It's a common bug that you get used to fixing with Obj2M2.exe. Garthog never got around to adding the fix.
---------------
For example - Fixing a dagger that has the same problem;
(http://i.imgur.com/a6gI1a8.png)
You take these, and put them here:
(http://i.imgur.com/LmXdMde.png)
So then it looks like:
(http://i.imgur.com/7vIXhyJ.png)
-
The box you have to edit is "vertex box" which is bounding, "bounding box" is for collision. I updated the naming to be consistent with Blizzard some weeks ago on the wiki.
This worked beautifully. Thanks!
Take the values from vertex float boxes (max, min and radius.. 7 in total), and then go to the stand animation, and copy them into that animation's bounding boxes. That should do the trick.
It's a common bug that you get used to fixing with Obj2M2.exe. Garthog never got around to adding the fix.
---------------
For example - Fixing a dagger that has the same problem;
(http://i.imgur.com/a6gI1a8.png)
You take these, and put them here:
(http://i.imgur.com/LmXdMde.png)
So then it looks like:
(http://i.imgur.com/7vIXhyJ.png)
Interesting. I haven’t used Obj2M2 at all, and have only been adding lights to M2s that already existed in WotLK (with exception to some down ported SW street lamps from Cata).
These changes didn’t seem necessary after editing the VertexBox entries under the theFloats struct, as pointed out by schlumpf. I don’t doubt that this would also fix the bug, I’m just curious as to when either method is necessary. Should both be set?
Also, has anybody worked out a way to dynamically calculate a proper vertex bounding box given an intensity? I’d really like to roll this into a new build of LightAdder if possible to reduce manual work.
And how do attenuationStart/End work? They sound like they’d control the “gradient” the light uses as it fades with distance but playing around with it, I don’t really see any difference in-game.