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

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...