• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Night effects without touching fades?

Status
Not open for further replies.
Level 17
Joined
Dec 11, 2014
Messages
2,004
I'm creating a Cinematic in which takes place at night, and as we already know night affects the fade color (makes it more bluish). This is not like my BaB in which we can use the day game time and use fog to create a night-ish effect. The lighting and the tiles get bright in the day and the units get bright too, which is unnatural for a night.

Any ideas?
 
Level 7
Joined
Oct 19, 2015
Messages
286
I had the same problem, the only way I could find of fixing it was to place a unit with a custom model in front of the camera, the model was an white plane that used an unshaded material so it wasn't affected by global lighting. Then I would change the vertex colouring of this unit to control my fade filter.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Edit the day night environment lighting models. If you remove the light tints to white then the fades will not be blue. Additionally you might be able to darken the lights appropriately to better reflect a night time scene as the standard WC3 ones are extremely bright and aimed at clear vision for RTS play.

Remember that for lights to appear correctly in game the gamma must be around 2.2 (value 44 in registry). Otherwise they will suffer from non-linear brightness distortion when viewed on most displays. Additionally at that setting you can see how bright WC3 environment lights are.

There are 3 separate environment lights (two of which can be changed dynamically with triggers), each for different parts of the scene. It is possible to have units darker/brighter than the rest of the scene by modifying the appropriate model.

No tools are needed next to mdx->mdl and mdl->mdx as well as a MPQ extractor to get the base models. Modifying the lights in textual mdl should be easy enough as they are hardly complex models.
 
Tutorial

You can use this as a custom script:
JASS:
call SetDayNightModels("Environment\\DNC\\DNCAshenVale\\DNCAshenValeTerrain.mdx", "Environment\\DNC\\DNCFelwood\\DNCFelwoodUnit.mdx")
Open MPQ and find the paths. I have a list at home but unfortunately, I am at work. It's under environment in war3.mpq. This lighting can be changed via trigger as often as you like during the game. Note you can mix the light models for terrain and units.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Might be worth mentioning that you are limited to diffuse and ambient lights. WC3 seems to ignore specular either due to a lack of support at the time of development or due to other reasons.

Ambient light is basically light coming from everywhere and defines the minimum brightness of geometry in the scene. WC3 uses an ambient in the range of 0.1 to 0.3 of full brightness which means all geometry is clearly visible.

Diffuse light is directional lighting that is scattered in all directions on geometry. The brightness is based on the angle of incident of the light and the geometry normal. WC3 uses diffuse lights of 1.3 times full brightness which is very bright and will brighten some surfaces above their original brightness level (not sure of that, it might cap at their original brightness level as the lighting model is not HDR).
 
This post is to add extra information to others that might find it looking for answers. Here are the paths from several models I found.

  • Custom script: call SetDayNightModels("Environment\\DNC\\DNCDungeon\\DNCDungeonTerrain\\DNCDungeonTerrain.mdx" , "Environment\\DNC\\DNCFelwood\\DNCFelwoodUnit\\DNCFelwoodUnit.mdx")
  • Custom script: call SetDayNightModels("Environment\\DNC\\DNCAshenVale\\DNCAshenValeTerrain\\DNCAshenValeTerrain.mdl" , "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
  • Custom script: call SetDayNightModels("Environment\\DNC\\DNCUnderground\\DNCUndergroundTerrain\\DNCUndergroundTerrain.mdx", "Environment\\DNC\\DNCDungeon\\DNCDungeonUnit\\DNCDungeonUnit.mdx")
I believe the only models are:

  • Felwood
  • AshenVale
  • Dungeon
  • Underground
  • Lordaeron
  • Dalaran
  • (and possibly LordaeronSummer)
Each as a terrain and a unit version. They can be mixed and matched to create 36 unique light environments.
 
Last edited:
Level 17
Joined
Dec 11, 2014
Messages
2,004
This post is to add extra information to others that might find it looking for answers. Here are the paths from several models I found.

  • Custom script: call SetDayNightModels("Environment\\DNC\\DNCDungeon\\DNCDungeonTerrain\\DNCDungeonTerrain.mdx" , "Environment\\DNC\\DNCFelwood\\DNCFelwoodUnit\\DNCFelwoodUnit.mdx")
  • Custom script: call SetDayNightModels("Environment\\DNC\\DNCAshenVale\\DNCAshenValeTerrain\\DNCAshenValeTerrain.mdl" , "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
  • Custom script: call SetDayNightModels("Environment\\DNC\\DNCUnderground\\DNCUndergroundTerrain\\DNCUndergroundTerrain.mdx", "Environment\\DNC\\DNCDungeon\\DNCDungeonUnit\\DNCDungeonUnit.mdx")
I believe the only models are:

  • Felwood
  • AshenVale
  • Dungeon
  • Underground
  • Lordaeron
  • Dalaran
  • (and possibly LordaeronSummer)
Each as a terrain and a unit version. They can be mixed and matched to create 36 unique light environments.

You can find them all using an MPQ editor.

Thanks though. Thanks all. I'll try using a DNC model...
 
Status
Not open for further replies.
Top