Jump to content
The Dark Mod Forums

Fresnel Mod 2.09


nbohr1more
 Share

Recommended Posts

8 hours ago, peter_spy said:

I'm for specular behaving like typical specular and being relatively inexpensive, instead of faking specularity with cubemaps because... reasons?

So not a fan of HL2 specular eh?

https://developer.valvesoftware.com/wiki/$envmap

This is what @J.C.Denton was probably aiming towards which is not too out of the ballpark for a 2010 design.

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

This is not a specular hotspot, this is a cubemap reflection. I don't like mixing those up. I like how this is done automatically in PBR setups, where one gradually turns into another with respective roughness values. In non-pbr workflow, I prefer to control both separately. Besides, they don't even react to light in the same way.

Edited by peter_spy
Link to comment
Share on other sites

I went back to the old GLSL thread and tested my modifications in the ambient_light test map for further calibration.

I then tried to run this map in 1.07 but apparently it's assets are too new.

I then installed 2.05 for comparison. While goofing around I compared Caduceus of St Alban between 2.05 and 1.07 and noted that the fresnel effect is stronger in 1.07 and the faked reflections in the gold statues is gone as well as other reflective ambient behaviors. Either that part of the ambient shader was removed between 1.07 and 2.05 or the darker env/gen cubemap in standalone has made the effect less prominent. Since my goal was to get the 2.05 ARB look back, it is not too urgent to add this cubemap back but it might be a nice stretch goal to have a true 1.07 legacy mode. On comparing Caduceus between 1.07 and my shader, I would humbly accept victory so anything further is just a bonus.

  • 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

  • 7 months later...

I am uploading this here for safe keeping:

interaction.ambient.fs.glsl

I have mostly ported the entirety of the fresnel shader design from our own standard lights to the ambient light.

The specular response is significantly improved. Metals look like metal under ambient lighting again!

This was created using the SVN build so it will probably only work for Dev builds. I will evaluate how difficult it will be to back-port to 2.09 ( probably not too much work ).

To test it out, either unzip the tdm_base01.pk4 and overwrite the same file under /glprogs/stages/interaction or create a /glprogs/stages/interaction/ folder in your darkmod directory and save this file there. ( basically use any valid Doom 3 shader mod install process ).

  • Like 2

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

tdm_base01.pk4

Here is a package ported to 2.09.

I reconciled the fresnel and SSAO by having the fresnel effect set to "min" between the darkest fresnel pixel

and the darkest SSAO pixel. While I am sure there are cases where fresnel is brighter than AO in a realistic simulation,

TDM has so many textures and assets with baked AO or shadows do letting SSAO "win" the darkest pixels

seems to better match the art style better.

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

  • 3 weeks later...

I tried to incorporate the old sky color \ ground color paradigm from the 1.03 shader but it seems that the code support

for "world up" direction may have been dropped?

Oh well, here is a new version. Color matched and specular tuned to even further have the same specular response as regular lights so everything is now uniform. Also, I trimmed off at least 4 operations including a sample so this should be more optimized.

tdm_base01.pk4

  • 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

New screens:

 

Spoiler

 

newjob_2021-11-16_00.38.11.jpg

newjob_2021-11-16_00.40.07.jpg

 

newjob_2021-11-16_00.40.24.jpg

newjob_2021-11-16_00.44.08.jpg

newjob_2021-11-16_00.49.08.jpg

 

 

Here is a direct comparison:

Default ambient:

newjob_2021-11-16_00.47.12.jpg

 

Fresnel Mod:

newjob_2021-11-16_00.46.54.jpg

You can see that the new specular behavior preserves the subtle specular texture work on the hands.

 

 

 

  • Like 2

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

Somewhat disappointingly, the advantages of this mod are rarely seen in the best looking missions.

 

This is because many mappers have approximated this look by augmenting their maps with "bounce lights" since

the release of "Sir Talbot's Collatoral" so you almost always see the same specular effect in ambient lighting as with

real lighting because most maps "always use real lighting" for ambient locations anyway.

 

Having this new ambient behavior should reduce the need to place bounce lights around

and thus should save a little performance as well as mapping efforts.

  • Like 3

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

A small bug crept into the last build. Here is a new one.

The latest one is as trim as I think I can get without utterly replacing all original specular code.

Enjoy!

tdm_base01.pk4

  • Like 2

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

  • 3 weeks later...

I got sick of messing around with the ported code, and instead tuned the specular in the current design and added fresnel.

The result is smaller cleaner code and it looks better as wellinteraction.ambient.fs.glsl

  • 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

Here is the shader back-ported to 2.09b tdm_base01.pk4

And here is a final tweak ( also included above ) for the 2.10 dev build interaction.ambient.fs.glsl

  • 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

One of my long term wishlist items has always been that the ambient have a little distance based darkening so that background items are darker than foreground. I have finally achieved this effect via my own efforts:

beleaguered_fence_2021-12-14_00_59_56.thumb.jpg.596f5100b873d6c0d4617e4657b078ea.jpg

 

returntothecityv2_2021-12-14_17_47_12.thumb.jpg.b651d686bb19c65e1bceda24ca37aeee.jpg

naog_2021-12-14_17_55_34.thumb.jpg.ec95df2509d39c8640e4459a64471e4b.jpg

patently_dangerous_2021-12-14_19_17_22.thumb.jpg.5b07cde352a291e0264a6c8ef8193d58.jpg

patently_dangerous_2021-12-14_19_18_51.thumb.jpg.0c855d65e4dd8b568037ae03c1d44da2.jpg

  • Like 2

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

The new 2.09b build :

tdm_base01.pk4

2.10 dev:

interaction.ambient.fs.glsl

Other features?

Improved darkening for the underside of normals to restore some detail lost by fresnel brightening

Fresenel now responds much better to specular variation

Specular is clamped to 96% of ambient brightness rather than using lots of complicated clamp factors ( more optimized)

 

 

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

This is my personal quest to make an ambient that is equal or better than the one from TDM 1.03 to 2.05.

The plan is to eventually add something like this as a legacy mode or default mode.

Ideally this work would be superseded by a move to true PBR that would incorporate similar features but would be

more "physically correct". My work is mostly artistic in nature so it is not quite good enough yet though I am trying

to make it more rational and mathematically sound.

  • Like 2

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

The grass has a decent amount of specular so the brighter specular hightlight causes the scene to look brighter overall.

I have worked to modulate against that effect a little.

  • 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

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

    • duzenko

      The final solution for low-end GPUs:
      r_skibSubviews 1 r_skipInteractions 1 r_shadows 0 r_ambientMinLevel 0.6 tdm_lg_interleave  0
      If you don't get 60 fps after this then either your CPU is really slow or it's a map bug
      EDIT. tdm_lg_interleave is probably not required since r_skibSubviews supersedes it.
      · 15 replies
    • jaxa

      What's the console command to show the player coordinates (for beta testing)? I think it used to be using getviewpos like this but it seems to have been improved since? @AluminumHaste
      · 5 replies
    • thebigh

      'tis nearly time
      · 0 replies
    • Acolytesix  »  Wellingtoncrab

      Yeah ok, let's do this  
      · 0 replies
    • jaxa

      I should be able to beta test some missions. Built a new 5700G + GTX 970 system.
      · 7 replies
×
×
  • Create New...