Jump to content
The Dark Mod Forums

Fogs vs Glare vs Bloom


nbohr1more

Recommended Posts

I was looking at the latest Phobos mod screens today and noticed the use of a blue fog to simulate atmosphere haze in a very deep shaft. I was admiring some of the scenes for the pure artistry that was used to shape the scenes so that non-overlapping lights look natural.

 

devblog12_01.png

 

After wandering the web awhile I went back to searching for Doom 3 lighting topics and re-read Katsbits "Outdoor lighting article" and was struck by another concept that previously went under my radar:

 

 

 

 

'Ambient' lighting without using an ambient light

 

In addition to what's been discussed above you can go one step further and increase the 'ambient' light, without using the ambient light shader, by adding a fog light. This is simply a light entity that has a 'texture' applied to it called fogs/basicfog (applied from the light properties editor). It's pretty thick by default so just add the following key/value pairing to the entity;

 

  • key = shaderParm3
  • value = 25000 (distance to opaque - larger numbers = thinner fog)

What this does is add a light fog to a map that has the visual effect of making everything a little more diffuse and softer, it doesn't actually add any more light to the scene but it's a useful tool to have in the mappers arsenal as it helps to create even more of an 'ambient' feel when Doom 3 lights are limited to a single texture/material being applied to it (unless you write a custom multistage material) - you can't for instance, apply fog to an parallel light, doing so simply turns the light into a default fog volume.

 

 

 

 

So what they are advising is to use a very very thin fog to achieve a similar light softening that the Bloom mods or Post Processing achieve.

 

I wasn't sure about this advice but went back to admiring another Phobos screen where a commenter said:

 

"Nice Bloom"

 

To which the Phobos developer retorted

 

"We don't use Bloom"

 

devblog08_01.png

 

Then another thought clicked... I recalled somebody puzzling over why Lunaran used a Fog volume for the ceiling light in Strombine.

 

It all makes sense now. Fogs can blur the edges of where light is hitting and make it appear to scatter in a similar trick as Bloom or even radiosity.

 

Glares on light sources also have some of this spreading effect.

 

So...

 

I know that overall fogs seem to have a performance detriment...

 

Does having lots of small localized fog volumes have significant performance impact?

 

How does this compare to the enabling Post Processing shader?

 

 

The Phobos team seems to have mastered the artistic use of fogs, I wonder how their maps perform...

 

:unsure:

Edited by nbohr1more

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I can see it working, mainly you are adding a white coat to everything. So instead of seeing pitch black all the pixels are actually lightened a bit. Don't know if it would bring out much texture detail or not like an actual ambient light would. But it should definitely bring out shapes some.

 

I have used a dark black fog to darken corners and low spots before.

 

-edit-

 

Don't know, did a quick test in a map without an ambient light.

 

made it cover the whole map, fog basic and fog delta 1 were both tried. 25000, 35000, 100000 and nothing seemed to change density.

 

tried both, not sure if it was a typo.

shaderParm3

shaderParam3

----------

it's too thick and the skyportal doesn't shade the same, so that looks bad.

Also with no ambient light i get some serious banding anywhere there is pitch black.

 

So I wouldn't consider it a replacement for an ambient light, thus no gain for using this instead.

 

However in lit areas it definitely adds a bit more 'grime', just makes the textures less clear and sharp. But again, this fog was so thick it didn't look good, too obvious, the only way to look good is to not be noticeable.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Definitely caveats are in play here...

 

I always thought blendLight makes better looking fog but that is kinda like saying lakes get you wetter than swimming pools. They both control the same volume, texture and, opacity values... fogs just use a "distance to player" value.

 

The real mind-warp is to consider the effect of a falloff image on a fog.

 

 

For fog lights, this is the image used to produce fog according to height (not distance) inside the fog volume.

 

 

So it can be thicker by height and thicker by distance to player...

 

Katsbits is applying their fog over a large parallel light so their parameters might not be kosher for smaller light sources. So the gains there are still questionable from a performance perspective.

 

The artistic options are definitely interesting though...

 

Those Phobos guys must've beat their heads against rocks trying to make their maps look good and, missing an ARB shader guru, came up with this creative use for fogs. :laugh:

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

Interesting. Could someone create some before/after shots for selected scenes in a TDM mission? This may have potential if used correctly.

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

  • 1 year later...
Interesting. Could someone create some before/after shots for selected scenes in a TDM mission? This may have potential if used correctly.

After playing a TDS campaign "Thief rising" and running around inside the city, the thing I enjoyed about the lights was the fog effect and I thought there has gotta be a free perf or almost free perf way of doing this in tdm. A single fog light or even bunch of seperates one thats cover only parts of the map like a jigsaw all have the same effect, the DC goes up, bah!

 

Q: how do you bind a light to the player..? ive tried "bind" "idplayer" and "bind" "iinfo_player_start_1" and neither bind the light to the player...

Link to comment
Share on other sites

Try "bind" "player1".

didn't work either, but found this link -

 

- http://www.doom3worl...opic.php?t=7750

 

The scrip suggested in the link works! now can someone tell me how i specify the coulour and intensity of said fog light - do I do it in the material file..?

 

.MTR

fogs/myfog
{
  noShadows
  blendLight
  {
  blend add
  map	 fogs/basicfog
  zeroclamp   // make sure it doesn't bleed over the edges
  }
}

 

.SCRIPT

// sets up the fog for this level
void setup_objects()
{
  entity foglight;
  $foglight = sys.spawn( "light" );
  $foglight.setShader( "fogs/myfog" );
 $foglight.setRadius( 12800 );

  $foglight.bindPosition( $player1 );
  $foglight.setOrigin( '0 0 0' );
}
// function that executes when script is loaded
void main ()
{
  setup_objects ();
  sys.print( "Fog created!\n" );
}

Link to comment
Share on other sites

try adding shaderParm3 = 5000 to the material

 

or

 

$foglight.setShaderParm (3, 5000)

 

 

Depending on the effect and orientation, you may also want to try adding a lightFalloffImage to the material too...

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 1 year later...
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...