This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: [QUESTION] m2 Light Rendering Distance?  (Read 1063 times)

Milly

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 503
    • View Profile
[QUESTION] m2 Light Rendering Distance?
« on: August 29, 2014, 09:09:01 pm »
I'm currently working on a mod that adds lighting effects to objects that normally don't have them (but should) such as the generaltorch01.m2. Things are looking great but something rather disappointing happens. The light settings don't render until you get within a certain distance to the object, and graphics settings have no effect.

I was wondering if there are any ways to adjust this? I know TrinityCore can control the render distance of creatures and game-objects, but what about lights? And if it can't, then is it controlled in the m2 file itself? My instinct would tell me that it's probably hard-coded into the game but I'm just looking for confirmation. Living on a prayer so to speak lol

Edit: Interestingly enough, the light rendering distance is much greater for gameobjects, but not map objects.

Edit 2: In addition, it seems like certain map objects in certain places render from much further away, but as a general rule of thumb, they usually disappear at a very short distance. Why would some be different?


Below is an aerial view of torches at Refuge Pointe. All of the lights on the left are map objects. The light furthest to the right and directly in the middle is a spawned gameobject. These seem to render light from further away, which is particularly odd because actual gameobject render distance is much shorter than map object render distance.




If I fly closer to the ground, two new torches light up. These two are map objects, so why weren't they lit up before?




If I fly just a tad closer, the one on the right disappears, and a new one in the middle lights up.

« Last Edit: August 29, 2014, 10:02:11 pm by Admin »

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: [QUESTION] m2 Light Rendering Distance?
« Reply #1 on: August 29, 2014, 10:02:00 pm »
You might need to extend the bounding box in the m2 header to be large enough to cover all of your light. Not sure if that really changes from where begins drawing. Try just making it way bigger than the light, maybe?
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Milly

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 503
    • View Profile
Re: [QUESTION] m2 Light Rendering Distance?
« Reply #2 on: August 29, 2014, 11:27:43 pm »
That Bounding Box thing didn't seem to work. Though I now noticed that Blizzard is doing something different in the screenshots that I posted. All the torches on the left are lit up with or without the patch. Even though they're the same exact model. Makes me suspect that they have a seperate light model under it, but I can't find it through fileinfo.exe
« Last Edit: January 01, 1970, 01:00:00 am by Admin »