• 🏆 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!

[Trigger] light effect

Status
Not open for further replies.

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
is there a way to modify ingame light effect,
in some game there is a google nightvision effect wich give a greenish look at everything...

how is this done?
i would like to give a blueish frost like light, for cold weather.

and a more bright yellow for hot weather.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You can use either fade filters, or fog style to achieve this effect.
A few years ago, I've uploaded a map on the hive that uses a fog style to differentiate between night/day (it's a couple years old, so not the most efficient way to do it, but it works).
Edit: I just opened the map, and saw that I used a player group for "All Players" and then removed it. It is recommended that you do not do that.
 
Pro-hint:
Use a custom DNC model. Simply export one of the default DNC models and remove all the animation frames except the first. Then set the color and lighting for this frame the way you want it and import it.

You can now use SetDayNightModels("path", "path") to switch the DNC.

If you use GUI, replace one of the existing DNC models by adjusting the import path (check the MPQ files for the path, for example by using MPQViewer).


DNC models are better than fadefilters or fogs, because they change the whole light environment of the map without affecting the visibility at all (fadefilters and fogs will always reduce the contrast of the view).
 

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
thanks for so many answers...

deathismyfriend
it is ok to hijiack my thread, i was interested in the answer you look for too...

Zwiebelchen
the DNC look interesting...but i have no clue about what you are talking about.
if you had a small tutorial or map demo to show what it looks like and how it is done...
 
Zwiebelchen
the DNC look interesting...but i have no clue about what you are talking about.
if you had a small tutorial or map demo to show what it looks like and how it is done...
The DNC model is what you can select at map options menu as "light environment". For example, when using the felwood light environment, all units get illuminated in a green tone. Also, the DNC model is what makes the different day and night lighting.
Imagine a giant source of light shining down on the map. If it wasn't there, all you'd see is a black screen where only models with its own light source will be visible.

Try this JASS-line in your map:
call SetDayNightModels("", "") and be amazed what it does (Place a torchlight somewhere before)!

If you now import your own DNC model for this, you can have a "true" night vision goggles light environment instead of just some lame fog or filter effect.

Another thing that is pretty cool about that:
You can use a different model for both ambient and unit lighting. If you use a blueish light model for the environment and a red light model for the units, you can create some kind of infrared-vision aswell.
 

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
does this use up some memory?

a big map with 12 players and many trees (destructible) , many items on floor and many units... would using this system increase lag?

i understand a little from what you say but i am not sure:
so basically setting the DNC will alter the map lightning...
felwood light environment is a type of DNC...
is it possible to fully customize the DNC lightning and is it easy to do it?
and changing the DNC would alter both day and night? or is it possible to alter them separately?
does model has to be special model to use the DNC, or any doodad, unit, destructible allready is set to interact with DNC?

also not about DNC, but is the global fog able to be set to be transparent and not affect vision but still give so color modification to environment?
 
does this use up some memory?

a big map with 12 players and many trees (destructible) , many items on floor and many units... would using this system increase lag?
It's not a system. It's just a model, so it doesn't affect anything else than visuals. You can even change the model for selected players only by using if GetLocalPlayer() == Player(0) then

i understand a little from what you say but i am not sure:
so basically setting the DNC will alter the map lightning...
felwood light environment is a type of DNC...
Both correct.
is it possible to fully customize the DNC lightning and is it easy to do it?
It requires certain tools like MDLVIS or WC3ModelEditor, as you'd need to edit a model file and import it to your map.
and changing the DNC would alter both day and night? or is it possible to alter them separately?
The DNC model is basicly just a giant light source attached to the camera which has a 60 second animation. Those 60 seconds are adapted to the game speed and translated into a specific time of day. Over those 60 seconds, the light environment (this means the intensity of the light emitted, the color, etc.) changes multiple times.
With WC3ModelEditor or MDLVIS, you can freely edit the color and intensity for any frame that is defined in the model according to your tastes. By looking at the color values, you will easily find what is the frame for "morning (having more blue colors)", "evening (having more red colors)", night (all colors pretty dark), etc..

does model has to be special model to use the DNC, or any doodad, unit, destructible allready is set to interact with DNC?
Nope, all units and the entire terrain is affected. But you can set a different DNC for terrain and units.

also not about DNC, but is the global fog able to be set to be transparent and not affect vision but still give so color modification to environment?
Nope. Because it's fog. Fog always reduces vision. If it wouldn't, it wouldn't be fog, right? ;)
 

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
i will try to find a tutorial about DNC

thanks for all your answers Zwiebelchen
 
Status
Not open for further replies.
Top