fogMode Question

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
vanblam
Posts: 243
Joined: Sun Nov 09, 2014 12:15 am

fogMode Question

Post by vanblam »

does anyone know any different settings for:
fogMode = "dense", ..?

I tried "sparse" lol .. But that no workie :P
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: fogMode Question

Post by Dr.Disaster »

try "light" "spooky" "thick" "nocansee" ... ;)
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: fogMode Question

Post by minmay »

The possible fogModes are "dense", "linear", "linear_lit", and "exp".

linear_lit is the default. The fog fades linearly until 129.8 meters from the camera, at which point it vanishes. This is used to keep the fog from affecting the skybox (recall that skies usually have a farClip of 130).
linear is like linear_lit but without the 129.8 meter cutoff.
dense is algorithmically different from linear but tends to look visually similar to linear in practice.
exp is used when the party is underwater. I believe the opacity of the fog at a point is exp(distance*fogDensity), where distance is the distance from the camera in meters and fogDensity is the fogDensity field of the WaterSurfaceComponent. It is unlikely that you want to use it on SkyComponent or FogParamsComponent since it ignores fogRange.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
vanblam
Posts: 243
Joined: Sun Nov 09, 2014 12:15 am

Re: fogMode Question

Post by vanblam »

Awesome, thanks bud for the detailed description. On top of it like usual :D
Post Reply