Jump to content
The Dark Mod Forums

Recommended Posts

Posted

It is my understanding that view dependent effects like fresnel and specular do not influence

the interior of the lightgem octahedron very much so it's doubtful that the effect will alter playability in missions.

 

That said, it may make some players feel that the immersion is lower since they see a brighter world but the

effect is not correlated to the lightgem level.

 

All that said, I am still working on better tuning of the brightness.

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...)

Posted

This one is a little less dramatic but also has removed almost all crazy fudge numbers in favor of doubles , quarter, halves.

Not quite sure about how it dries up fresnel a little too much on bright stone but it is still pretty charming.

interaction.ambient.fs.glsl

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...)

Posted

Here is a 2.10 build:

https://www.moddb.com/mods/the-dark-mod/addons/fresnel-mod-210-beta

grass_2021-12-24_07_52_45.thumb.jpg.25708cab8e3dd1d22a1d3d4686dde78e.jpg

The instruction count has been further reduced.

Comparisons:

Default:

grass_default.jpg

Just the fresnel and Specular effect:

grass_fresnel.jpg

Fresnel and Distance darkening:

grass_fresnel_darken.jpg

Fresnel + Distance Dark + SSAO

grass_fresnel_daeken_AO.jpg

 

Default + SSAO

 

grass_default_AO.jpg

  • 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...)

  • nbohr1more changed the title to TDM Fresnel Mod
Posted

A little preview of the ongoing work:

Caduceus_good.thumb.jpg.005d5966cb7fbf5a58bfc34bac2efe35.jpg

Since 2.11 has some major changes to shader architecture, I had to rebuild my design.

In addition to restoring all my basic features, I gave considerable thought about how finicky and full of

fudge factors my last design was.

For the longest time, I have been unhappy about what I call the "velvet effect" on diffuse surfaces. This seems to happen

because the original design has the fresnel multiplied by the diffuse. I went to great lengths to achieve the following conditions:

1) Set a dry looking default fresnel for diffuse textures

2) Make specular fresnel match the look of the specular reflections from above

3) Don't make everything shiny ( an issue that was caused by fresnel in 1.03 due to a default minimum boost in specular to everything )

4) Avoid the velvet effect

Happily, I have achieved all the goals and then some.

How did it do it?

Like some of my earlier designs, there are two different fresnel equations for specular vs diffuse.

Diffuse has a hard-coded low power constant which spreads the effect wide over surfaces rather than being a rim effect

The specular fresnel power value is initially high but is multiplied by the specular texture causing shinier values to have tighter fresnel that looks more like specular

How did I apply the fresnel effect to diffuse without multiplying it or causing the velvet effect?

I multiplied the diffuse fresnel by 1.0 minus the specular texture ( inversion ).

This caused all the shiny areas to remain dark but brightened low or no specular areas.

This still was too foggy when added to the top of surfaces so I then also multiplied the results from

the inverted specular pass with an inverted diffuse map. This cause the effect to retain most of the diffuse features without

becoming too high contrast or causing neutral textures to glow.

Finally, probably the biggest change was that I was able to adapt one of stgatilov's changes to make the entire underside of structures darker the way it used to be in 1.03. This has a dramatic improvement to scenes like the one above.

Here are the 2.11 files ( currently requires building from SVN source ). I will attempt to back-port my improvements to the 2.10 shader a little later.

 

 

tdm_interaction.glsl

interaction.ambient.fs.glsl

Since the new dev build is out ( dev16617-10107 ) here is a pack file to place in your darkmod dev build folder:

https://www.moddb.com/mods/the-dark-mod/addons/211-alpha-dev-build-fresnel-mod

 

Edit:

Woo! I got the down-shading to work in 2.10:

        vec4 worldN2 = normalize( params[var_DrawId].modelMatrix * vec4(N, 0) ) ;
        vec3 worldL2 = vec3(0, 0, 1);
        float NdotL2 = dot(worldN2.xyz, worldL2);
        float downshading2 = min (( NdotL2 + 1.38 ), 1.0 ) ;

