Jump to content
The Dark Mod Forums

Visportals and fog


DeTeEff

Recommended Posts

Hello!

I'm working on a fog heavy map and have encountered a problem regarding visportals. If I look straight into the visportal and back away, as the fog gets thicker the portal closes as the fog engulfs it, ie the fog gets so dense that the engine deems it to thick to be seen through. This sounds like a good thing, but the thing is, even if the fog is so dense, some stuff will still be visible through the portal, like light cones and hazy effects. But the engine lets the fog thickness take precedense and closes the portal anyway and this abrupt closure of the portal makes a jarring cut between a dark area and pop up of haze and stuff. I have tried func_portal on the visportal to try to override the standard range but it doesn't work.

 

Any idea folks?

  • Like 2
Link to comment
Share on other sites

No, that only affects the skybox so it doesn't get fogged. The portal still closes as I move backwards...

If there was a way to force the portals to stay open, then I could close areas the player has left with switches and func_portal-entities.

Link to comment
Share on other sites

Hmm, the only other thing I can think of is creating an invisible entity within the region you want lights (etc) to be seen and using def_attach to connect it to the affected lights and emitters so the portal calculation thinks the entity is closer to you?

@Dragofer @duzenko  perhaps we need a new noFogBoundary flag option?

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

One way to make stuff to been seen through caulk/portals is to combine them with other func_statics. Like combining a rock-func_static on the ground in one visleaf with a huge tower in the background (within another visleaf) and if you can see the rock, the engine will render the tower as well. But that is func_statics. Is the method you're suggesting something along these lines?

 

Link to comment
Share on other sites

23 minutes ago, DeTeEff said:

One way to make stuff to been seen through caulk/portals is to combine them with other func_statics. Like combining a rock-func_static on the ground in one visleaf with a huge tower in the background (within another visleaf) and if you can see the rock, the engine will render the tower as well. But that is func_statics. Is the method you're suggesting something along these lines?

 

Yes, that is the proposal. I believe this technique should work for other entity types too. Only brushes would be immune to this method AFAIK.

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

Okay. I have created some caulk boxes, one in each leaf, turned them into one func_static and tried to def_attach that to the light or vice versa but I get an error; "Couldn't spawn '' to attach to entity 'func_static_621'" Should I use "name_attach" instead? It doesn't show any icon in the entity inspector so it doesn't seem to work.

 

 

Link to comment
Share on other sites

10 hours ago, nbohr1more said:

Yeah, name_attach sounds like the way to go.

If it doesn't work, please attach a test map so we can evaluate :)

I'm sorry I'm not getting it. This def/name_attach is nothing I'm good at. I only use it to attach some random pouch to some guard and thats stuff that is defined and tweaked to fit the belt for example. The light in my misison that misbehaves is a spotlight in the sky. I don't get how I could attach this to some func_static?

I could just use the old method of patches and tubeformed moon rays, but that would defeat the purpose of these volumetrick cones.

Link to comment
Share on other sites

For the record, it seems that ordinary omnidirectional lights (with volumetric 1) doesn't get shut off by a fogclosing visportal...bf(2023-03-3013-02-13)(3582.442837_8963.5).thumb.jpg.e53b7808b5b80de0bb0eb3c9bc1024a8.jpg

So perhaps I can get around this "bug" by replacing the projected light to a omnidirectional one...

  • Like 1
Link to comment
Share on other sites

Thank you for the details and test map!

I will try to get testing done tonight but I see that our engine still has support for the "noportalfog" global material keyword.

There may already be a noportalfog light material in our repo that we can test ( converted from Doom 3 ).

Too bad it's not an entity spawnarg but I think I can add that too.

 

  • Like 1

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 confirmed that the noPortalFog material flag fixes this behavior:

Modified delta1_fog material def:

// legacy fog material
fogs/delta1_fog
{
    fogLight
    noShadows
    noPortalFog // prevents fog distance from closing portals
    {
        map        _fog
        alpha    0.5
        colored
    }
}

I'll look into added an entity flag because that's way more convenient than using override materials.

  • Like 1
  • Thanks 1

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

Lovely :) I can see stgatilov rushing to this, hammering away with his magic 😍

How will this be implemented? A switch/spawnarg on the foglight itself that prohibit the fog from closing portals, or will it be possible to put it on a func_portal to prevent just that visportal to close. The fogclosing is nice in itself and absolutely not a useless feature. It's only bad when the portal closes and make things inside popping in and out of view.

Edited by DeTeEff
  • Like 1
Link to comment
Share on other sites

Just add the spawnargs “noPortslFog” “1” to any foglight entity.

I can only build Linux binaries so perhaps @AluminumHaste can get you a Windows build if you want to check it out before the next dev build release.

  • Like 1

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

2 hours ago, DeTeEff said:

Lovely :) I can see stgatilov rushing to this, hammering away with his magic 😍

How will this be implemented? A switch/spawnarg on the foglight itself that prohibit the fog from closing portals, or will it be possible to put it on a func_portal to prevent just that visportal to close. The fogclosing is nice in itself and absolutely not a useless feature. It's only bad when the portal closes and make things inside popping in and out of view.

https://drive.google.com/file/d/1BgDrQSpSvcv4E6ENQ_l4dGlGqIBhIgV6/view?usp=sharing

  • Like 1

I always assumed I'd taste like boot leather.

 

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

    • 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
    • The Black Arrow

      Hope everyone has the blessing of undying motivation for "The Dark Mod 15th Anniversary Contest". Can't wait to see the many magnificent missions you all may have planned. Good luck, with an Ace!
      · 0 replies
×
×
  • Create New...