[General] Setting Terain Fog to Specific Region

Status
Not open for further replies.
Level 5
Joined
Jan 19, 2018
Messages
126
Hello Hive,
Quick question... Is there a way to set terrain fog to a specific region instead of the entire map? I don't see the option in the trigger editor. Its only a generic set fog for the map. Also what about lighting, is that also possible for specific regions?
  • Enviornment Initialization
    • Events
    • Conditions
    • Actions
      • -------- Create Fog Efffects --------
      • Environment - Set fog to style Linear, z-start 1000.00, z-end 8000.00, density 10.00 and color (100.00%, 100.00%, 100.00%)
Thanks as always!
 
Level 11
Joined
Nov 23, 2013
Messages
665
In triggers editor, you can use visibility modifiers in order to play around with black mask, fog or visibility :cwink:

Edit: Oh, you mean environment fog, not fog of war? Well you can edit a region to add fog, however I don't know if you will be able to modify its settings (density, colour...). You can do it with triggers too, with the action Environment - Create weather effect
 
Last edited:
Level 5
Joined
Jan 19, 2018
Messages
126
In triggers editor, you can use visibility modifiers in order to play around with black mask, fog or visibility :cwink:

Edit: Oh, you mean environment fog, not fog of war? Well you can edit a region to add fog, however I don't know if you will be able to modify its settings (density, colour...). You can do it with triggers too, with the action Environment - Create weather effect
Hello and thank you for responding to my thread!
I meant the terrain fog present in the map options not the environment fog (like dungeon fog). So you were right the first time lol!
But I'm not seeing how the visibility modifiers will help me achieve the look I want.
Thanks!
 
Level 11
Joined
Nov 23, 2013
Messages
665
Ok, I wasn't sure lol
You can create a visibility modifier to enable/disable fog in specific areas.
  • Create Visibility Modifiers
    • Actions
      • Set temp_loc = (Center of SomeRegion)
      • Visibility - Create an initially Enabled visibility modifier for <SomePlayer> emitting Fog of war from temp_loc to a radius of 1500.00
      • Custom script: call RemoveLocation(udg_temp_loc)
  • Create Visibility Modifiers
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for <SomePlayer> emitting Fog of war across SomeRegion
In addition, you can allocate your visibility modifier to a variable (Set VisibilityModifier = (Last created visibility modifier)) if you need to access to it later.
 
Level 5
Joined
Jan 19, 2018
Messages
126
But my map already has fog of war emitted by default from map options. I need that because I noticed that if it is black mask,
the creep camps don't appear on the map, even if I set the the visibility to fog of war ingame.
So what you're saying terrain fog is directly related to fog of war?
 
Level 11
Joined
Nov 23, 2013
Messages
665
If I understood what you said, I'd say terrain fog is not related to fog of war, it's just a feature for aesthetics purposes. AFAIK, it's for the entire map, so there is no way I'm aware of to set it for a specific region. Someone might correct me here if I'm wrong.
To display creep camps, you need to check "Masked areas are partially visible", it's not related to terrain fog.
Sorry if I didn't get what you were asking. I thought you wanted to put fog of war in some regions. What are you trying to achieve, exactly?
 
Level 5
Joined
Jan 19, 2018
Messages
126
I want different terrain fog colors in my map. My map has certain areas where there is a blizzard and I want a white terrain fog
to make the blizzard area more aesthetically pleasing. Also there are a few instance dungeons on the map that I need different color
fog for. 1 of the instances has an outland theme to it so I want red terrain fog, and one has a forgotten one theme to it which I wanted a
nice dark violet fog. Since you say there is no way to alter it I may just remove the terrain fog completely since 1 color will not look good in
some areas.
 
Level 11
Joined
Nov 23, 2013
Messages
665
Is it a single player map? If so, maybe you can try to change terrain fog (with the trigger you mentioned above, in your first message) depending on where the camera is pointing to. Something like this:
  • Terrain Fog
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Target X of current camera view) Greater than or equal to (Min X of RegionOutland <gen>)
              • (Target X of current camera view) Less than or equal to (Max X of RegionOutland <gen>)
              • (Target Y of current camera view) Greater than or equal to (Min Y of RegionOutland <gen>)
              • (Target Y of current camera view) Less than or equal to (Max Y of RegionOutland <gen>)
        • Then - Actions
          • Environment - Set fog to style Linear, z-start 1000.00, z-end 5000.00, density 0.00 and color (100.00%, 0.00%, 0.00%)
        • Else - Actions
          • Environment - Set fog to style Linear, z-start 1000.00, z-end 5000.00, density 0.00 and color (100.00%, 100.00%, 100.00%)
It's not perfect, and it will cause sudden terrain fog changes when moving camera from a region to another, but it seems to work.