gotta cleanup the rest of the shader design and I'll post a new version.

 

  • 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...)

Posted

Here is a backported verion for 2.10

https://www.moddb.com/mods/the-dark-mod/addons/fresnel-mod-210

EDIT:

I finally figured out how to fully divorce the diffuse and specular in 2.10.

Attaching here for safe keeping:

interaction.ambient.fs.glsl

I'll upload a new pack file to moddb once I am done testing and tuning.

  • 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...)

  • 4 months later...
Posted

Posts like this makes me appreciate TDM and the people behind it even more. We are in good hands. Respect.

Dear @nbohr1more,

I don't know a thing about the fine detail being discussed here but I am thrilled by the passion you put into this mod(ification). Since we can have several instances of TDM running in parallel, will you kindly suggest a mission (TDM 2.11), and perhaps a precise location or locations, for me to check with and without Fresnel and form an opinion?

Thanks in advance.

  • Like 1

TDM_Modpack_Thumb_50.png

Posted

Make sure to use the version here:

https://www.moddb.com/mods/the-dark-mod/addons/fresnel-mod-211-unofficial

The most dramatic place to check this out is in the start area of the mission "Caduceus of St Alban".

That said, any mission with large amounts of flat ambient lit surfaces that have the same texture over vast swaths of the scene will see dramatic improvement.

The Vengeance for a Thief ( really, any Sir Taffsalot ) missions are particularly improved by this one.

  • 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...)

Posted

Because it's a visual tweak based on a personal preference that would actually make it harder to create maps and content for TDM.

Once TDM has PBR support, such tweaks won't be necessary, as fresnel response will be calculated correctly at material level.

  • Like 4
Posted

I see.

Fresnel changes the frame in many different ways. With Fresnel ON everything is a tad brighter but I get to see more refined shadows in the stone structure. In addition, and as promised, brightness gets reduced at long distances.

I will let experts decide what's best because I am unable to tell (a few minutes into the mission) if the experience is improved with Fresnel on or off. My brain isn't trained for this kind of processing.

(I suggest to download the images and compare them side by side locally)

Fresnel OFF:

Fresnel-OFF-Original.jpg

Fresnel ON:

Fresnel-ON-Original.jpg

Fresnel OFF (White Point Adjusted):

Fresnel-OFF-White-Point-Adjusted.jpg

Fresnel ON (White Point Adjusted):

Fresnel-ON-White-Point-Adjusted.jpg

  • Like 2

TDM_Modpack_Thumb_50.png

  • 11 months later...
Posted

I am bringing this here.

15 hours ago, nbohr1more said:

Since I got a request for it, here is a 2.12 beta 3 compliant version of the Fresnel Mod:

https://www.moddb.com/mods/the-dark-mod/addons/fresnel-mod-212-beta-3/

From the instructions in ModDB:

Rename tdm_base01.pk4 in your darkmod directory to tdm_base01.pk4.old

Wouldn't it be better to offer this as a "z" (zzz or whatever) mod? It could have it's own z_fresnel_mod.pk4 name.

TDM_Modpack_Thumb_50.png

Posted
2 hours ago, snatcher said:

I am bringing this here.

From the instructions in ModDB:

Rename tdm_base01.pk4 in your darkmod directory to tdm_base01.pk4.old

Wouldn't it be better to offer this as a "z" (zzz or whatever) mod? It could have it's own z_fresnel_mod.pk4 name.

Yeah, probably.

Mostly wanted to clue people into where we keep our shaders so other tinkerers can offer improvements (etc).

  • 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...)

Posted
2 hours ago, MirceaKitsune said:

Is the change still not good enough to make it into vanilla as implemented? I imagine it's too late to make its way into the current beta for 2.12.

The current design has many arbitrary artistic conditions that "look good to me" and "closely resembles TDM v1.03" ( which looked good to me ).

If someone wants to offer a neutral "PBR compliant" version it can be included in the core pretty easily.

  • 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...)

Posted (edited)

