Jump to content
The Dark Mod Forums

Simulating atmospheric perspective


Springheel

Recommended Posts

Looks like it creates a foglight, attaches it to the player, gives it a light value and an opaque distance of 250. If it basically works, you'll want to bump up the opaque distance.

 

I'm not sure what would make it work differently than a regular foglight; unless the "fogs/blendlight" shader does something.

 

How do I bind a custom light to the player?

Link to comment
Share on other sites

Hmm, I tried that script xcen, but I didn't really notice it doing anything.

Link to comment
Share on other sites

Ok, it's definitely doing something now...gigantic shadows are being cast as I move around. But I don't see anything that looks clearly like fog. What exactly is is supposed to do?

 

edit: didn't notice the "replace" comment, will test that...

 

edit: ok, that seems to be working, thanks.

Link to comment
Share on other sites

Well...it's close, but has problems. First, since it's an additive blend, it makes everything lighter, which looks a bit artificial (click image to see animated comparison). Secondly, there is noticable banding as you run around--that might be solvable by smoothing out the light texture, but it already looks pretty smooth to me. Meh, I think I'm going to give up on this for now...it's already taken me all day.

post-9-0-16301000-1390784955_thumb.gif

Link to comment
Share on other sites

At these small distances the effect should be really small. Also, notice that light plays a role in the formation of this "fog", after all we only see the sky as blue during the day. At night the atmosphere becomes much more transparent.

Link to comment
Share on other sites

At these small distances the effect should be really small.

 

With regular fog you can make the effect quite subtle. It just looks like the night is a bit hazy, with is ideal. But it has that caulk problem. Using a blendlight might work okay for really thick fog, but it's not so good for the subtle kind. Although with a blend filter you could create a neat effect where things in the distance look pitch black, and the ambient world light only lights up an area in the player's immediate vicinity. That could be useful for horror maps or where you want things to look very dark artistically, without the player being unable to see anything close up.

Link to comment
Share on other sites

Regarding the problem you were having with fogged caulk-brushes, maybe you could just apply the portalSky material to them instead because the portalSky material itself is also map-sealing.

 

That would require rebuilding parts of the map, unforunately. Caulk brushes have a huge benefit--they seal the map, but you can still see func_statics through them. So you can put a caulk brush right through the middle of a func_static building, and the entire building will still be visible regardless of what leaf you're in. If you use a portalsky brush, then the building would always look like it's cut in half.

 

What is it about portalsky that allows it to ignore fog, that caulk lacks?

 

And one of those is the way the top edge of the building contrast against the sky, I dont beleive TDS does that.

 

Yes, that's because it's an additive blend. All it can do is make things lighter, so it looks bad against a dark sky.

Link to comment
Share on other sites

Or vice-versa, could/should PortalSky gain the secret ability Caulk has to reveal func_statics from other leafs? (And where might that tidbit of info be best conveyed to mappers, I don't recall where I stumbled upon it in the past, but wasn't via mainstream sources.)

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Link to comment
Share on other sites

(And where might that tidbit of info be best conveyed to mappers, I don't recall where I stumbled upon it in the past, but wasn't via mainstream sources.)

 

Good question. Maybe in a section on visportals in the wiki?

Link to comment
Share on other sites

I sort of got it working in a test-map by essentially just putting a very thin and simple func_static textured with skyPortal with an offset over the areas where the caulk showed white spots.

 

Since func_statics are not cut / overwritten by caulk they are drawing over the "caulked-away" parts of the sky.

Not exactly sure if this might cause z-fighting though if those "sky sheets" are too thin.

 

Seems hacky but yeah.

Link to comment
Share on other sites

Can you explain that more rebb? If the portalsky func_static is in front of the caulk brush, how do the func_statics further behind show through?

Link to comment
Share on other sites

Can you explain that more rebb? If the portalsky func_static is in front of the caulk brush, how do the func_statics further behind show through?

 

If you have func_statics that physically intersect the sky then that could potentially be a problem with this approach.

 

Small example-map ( it's very artsy ) in the attachments. It has 2 sides of map with the same setup, but one side uses func_static over the skybox.

 

It's just a fast example, this can probably be done much cleaner, possibly by turning the sky behind the func_static skybrushes into caulk.

sky_fog_caulk.map.txt

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

    • 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.
      · 5 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
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...