• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

lighting issues when using DayNightModels

Status
Not open for further replies.
Level 3
Joined
Dec 31, 2003
Messages
42
So I decided to try out the DayNightModels("", "") thing and it's really cool when it works properly but I get some odd bugs...


This is called at map init and appears to work:
Code:
    call SetDayNightModels("", "")
    call FogEnable(false)
    call FogMaskEnable(false)

And this line is called for heroes to add line of sight. The model is simply an omnilight with a stand animation
Code:
    call SetEffect(m, "light", AddSpecialEffectTarget("Ambience\\Light-White10.mdx", u, "origin"))

It causes some problems:
-Torches no longer give off light
-Selecting different units causes the omnilight sfx to turn alternate between on and off on different units​

When commented away everything works fine. Are there any known problems with SetDayNightModels? Or is my lighting model corrupt somehow? I've tried another one though, and it caused the same problem. Anyway, I'm uploading it and screenshots of the second issue... Thanks in advance for any help

Edit: It appears to be because there are too many lighting models in the same area... Could this be true? I spawned roughly 20 heroes in the same area and then it got buggy. When it's down to 4 it works just fine
 

Attachments

  • WC3ScrnShot_012115_035257_01 copy.jpg
    WC3ScrnShot_012115_035257_01 copy.jpg
    190.5 KB · Views: 192
  • WC3ScrnShot_012115_035259_02 copy.jpg
    WC3ScrnShot_012115_035259_02 copy.jpg
    217.1 KB · Views: 159
  • Light-White10test.mdx
    1.3 KB · Views: 55
Last edited:
Level 25
Joined
Jul 10, 2006
Messages
3,315
I had similar issues in my recent zombie map. In my case, the problem was the light model I was using (a modern lamp post model).

I just tested my map again by spawning ~200 lights (this model: http://www.hiveworkshop.com/forums/models-530/glowing-light-65911/) spaced in a grid with cell size 384x384, and there are no problems.

Try a different model and see if that fixed your problem.
 
Level 3
Joined
Dec 31, 2003
Messages
42
Ah! So it appears that the ambient light has a limit. The model you linked apparently solves the issue because it uses the Intensity field instead of Ambient Intensity for the omnilight. It gives me bigger problems though, the units themselves are not lit and there are cutoffs to the lighting (see screenie) ... I've been trying to tamper with the values but it seems I cannot fix it.

Is it better to try and tamper with the day/night models themselves maybe?
 

Attachments

  • WC3ScrnShot_012615_103507_01 copy.jpg
    WC3ScrnShot_012615_103507_01 copy.jpg
    235.5 KB · Views: 144
This is because you attach the light to the origin (usually below the feet) of the unit. If you want to fix this, you can use the "Overhead" attachment point instead. Unfortunately, this will basicly cause the same issue, just in reverse (head is properly lit, but the feet will mostly be dark; but you can still give it a try, maybe it looks good for the units you have!).

The ideal solution would be to attach the light source to where it's actually coming from. So if you unit carries a torch, attach the light source to the hand of the unit.

A simple magos edit of the models in question will also allow you to customize the light source attachment points.

For example, when using the Sylvanas Windrunner model, most of her head and body will not get lit if you attach it to the overhead. This is because she ducks down in most of her animations. To fix it, I created a new attachment point inherited from the head bone and moved it a little bit forward, so that it always floats in front of her head. Perfect point for light attachments, as the face and front of the unit are always properly lit.
 
Status
Not open for further replies.
Top