Slightly offtopic, but I've been tinkering with differend UE engines lately, and it occured to me that current version of TDM is actually fairly close to UE 3/UDK in terms of rendering and graphics features. Have you ever considered adding lightmapping as an optional way of lighting maps? Given the way most TDM assets are made, it could provide a big boost in performance, while offering much better look. And that, potentially, would be a much, much smoother transition into a new level of visual fidelity than PBR, which requires remaking all textures, materials, and lights.

Edit: I forgot that models would need to be re-saved with a dedicated uvw channel where faces are unwrapped in 0-1 space in order for lightmaps to work correctly. 😕 So, it looks like any effort to get to next level of visual fidelity will require significant artist effort...

Edited by peter_spy
  • 2 weeks later...
Posted
4 hours ago, peter_spy said:

On a slightly related note, why ambientrimcolor material keyword was removed in 2.11? Notes show that it was "unused" – was it even advertised to mappers and content creators?

@stgatilov Can answer this one. I think there's an argument for having this as a material effect to make assets stand out but I am not sure about "tying it to the ambient" light when we eventually plan to have those lights globally render proper fresnel at some point.

  • 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...)

Posted (edited)

Btw. you know that fresnel on brushes and simple models that use tiled materials looks differently than e.g. models with higher geo density, or smooth edges faked on normalmaps? Might be hard to adjust it for all cases. Unless you meant the PBR-compatible calculations, I guess...

Edited by peter_spy
Posted

I feel that tweaking shaders visually does more harm than good in the end.

Here is one example of what shader tweaking leads to, and where I'll do yet another visually-breaking change: 6354
Before that is was untweakable specular which also broke visuals: 5044

What a game engine needs is a universal model (preferably well-known) with several tweakable parameters.
In fact, the very idea of PBR and why it wins today is that it models real physics, and thus it works more or less the same way in every engine and scenario. It is a well-known standard (with minor variations). We can't have PBR yet (and maybe forever), thus we stick close to Phong reflection model, which has been around for decades and is also quite standard.

Artists should make assets that would result in a beautiful picture, not shaders.
But they can't do it if we have some weird non-standard lighting model which changes every year.

We should never tweak shaders based on how average missions becomes seemingly nicer to us!
If someone decides to add normal mapping, it should behave as an approximation for how real high-resolution surface should behave in our model, not as some kind of "beautifier effect".

If you want to add some effect which is outside the current model, it should be done in a way that:

  1. it does not change how the previous model works (and how current missions look)
  2. it can be tweaked by understandable parameters
  3. it is applied in all shaders and all lighting the same way

