How to: Create Day and Night Models with Omnilight

Tutorial By NullCurrent

Day and Night Models with Omnilight

Introduction:
What is this tutorial?

This tutorial teaches you to use and create "DayandNight" Models and "Omnilight".

What are "DayandNight" models?
"DayandNight" models are what make the lighting in Warcraft look like day and night.

What are "Omnilights"?
Omnilight is the spread of light in Warcraft, an example is the "glowing" torch.

Tools Required:

Magos War3 Model Editor
• Warcraft III World Editor


Creating Day and Night Models:

• Open the War3 Model Editor I will call it just "Model Editor" from now on.
• Go to "Windows".
• Click "MPQ Browser"
• Open one of the Day and Night models. In "Enviroment/DNC/..."
[SPOILER](Image)[/SPOILER]
• When you have opened one of the models, go to "Windows" and click "Node Manager".
• You will see a screen like this:
[SPOILER](Image)[/SPOILER]

Color: The color of the light.
Intensity: The amount or "brightness" of the light.
Ambient Color: The color that surrounds the doodads in-game.
Ambient Intencity: The amount or "brightness" of the ambient light.
Attenuation Start: The point where the light begins to loose intensity.
Attenuation End: The point where light ends.

• Edit these fields to your liking. Here, I will make one that looks like night vision.
• This is what I set my light node as:
[SPOILER](Image)[/SPOILER]
• And this is what it looks like, in-game:
[SPOILER](Image)[/SPOILER]
• Ta-Da! You made a "DayandNight" model! Now, how do you use it?
NOTE: When you use Ambient Color and Intensity, doodads that are "unrevealed" show as that color It makes it look strange..

Such as:
[SPOILER](Image)[/SPOILER]


Using Day and Night Models:

• Open the World Editor
• Import the DayandNight model.
• Rename it If you want by double clicking and checking "use custom path"
• Save map and close the World Editor.
• Reopen the map.
• Go to the trigger editor.
• Create a new trigger Or add on from an older trigger.
• Add a new "Action".
• Select "Custom Script" in the drop-down menu.
• Type in: call SetDayNightModels("...","...")
• Where the ...'s are, type the name of your dayandnight model. Keep the quotations.
• If you want to only make one person see the light...
• Add in this code:Custom script: if GetLocalPlayer() == PLAYER then Custom script: call SetDayNightModels("...","...") Custom script: endif
• For PLAYER use the jass code for the certain player, such as:
Custom script: if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
• This will get the owning player of the triggering unit.



Creating Omnilights:

• Open the model editor.
• Browse the MPQ Browser for the model you want to create an omnilight on.
Or you can create a torch or something from my other tutorial How To: Model Weapon Attachments with Particle Emitters Just make a stick with a fire looking particle emitter at the top. Then add omnilight.
• Once you have your model that you want to add the omnilight to, go to the Node Manager.
• Right-click the window and click "Create Light".
• Right-click the Light node and select "Edit Node".
• A screen like this will pop up:
[SPOILER](Image)[/SPOILER]
• The Pivot Points, X, Y, and Z, are where the omnilight comes from. So you want this to be where the lantern or whatever is making the light is.
• I do not recommend changing any of the checks.
• Next, double click the node.
• Change all of the variables to what you want. But, I will show you a basic "torch" like light:
[SPOILER](Image)[/SPOILER]
• This is what it looks like, in-game:
[SPOILER](Image)[/SPOILER]
• Done!


Neat Idea:
If you want a really dark cave or something, do this:

• Add this code:
Custom script: call SetDayNightModels("","")
• Put nothing in the quotations.
• Then add some omnilights to make it look like this:
[SPOILER](Image)[/SPOILER]

That's it!
If you need help, please don't hesitate to ask.
Check out my other tutorials!
How To: Model Weapon Attachments with Particle Emitters & Voting With Dialog Boxes
If this helped you and you enjoyed it, tell me.
Constructive Criticism Appreciated!


Click here to comment on this tutorial.
 
 
Blizzard Entertainment, Inc.
Silkroad Online Forums
Team Griffonrawl Trains Muay Thai and MMA fighters in Ohio.
Apex Steel Pipe - Buys and sells Steel Pipe.