Jump to content
The Dark Mod Forums

[2.10] Volumetric Lights


duzenko

Recommended Posts

@stgatilov Something to consider. I added a cvar (r_volumetricDustMod) that adjusts the amount of dust. This falls into that mapper vs player preference territory, though. So, it may require some discussion with mappers to see if it would be a good addition. I think players would want to adjust this in the settings menu. I'm not sure on the name, though. Maybe there's something better.

I find that I usually like the look of r_volumetricDustMod 0.5 (50% dust/intensity), since in my opinion, it gives a more natural, subtle glow and what lies beyond the volumetric lighting is less washed out. It looks nice in motion, too. And, I like the look of Hazard Pay better with that setting. The range 0.5 to 0.7 tends to work well.

However, I can see how r_volumetricDustMod 1.0 (100% intended dust/intensity) could look better and more flashy for screenshots.

There's no best value, so it's nice to be able to adjust it.

Also, this may be useful for mappers to try out different values or even with testing.

I thought I'd share since it improved the experience for me.

(Please see attached patch.)

r10163-dust-mod.diff

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

17 hours ago, Daft Mugi said:

I've found that while playing Hazard Pay with r10159 the distant pyramid structures in the background are missing their shadows compared to r9853. (See screenshot.)
When r_volumetricEnable 0 with r10159, the shadows are present.

Fixed this issue.

7 hours ago, Daft Mugi said:

@stgatilov Something to consider. I added a cvar (r_volumetricDustMod) that adjusts the amount of dust.

I added r_volumetricDustMultiplier in slightly different way.

Quote

This falls into that mapper vs player preference territory, though. So, it may require some discussion with mappers to see if it would be a good addition. I think players would want to adjust this in the settings menu. I'm not sure on the name, though. Maybe there's something better.

Adding cvar is not a big problem, but adding it to the menu would require many people to request that.

I admit factor = 0.5 on Hazard Pay looks like what I expected volumetrics to be when I initially worked on them 😁

  • Like 2
Link to comment
Share on other sites

On 11/18/2022 at 11:27 PM, stgatilov said:

I fixed color banding issue and bumped default number of samples.

That does sound a bit concerning, given even in latest dev (after recent optimizations) volume lights are still a big performance hit. Is 8 samples not enough for good results?

Since I didn't get around to it and don't know what the best FM would be, could someone show a proper comparison between "r_volumetricLowres 1" and "r_volumetricLowres 2" please? I'm even curious if defaulting to 2 could be an option to reduce more of the load if it looks well enough.

Edited by MirceaKitsune
Link to comment
Share on other sites

6 hours ago, MirceaKitsune said:

That does sound a bit concerning, given even in latest dev (after recent optimizations) volume lights are still a big performance hit. Is 8 samples not enough for good results

Is it okay to place them sparse, like one in a room (camp fire) or near a light leak (whole in the wall)? My understanding is that they never were intended to be placed multiple times in the same location. How's performance that way - or how did you test them?

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

7 hours ago, SeriousToni said:

Is it okay to place them sparse, like one in a room (camp fire) or near a light leak (whole in the wall)? My understanding is that they never were intended to be placed multiple times in the same location. How's performance that way - or how did you test them?

I'm playing a FM in which I think I found a room with intersecting volumes. One is a light you can toggle: I noticed that when you turn that lamp on, the volume from the window behind it appears to disappear or dim in intensity... I realize this may be due to a small number of samples thus I may be wrong on 8 being a good maximum. If anyone thinks it's relevant I may go back and take some screenshots since I haven't finished it and am still on that FM.

Link to comment
Share on other sites

Hm I just wanted to be sure if we're talking about actual performance or performance in general. Because I think if the volumetric lights are placed sparsely it should be fine. I personally prefer a better looking volumetric light than a crappy looking one. (that's why I deleted volumetric lights from my mission)

"Einen giftigen Trank aus Kräutern und Wurzeln für die närrischen Städter wollen wir brauen." - Text aus einem verlassenen Heidenlager

Link to comment
Share on other sites

@stgatilov I found that volumetric lighting passes through walls and illuminates the light gem when using stencil shadows. This doesn't happen with shadow maps.

To reproduce, play "Iris" and go to 6817 -568 -637.66. The volumetric lighting from the fireplace in the room above that location causes the light gem to illuminate.

Summarized:

light gem - dark

r9853  stencil
r9853  maps
r10183 stencil (r_volumetricEnable 0)
r10183 maps

-------------------------------------

light gem - illuminated

r10183 stencil (r_volumetricEnable 1)

 

iris-vol-light-and-light-gem.webp

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

On 11/27/2022 at 8:49 PM, Daft Mugi said:

@stgatilov I found that volumetric lighting passes through walls and illuminates the light gem when using stencil shadows. This doesn't happen with shadow maps.

To reproduce, play "Iris" and go to 6817 -568 -637.66. The volumetric lighting from the fireplace in the room above that location causes the light gem to illuminate.

Yeah, my change caused the same light to use different shadows implementation in ordinary rendering and lightgem, which does not work. I think it is fixed now.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...
6 minutes ago, AluminumHaste said:

I'm on latest source code build

Wow cool, the statement was true for the 2.10 release and I was not able to create the effect for large lights - have not tried it with newer beta versions or dev builds.

Good to know that it's more flexible now.

Link to comment
Share on other sites

Large volumetrics are not blocked off, so you can indeed use them with careful tweaking.

The problems with large light I can think of:

  1. [shadows only] It requires shadow maps, but large lights are forced to stencil shadows. Even if you stay under this limit, shadow map resolution can simply be too low for accurate handling of occluders near player.
  2. As you recall, volumetric light works due to dust in the air slightly spreading light all around. However, this dust also slightly occludes the light (like fog does). TDM's volumetric code ignores this effect, since it is negligible for small but bright lights.

UPDATE: That said, large noshadows volumetrics are probably stable (even if they don't exhibit fogging). But shadowing ones seem risky...

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

I am considering to replace the fake moon beams in Sir Talbots Collateral with volumetric lights.

But I need information on some issues:

  • Do you they work well enough now? Are there issues with stencil shadows? I remember early posts mentioning that.
  • What performance/quality options are there? I use a weak notebook a lot, and want to keep the mission running on it.
  • Can I turn of volumetric rendering without disabling lights?
  • Any other things I need to be aware of?
Link to comment
Share on other sites

33 minutes ago, Baal said:

Do you they work well enough now? Are there issues with stencil shadows? I remember early posts mentioning that.

They don't work with stencil shadows. If a player has stencil shadows enabled, the volumetric lights have forced shadow maps enabled, while other lights have still stencil shadows. So it will just work.

I think it will have a performance hit (also because the mentioned forced shadow maps I assume), but the mission overal is not very demanding?

Afaik volumetric lights is enabled with a spawnarg. So via a trigger/script this setting can be changed? Not sure.

  • Thanks 1
Link to comment
Share on other sites

If you disable VL by spawnarg, I believe they act like normal lights. Pretty sure you could use lod_bias args so that moonray patches show at low and lowest detail settings while VL would render at normal to highest.

https://wiki.thedarkmod.com/index.php?title=LOD_Bias

Still, VL performance hit is pretty low in 2.11 and newer.

  • Like 4

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

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

    • 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
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...