I believe we already have fresnel and rim, but it is kinda hardcoded and not present in all shaders. Yet another result of someone tweaking shaders based on how it looks and not on how sound it is mathematically.

  • Like 1

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

    • jivo

      I just uploaded a new version of the Visible Player Hands mod. It's been updated for TDM 2.13 and has new animations. Check out the post if you're interested!
      · 0 replies
    • datiswous

      I moved from Manjaro Linux (rolling release) to Linux Mint (LTS). One of the reasons was that I found the updates a bit too often and long. But now on Mint I get updates every day, although they're usually small updates.
      · 3 replies
    • JackFarmer

      "Hidden Hands: Vitalic Fever" - new update available including subtitles & compressed briefing video (thanks to @datiswous) and several fixes.
      · 0 replies
    • Wolfmond

      🇬🇧

      2025-04-20
      I'd like to track my level design progress a bit more often now, so I'm using the feed in my profile here.
      I've been working intensively on Springheel's YouTube course over the past few days. I'm currently up to lesson 8. There is so much information that needs to be processed and practiced. 
      I have started to create my own house. As I don't have the imagination to create a good floor plan, I grabbed a floor plan generator from Watabou and experimented with it. I chose a floor plan that I will modify slightly, but at least I now have an initial idea. 
      I used two guards as a measuring tape: The rooms are two guards high. It turned out that I can simply double the number of boxes in DarkRadiant in grid size 8 that are drawn in the floor plan. 
      I practiced the simplest things on the floor plan first. Drawing walls, cutting walls, inserting doors, cutting out frames, creating VisPortals, furnishing rooms.
      I have had my first success in creating a book. Creating a book was easier than I thought. I have a few ideas with books. The level I'm creating will be more or less a chill level, just for me, where I'll try out a few things. I don't have an idea for my own mission yet. I want to start small first.
      For the cellar, I wanted to have a second entrance, which should be on the outside. I'm fascinated by these basement doors from the USA, I think they're called Bilco basement doors. They are very unusual in Germany, but this type of access is sometimes used for deliveries to restaurants etc., where barrels can be rolled or lifted into the cellar. 
      I used two Hatch Doors, but they got completely disoriented after turning. I have since got them reasonably tamed. It's not perfect, but it's acceptable. 
      In the cellar today I experimented with a trap door that leads to a shaft system. The rooms aren't practically finished yet, but I want to continue working on the floor plan for now. I'll be starting on the upper floor very soon.

      __________________________________________________________________________________
      🇩🇪

      2025-04-20

      Ich möchte nun mal öfters ein bisschen meinen Werdegang beim Leveldesign tracken, dazu nutze ich hier den Feed in meinem Profil.
      Ich habe mich in den vergangenen Tagen intensiv mit dem Youtube-Kurs von Springheel beschäftigt. Aktuell bin ich bis zu Lektion 8 gekommen. Das sind so viele Informationen, die erstmal verarbeitet werden wollen und trainiert werden wollen. 

      Ich habe mich daran gemacht, ein eigenes Haus zu erstellen. Da mir die Fantasie fehlt, einen guten Raumplan zu erstellen, habe ich mir einen Grundrissgenerator von Watabou geschnappt und damit experimentiert. Ich habe mich für einen Grundriss entschieden, den ich noch leicht abwandeln werde, aber zumindest habe ich nun eine erste Idee. 

      Als Maßband habe ich zwei Wächter genommen: Die Räume sind zwei Wächter hoch. Es hat sich herausgestellt, dass ich in DarkRadiant in Gittergröße 8 einfach die doppelte Anzahl an Kästchen übernehmen kann, die im Grundriss eingezeichnet sind. 

      Ich habe bei dem Grundriss erstmal die einfachsten Sachen geübt. Wände ziehen, Wände zerschneiden, Türen einsetzen, Zargen herausschneiden, VisPortals erstellen, Räume einrichten.

      Ich habe erste Erfolge mit einem Buch gehabt. Das Erstellen eines Buchs ging leichter als gedacht. Ich habe ein paar Ideen mit Bücher. Das Level, das ich gerade erstelle, wird mehr oder weniger ein Chill-Level, einfach nur für mich, bei dem ich ein paar Sachen ausprobieren werde. Ich habe noch keine Idee für eine eigene Mission. Ich möchte erst einmal klein anfangen.

      Beim Keller wollte ich gerne einen zweiten Zugang haben, der sich außen befinden soll. Mich faszinieren diese Kellertüren aus den USA, Bilco basement doors heißen die, glaube ich. Diese sind in Deutschland sehr unüblich, diese Art von Zugängen gibt es aber manchmal zur Anlieferung bei Restaurants etc., wo Fässer dann in den Keller gerollt oder gehoben werden können. 
      Ich habe zwei Hatch Doors verwendet, die allerdings nach dem Drehen vollkommen aus dem Ruder liefen. Inzwischen habe ich sie einigermaßen gebändigt bekommen. Es ist nicht perfekt, aber annehmbar. 
      Im Keller habe ich heute mit einer Falltür experimentiert, die zu einem Schachtsystem führt. Die Räume sind noch quasi nicht eingerichtet, aber ich möchte erstmal am Grundriss weiterarbeiten. In Kürze fange ich das Obergeschoss an.



      · 2 replies
    • JackFarmer

      On a lighter note, thanks to my cat-like reflexes, my superior puzzle skills and my perfect memory, I was able to beat the remastered version of "Tomb Raider: The Last Revelation" in a new superhuman record time of 23 h : 35 m, worship me!
      · 5 replies
×
×
  • Create New...