• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Lighting terrain edges

Status
Not open for further replies.
Level 7
Joined
Jul 4, 2007
Messages
249
light.jpg
Does anyone know why this happens and how to fix it?
 
Does anyone know why this happens
Because the legacy graphic pipelines that existed before programmable shaders became mainstream only supported drawing meshes with 8 light sources at a time. In order to support more than 8 light sources one would have to perform multiple draw calls and blend the results which was prohibitively slow.

The terrain mesh is drawn in 4x4 tile chunks. Warcraft III tries to select lights for each draw call based on proximity. Hence one can get lighting discontinuities along the borders of 4x4 chunks if too many light sources are nearby.
how to fix it?
Use less light sources. The day/night lights count as part of the 8 light limit. Avoid excessive use of lights with a huge illumination range. Keep light sources spread out.

The light selection algorithm does work base on proximity but is imperfect so might select inappropriate lights for some draw calls.
Does this happen to you guys too?
Yes because it is defined by the legacy graphics APIs that Warcraft III was made with back in the early 2000s.
Maybe it's my graphic card or something?
Unless your graphic card is from the early 2000s and somehow still works over 15 years later then this is not the problem. Even the cheapest integrated graphics from Intel do not have this limit thanks to programmable shaders. Modern game engines like StarCraft II seem to have no limit to how many light sources can be displayed at once, and some light sources will even cast dynamic shadows.
 
Because the legacy graphic pipelines that existed before programmable shaders became mainstream only supported drawing meshes with 8 light sources at a time. In order to support more than 8 light sources one would have to perform multiple draw calls and blend the results which was prohibitively slow.

The terrain mesh is drawn in 4x4 tile chunks. Warcraft III tries to select lights for each draw call based on proximity. Hence one can get lighting discontinuities along the borders of 4x4 chunks if too many light sources are nearby.

Use less light sources. The day/night lights count as part of the 8 light limit. Avoid excessive use of lights with a huge illumination range. Keep light sources spread out.

The light selection algorithm does work base on proximity but is imperfect so might select inappropriate lights for some draw calls.

Yes because it is defined by the legacy graphics APIs that Warcraft III was made with back in the early 2000s.

Unless your graphic card is from the early 2000s and somehow still works over 15 years later then this is not the problem. Even the cheapest integrated graphics from Intel do not have this limit thanks to programmable shaders. Modern game engines like StarCraft II seem to have no limit to how many light sources can be displayed at once, and some light sources will even cast dynamic shadows.
Wow thanks, this is a really good explanation :D
 
Status
Not open for further replies.
Back
Top