Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)
On 1/16/2024 at 5:25 AM, 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.

renaming it to z_fresnel_mod.pk4 seems to work without issues, and also avoids the (to me) undesirable shuffling of the original tdm_base01.pk4 back and forth from the backup whenever the mod is enabled/disabled by Generic Mod Enabler.

4buaIGM.jpeg

disabled in St Alban 1

9I9ro2p.jpeg

vs enabled in St Alban 1, so it's clearly working.

EDIT: when renamed to z_fresnel_mod.kp4, it loads after and thus conflicts with @snatcher's Core Essentials due to the presence of default.cfg in the mod root which overrides Snatcher's loot count assignment (F3). i can't see any reason for a default.cfg file to be included in the fresnel mod, so it should probably be removed.

there are likely to be other mod conflicts with this z_ load order, since it's a complete copy/paste of the entire contents of the default tdm_base01.pk4, plus @nbohr1more's edits.

the ideal solution would be to package it in aaa_fresnel_mod.pk4 (so that it loads after the default game data, but before all other mods, which I think is the intention), *and* only include the files that are changed by the mod, which would then cleanly override the defaults.

hope this isn't too much work :)

Edited by speedwaystar
  • Like 1
  • Thanks 1
Posted
On 10/16/2025 at 2:51 PM, speedwaystar said:

EDIT: when renamed to z_fresnel_mod.kp4, it loads after and thus conflicts with @snatcher's Core Essentials due to the presence of default.cfg in the mod root which overrides Snatcher's loot count assignment (F3). i can't see any reason for a default.cfg file to be included in the fresnel mod, so it should probably be removed.

there are likely to be other mod conflicts with this z_ load order, since it's a complete copy/paste of the entire contents of the default tdm_base01.pk4, plus @nbohr1more's edits.

Indeed.

A z_fresnel_mod.pk4 would only require the two files with @nbohr1more's edits:

  • glprogs\tdm_interaction.glsl
  • glprogs\stages\interaction\interaction.ambient.fs.glsl

@speedwaystar, *.pk4 are zips with a pk4 extension. Open the pk4, delete everything except these two files and you will have your simplified fresnel mod.

  • Thanks 2

TDM_Modpack_Thumb_51.png.748522d7ee2ef4ae4c47f52887da2c66.png

Posted

I'll update the Moddb page soonish.

I wanted to keep the files in their original pack file so that modders would know where to get the glprogs data.

( And so the removal \ tdm_installer process is seamless for trouble-shooting. )

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

  • 5 months later...
Posted

There used to be code for that but it was removed.

With the current material system, there is no way to query light direction so you can only approximate the effect by hard-coding the shading direction based on the player camera view. 

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
18 minutes ago, nbohr1more said:

With the current material system, there is no way to query light direction so you can only approximate the effect by hard-coding the shading direction based on the player camera view.

But it can't be used per material?

The whole point of Fresnel effect is that it's view dependent.

 

It's only a model...

Posted

Fresnel is really a form of specular, which is also really a form of reflection. If you want it to properly blend into the ambient lighting you need some way to approximate light \ scene input.

A good fresnel effect which uses world lighting would either need light direction attributes or cubemaps.

For the latter, you could use:
 

The problem is we don't have a world cubemap / probe system so you need to manually create a lot of cubemaps.

Yes, you can create a fresnel effect that just does a subtle view angle based brightening without these inputs.

I don't know how much better that would look than just using a generic cubemap faked specular effect.

Also, any time you hard code brightening in a material effect it will look like it's glowing in some contexts.

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

@nbohr1more I was thinking more about using fresnel as a factor / mask in materials. For example changing intensity of mirror reflections based on angle, like in the video above. Or masking one stage of material. Being able to modify intensity of cubemap reflections inside materials would be useful.

  • Like 1

It's only a model...

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.


×
×
  • Create New...