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

Dawn and Dusk Effect via fog.

Status
Not open for further replies.
Level 8
Joined
Feb 20, 2007
Messages
338
I have three triggers: a set up (map initialization) and Dawn and Dusk.

Daytime fog is set at 90% 90% 90% - it gives a very diffuse light gray atmospheric fog. The game Camera is at a distance of 3000 So the Z start and end needs to be a bit wider/larger than with the default camera.

At dusk the fog slowly grows darker, I am attempting to get it to shift into the blue spectrum - giving that 'twilight time' feeling - before shifting to black (night time). I am somewhat satisfied with the dusk coloring.

Dawn I want to shift upward to the light gray, through the red/orange spectrum giving that ruddy 'new day' type glow. I am not satisfied with color of the mid-dawn fog.

Game constants are set:

Time - Dawn 5.50
Time - Dusk 19.50
Time - Real seconds per game day 1200.00

Questions:
1. Currently the dawn color looks too red, how to I set orange by percents?

I understand the concept of 0 to 255 for Red Green blue, and I know that the color orange I want is around 250 red, 185 green and 45 blue around/at mid dawn (it should grow lighter and shift to gray past mid dawn, and shift up from black to orange at early dawn) I do not know how to translate that into percentages and how to work the trigger (below) in order to get a shift through the dawning color change to be (temporarily) this color.

2. Whilst I looked in things that leak, it didn't seem to have a section covering fog - does the use of this much fog leak?

3. Any other errors or suggestions on making these triggers cleaner is appreciated.


  • Sun Fog Set up
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set XX_Red = 90.00
      • Set XX_Green = 90.00
      • Set XX_Blue = 90.00
      • Set XX_Z_End = 9000.00
      • Set XX_Z_Start = 800.00
      • Environment - Set fog to style Linear, z-start XX_Z_Start, z-end XX_Z_End, density 0.50 and color (XX_Red%, XX_Green%, XX_Blue%)
  • Dawn
    • Events
      • Game - The in-game time of day becomes Equal to 5.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Sunrise
      • For each (Integer A) from 1 to 250, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Z_Start Greater than 800.00
            • Then - Actions
              • Set XX_Z_Start = (XX_Z_Start - 40.00)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Z_End Less than 9000.00
            • Then - Actions
              • Set XX_Z_End = (XX_Z_End + 40.00)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Red Less than 90.00
            • Then - Actions
              • Set XX_Red = (XX_Red + 1.00)
            • Else - Actions
              • Set XX_Red = 90.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Green Less than 90.00
            • Then - Actions
              • Set XX_Green = (XX_Green + 0.75)
            • Else - Actions
              • Set XX_Green = 90.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Blue Less than 90.00
            • Then - Actions
              • Set XX_Blue = (XX_Blue + 0.50)
            • Else - Actions
              • Set XX_Blue = 90.00
          • Wait 0.50 seconds
          • Environment - Set fog to style Linear, z-start XX_Z_Start, z-end XX_Z_End, density 0.50 and color (XX_Red%, XX_Green%, XX_Blue%)
      • Game - Display to (All players) the text: Daytime
  • Dusk
    • Events
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Sunset
      • For each (Integer A) from 1 to 250, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Z_Start Less than 1500.00
            • Then - Actions
              • Set XX_Z_Start = (XX_Z_Start + 40.00)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Z_End Greater than 5000.00
            • Then - Actions
              • Set XX_Z_End = (XX_Z_End - 40.00)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Red Greater than 2.00
            • Then - Actions
              • Set XX_Red = (XX_Red - 0.50)
            • Else - Actions
              • Set XX_Red = 1.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Green Greater than 2.00
            • Then - Actions
              • Set XX_Green = (XX_Green - 0.50)
            • Else - Actions
              • Set XX_Green = 1.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • XX_Blue Greater than 2.00
            • Then - Actions
              • Set XX_Blue = (XX_Blue - 1.00)
            • Else - Actions
              • Set XX_Blue = 1.00
          • Environment - Set fog to style Linear, z-start XX_Z_Start, z-end XX_Z_End, density 0.50 and color (XX_Red%, XX_Green%, XX_Blue%)
          • Wait 0.50 seconds
      • Game - Display to (All players) the text: Night time
 
Status
Not open for further replies.
Top