speedwaystar Posted October 16, 2025 Report Posted October 16, 2025 (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. disabled in St Alban 1 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 October 17, 2025 by speedwaystar 1 1 Quote
Bikerdude Posted October 18, 2025 Report Posted October 18, 2025 (edited) On 10/16/2025 at 1:51 PM, speedwaystar said: hope this isn't too much work Just a heads-up, imgur isn’t accessible in the Uk. Edited October 18, 2025 by Bikerdude 1 1 Quote
snatcher Posted October 19, 2025 Report Posted October 19, 2025 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. 2 Quote
nbohr1more Posted October 19, 2025 Author Report Posted October 19, 2025 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. ) 1 Quote 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...)
Popular Post nbohr1more Posted March 26 Author Popular Post Report Posted March 26 The 2.14 Fresnel mod is up: https://www.moddb.com/mods/the-dark-mod/addons/fresnel-mod-214-unofficial As requested, this is now just an override pk4 for the glprogs folder so it shouldn't interfere with mods that use tdm_base01.pk4 overrides. You can copy it into your base folder or into your darkmod/fms/mission folder. 5 Quote 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...)
Arcturus Posted March 28 Report Posted March 28 Is there no way to use fresnel per material, rather than globally? 1 Quote It's only a model...
nbohr1more Posted March 28 Author Report Posted March 28 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. Quote 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...)
Arcturus Posted March 28 Report Posted March 28 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. Quote It's only a model...
nbohr1more Posted March 28 Author Report Posted March 28 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. Quote 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...)
Arcturus Posted March 28 Report Posted March 28 @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. 1 Quote It's only a model...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.