Jump to content

Photo

Fog effects in Enhanced Editions


9 replies to this topic

#1 argent77

argent77
  • Modders
  • 819 posts
  • Gender:Male

Posted 25 April 2018 - 12:44 PM

I'd like to experiment a bit with fog effects in one of my mods. Apparently both FOGAREA.2DA and FOGPT.2DA can be used to influence fog behavior and appearance.

FOGAREA.2DA (SoD):

2DA V1.0
-1
          ALPHA   CONTRAST  OUTER_RED   OUTER_GREEN   OUTER_BLUE  INNER_RED   INNER_GREEN   INNER_BLUE  PRE_DISPERSE_SECONDS
1         0.75    120       211         211           211         211         211           211
2         0.10    100         0           0           205         224         255           255
3         0.10    100       238         232           170         238         232           170
4         0.10    100       238         232           170         238         232           170      
BD0120    0.25    100         0           0             0         255         255           240         60
BD1200    0.10     70         0           0           205         224         255           255         60
BD3000    0.25     80       210         180           140         210         180           140         60
BD4000    0.10     70       210         180           140         139          69            19         60
BD4400    0.49    110        35          15            15          65          45            45         60  
BD4500    0.49    110        35          15            15          65          45            45         60
BD4700    0.25     80        45          15            15          45          45            45         90
BD5100    0.20     50       176         224           230         175         238           238         60
BD6100    0.90    100       238         232           170         238         232           170         10

And FOGPT.2DA (SoD):

2DA V1.0
-1
    AMOUNT  DURATION  X     Y     U_VEC   V_VEC      
1   35      800       4473   583  -30.0    15.0  
2    5      400       3611  1637   -3.0     0.0 
3   70      400       2560  1920  -20.0   -15.0
4   15      400       1070   960   -1.0    -1.0

Does anyone have more detailed knowledge about what each parameter does mean? Are there more options to influence fog? (Avenger, CamDawg?)


Edited by argent77, 26 April 2018 - 03:45 AM.


#2 argent77

argent77
  • Modders
  • 819 posts
  • Gender:Male

Posted 26 April 2018 - 03:44 AM

Some bits from my own observations:

FOGAREA.2DA: Both ALPHA and CONTRAST appear to define visibility of generated fog. (OUTER/INNER)_(RED/GREEN/BLUE) can be used to define fog color (edges and inner area). RED and BLUE columns for both types are mixed up though. RED is actually BLUE and vice versa. PRE_DISPERSE_SECONDS is probably the delay before the stream of fog particles starts to disperse.

FOGPT.2DA: AMOUNT seems to be the amount of fog particles generated per time frame. DURATION defines the duration of the fog generator before it stops producing fog particles. X and Y can be used to define the location of the fog generator. I don't know if there is a way to define more than one fog generator per map. Adding multiple lines for the same area doesn't work. U_VEC and V_VEC define speed and direction of the fog particles, U for horizontal direction, V for vertical direction.

Both files support area-specific definitions by putting the respective area code in the first column.

Screenshot from ToB starting area (green fog with bluish edges, generated over one of the stone faces on the map):

Spoiler



#3 Gwendolyne

Gwendolyne
  • Members
  • 204 posts
  • Gender:Male
  • Location:France

Posted 26 April 2018 - 06:29 AM

Did you use solid colors?


CARPE DIEM...



In progress : Menace sur le Royaume de Diamant Éternel

#4 argent77

argent77
  • Modders
  • 819 posts
  • Gender:Male

Posted 26 April 2018 - 07:20 AM

Colors are defined by their RGB values (each component in the range of [0..255]). I don't remember exactly which RGB values I've used for the example screenshot above (for the solid area some light green with a bit of blue mixed in and a bluish/cyan color value for the fog edges).

Some additions: Fog is a weather effect, so it does work only correctly if the map is added to MASTAREA.2DA. The fog effect itself needs some space to develop properly, so the map should not be too small. I wanted to use it in a smaller dungeon map, where fog should simulate poisonous fumes emanating from a portal. But it's difficult to make it look right, since dispersion starts too late.
 



#5 Gwendolyne

Gwendolyne
  • Members
  • 204 posts
  • Gender:Male
  • Location:France

Posted 26 April 2018 - 07:25 AM

Interesting. I intended to add light fogs in forest and grove maps. Unfortunately it does not work with vanilla games and I am reluctant to provide two sets of maps, according to the game. :(


CARPE DIEM...



In progress : Menace sur le Royaume de Diamant Éternel

#6 Ardanis

Ardanis

    A very GAR character

  • Modders
  • 2601 posts
  • Gender:Male
  • Location:Saint-Petersburg, Russia

Posted 27 April 2018 - 06:39 AM

FOGAREA.2DA: Both ALPHA and CONTRAST appear to define visibility of generated fog. (OUTER/INNER)_(RED/GREEN/BLUE) can be used to define fog color (edges and inner area). RED and BLUE columns for both types are mixed up though. RED is actually BLUE and vice versa. PRE_DISPERSE_SECONDS is probably the delay before the stream of fog particles starts to disperse.

FOGPT.2DA: AMOUNT seems to be the amount of fog particles generated per time frame. DURATION defines the duration of the fog generator before it stops producing fog particles. X and Y can be used to define the location of the fog generator. I don't know if there is a way to define more than one fog generator per map. Adding multiple lines for the same area doesn't work. U_VEC and V_VEC define speed and direction of the fog particles, U for horizontal direction, V for vertical direction.

Both files support area-specific definitions by putting the respective area code in the first column.

 

You pretty much got it.

I don't remember if pre disperse was actually working, though.

 

Unfortunately it does not work with vanilla games and I am reluctant to provide two sets of maps, according to the game.  :(

 

I believe you need to set the fog flag/probability in the area.


Edited by Ardanis, 27 April 2018 - 06:41 AM.

Retired from modding.


#7 Avenger

Avenger
  • Modders
  • 3800 posts
  • Gender:Male
  • Location:Hungary

Posted 28 April 2018 - 12:55 AM

Interesting. I intended to add light fogs in forest and grove maps. Unfortunately it does not work with vanilla games and I am reluctant to provide two sets of maps, according to the game. :(

 

I don't understand this one. Yeah, fog won't work in vanilla games, but why would you need to provide two sets of maps because of fog? The fog feature, while it won't work in vanilla as it is an EE feature, doesn't break any vanilla area. 



#8 Gwendolyne

Gwendolyne
  • Members
  • 204 posts
  • Gender:Male
  • Location:France

Posted 28 April 2018 - 02:38 AM

because I am used to provide two sets of maps, depending on some features.But if you confirm that this kind of flag or offset does not break the classic game, well, it is good news. ;)


CARPE DIEM...



In progress : Menace sur le Royaume de Diamant Éternel

#9 Avenger

Avenger
  • Modders
  • 3800 posts
  • Gender:Male
  • Location:Hungary

Posted 28 April 2018 - 10:39 AM

Sure, the fog data is in a file the vanilla doesn't use. So no problem there.

The fog field was assigned to fog by vanilla, but unused. Also no problem.



#10 lynx

lynx
  • Modders
  • 3114 posts
  • Gender:Male
  • Location:Ljubljana, Slovenija

Posted 28 April 2018 - 11:11 AM

Argent updated the iesdp entry, so I've moved this to the archive.


GemRB - IE anywhere.
Mages needed! Looking for Planescape: Torment testers
Play android version IS NOT SUPPORTED ANYMORE: reported bugs will be ignored! Still looking for builders ...




Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users