Also, if you're not already doing it, you might want to consider using weather effects (mist, snow, wind...) in your regions when needed, instead of terrain fog. It won't be the same, but it's still good to have. :csmile:

Sorry I couldn't be of more help!
 
Last edited:
Level 5
Joined
Jan 19, 2018
Messages
126
Lol I was just trying to figure out how to do that, I was looking for a current camera event not realizing I have to do current camera condition. Thanks!
But my map is a 6 player map so I need it only working for the local player.
I have the udg_GetLocalPlayer, is there a way to grab the owner of the current camera so I can have
the condition:
CurrentCameraOwner equal to GetLocalPlayer

  • Camera in Blizzard
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Target X of current camera view) Greater than or equal to (Min X of Blizzard Wind Region <gen>)
          • (Target X of current camera view) Less than or equal to (Max X of Blizzard Wind Region <gen>)
          • (Target Y of current camera view) Greater than or equal to (Min Y of Blizzard Wind Region <gen>)
          • (Target Y of current camera view) Less than or equal to (Max Y of Blizzard Wind Region <gen>)
        • Then - Actions
          • Environment - Set fog to style Linear, z-start 0.00, z-end 8000.00, density 1.00 and color (100.00%, 100.00%, 100.00%)
        • Else - Actions
          • Environment - Reset fog to default values
 
Level 11
Joined
Nov 23, 2013
Messages
665
I don't know how to get the owner of current camera. There must be a way (don't know if it's possible with GUI?), but I'm not familiar enough with multiplayer maps, sorry.
However, the main problem is that fog will be changed for everyone. I don't know if it's possible to change terrain fog only for a specific player. :cconf:
 
Level 5
Joined
Jan 19, 2018
Messages
126
Well at any rate you helped to solve 90% of the problem and for that good sir, you have my humble thanks!
Perhaps someone else will know.
 
Level 5
Joined
Jan 19, 2018
Messages
126
Okay so I redid the whole camera trigger and made it into a system of triggers that works perfectly, except that I need it to target the local player.
Anyone know if this is possible?
Here is the new system:
  • Check Camera Location
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Trigger - Run Camera in Blizzard <gen> (checking conditions)
      • Trigger - Run Camera in Throne of Kiljaeden <gen> (checking conditions)
      • Trigger - Run Camera in Abyssal Maw <gen> (checking conditions)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Evaluate Camera in Blizzard <gen> conditions) Equal to False
          • (Evaluate Camera in Throne of Kiljaeden <gen> conditions) Equal to False
          • (Evaluate Camera in Abyssal Maw <gen> conditions) Equal to False
        • Then - Actions
          • Environment - Reset fog to default values
        • Else - Actions
  • Camera in Blizzard
    • Events
    • Conditions
      • (Target X of current camera view) Greater than or equal to (Min X of Blizzard Wind Region <gen>)
      • (Target X of current camera view) Less than or equal to (Max X of Blizzard Wind Region <gen>)
      • (Target Y of current camera view) Greater than or equal to (Min Y of Blizzard Wind Region <gen>)
      • (Target Y of current camera view) Less than or equal to (Max Y of Blizzard Wind Region <gen>)
    • Actions
      • Environment - Set fog to style Linear, z-start 0.00, z-end 8000.00, density 1.00 and color (100.00%, 100.00%, 100.00%)
  • Camera in Throne of Kiljaeden
    • Events
    • Conditions
      • (Target X of current camera view) Greater than or equal to (Min X of The Throne of Kiljaeden <gen>)
      • (Target X of current camera view) Less than or equal to (Max X of The Throne of Kiljaeden <gen>)
      • (Target Y of current camera view) Greater than or equal to (Min Y of The Throne of Kiljaeden <gen>)
      • (Target Y of current camera view) Less than or equal to (Max Y of The Throne of Kiljaeden <gen>)
    • Actions
      • Environment - Set fog to style Linear, z-start 0.00, z-end 8000.00, density 1.00 and color (55.00%, 0.00%, 0.00%)
  • Camera in Abyssal Maw
    • Events
    • Conditions
      • (Target X of current camera view) Greater than or equal to (Min X of The Abyssal Maw <gen>)
      • (Target X of current camera view) Less than or equal to (Max X of The Abyssal Maw <gen>)
      • (Target Y of current camera view) Greater than or equal to (Min Y of The Abyssal Maw <gen>)
      • (Target Y of current camera view) Less than or equal to (Max Y of The Abyssal Maw <gen>)
    • Actions
      • Environment - Set fog to style Linear, z-start 0.00, z-end 8000.00, density 1.00 and color (5.00%, 0.00%, 10.00%)
 
Status
Not open for further replies.
Top