Jump to content
The Dark Mod Forums

[2.10] Volumetric Lights


duzenko
 Share

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

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.

 Share


  • Recent Status Updates

    • snatcher

      TDM Modpack v2.6 released!
      · 0 replies
    • peter_spy

      Perhaps an unpopular opinion: TDM team might benefit from someone with actual QA experience; someone with naturally and professionally developed curiosity, who is interested in how and why things work, how they break At least to me it's kind of mind-boggling how untested some rather important features are (first the absence alert feature for items, now the rope +body carry behavior).
      · 4 replies
    • nbohr1more

      The Dark Mod is hosting an Ask Me Anything thread on the PC Gaming reddit forum:  https://www.reddit.com/r/pcgaming/comments/10nfcwj/hello_we_are_the_international_development_team/
      Feel free to join the discussion there
      · 2 replies
    • stgatilov

      Bumped into an interesting piece of wisdom called Hyrum's Law:
      With a sufficient number of users of an API, it does not matter what you promise in the contract: all observable behaviors of your system will be depended on by somebody.
      · 5 replies
    • The Black Arrow

      I love playing The Dark Mod when it's cold in my place. Bonus points when it's a bit (or even very) dark and it's raining, too.
      · 2 replies
×
×
  • Create New...