Black Mesa

Black Mesa

Newlight Directionality Fix
37 Comments
DTK25 4 Jul @ 12:12am 
@Jofoyo
Thank you for the Great Mod. :steamthumbsup:
I use the Mod with BMCE and other mod´s , no problem so far.
Jofoyo  [author] 17 May, 2024 @ 11:00pm 
No idea. Only if BMCE replaces default materials. In any case it's alright to skip this mod atm until I can make a bigger update since the biggest problem was fixed by the Necro Patch.
tuesday 17 May, 2024 @ 10:54pm 
does this conflict with BMCE?
virgil 19 Apr, 2024 @ 9:04am 
@Jofoyo Thank you very much for response! Now I see it's really a matter of art direction.
Jofoyo  [author] 18 Apr, 2024 @ 11:21am 
In anycase, "directionality" is restored regardless of if you use this mod or not. Just this mod introduces hard shading on everything, whereas default everything will be softly shaded. Technically this mod makes things more "realistic" but. Neither option is ideal.
Jofoyo  [author] 18 Apr, 2024 @ 11:18am 
I'm aware. The patch fixes the halflambert problem but really it's a matter of art direction now. Lambert doesn't look good on everything but does look good on somethings. I may make a new mod eventually but idk, it's a bigger undertaking now.
virgil 18 Apr, 2024 @ 8:37am 
@Jofoyo Well you see, Black Mesa was update as of 16th April, and patch notes say that it fixes isses with 'new lighting' as well as your mod does, but it's not so precisely in technical spects as you do, so I am wonering if devs fixed everything themselves or it's in the same state as when you wrote your last comment? Thanks in advance and big thank you for you work to the community, I appreciate time and effort you put into this free addon.
LordAinzalot 17 Apr, 2024 @ 8:13pm 
hey! loving this one since it came out. can it be, it causes issues with new update? legs blood of headcrabs on zombies looks white now
Jofoyo  [author] 16 Apr, 2024 @ 7:18pm 
Read my last comment below. Same applies.
virgil 16 Apr, 2024 @ 7:14pm 
So does these days update make this addon absolutely obsolete afteral?
smilokmusic 29 Mar, 2024 @ 11:49am 
Great ! How do you know it is installed/enabled ? (I subscribed)
And is unsubscribe deactivating it ?
Jofoyo  [author] 29 Mar, 2024 @ 12:43am 
Not completely, but this mod in it's current state is not ideal anymore, as some stuff would benefit from $halflambert being enabled, while others wouldn't as much.
AtomicTEM 28 Mar, 2024 @ 9:23pm 
Is this still useful if using the current March 13 2024 beta branch? I ask this since you mention "However, many materials will still benefit from this parameter, and other now fixed parameters. Stay tuned for an upcoming sequel post patch." So does the patch make this completely obsolete?
virgil 14 Mar, 2024 @ 10:54am 
well Crowbar collective made new lights when? in like 2020? and now they are only going to fix it?! thanks for the community and especially the author of this addon for puting tinme, effort and love in this game, that used to be just a free mod, but now is a full released game btw.
Jofoyo  [author] 20 Feb, 2024 @ 5:30am 
@GordonFreeman Hi Chet :fhappy:, glad to hear. I've already talked with Adam and Kevin about it (who brought it up with Deniz)

I've also read the blog before! Very insightful stuff, and has helped with the dev of Black Mesa: Blue Shift. Actually it's inspired me to look into DirectX programming one of these days. All super interesting but I've not touched C in a few years.
GordonFreeman(Muted)  [developer] 20 Feb, 2024 @ 2:37am 
Great patch Good Work :steamthumbsup:
Sounds like a bug that slipped through.We will look into this.

I would just like to clarify that Newlights implementation was based on ver4 of my hobby engine called https://chetanjags.wordpress.com/just-another-game-engine/
Balls24 18 Feb, 2024 @ 8:55am 
The best mod ever made for this, thank you my dear dear friend Jofoyo from the now Surse discord server :steamthumbsup:
Jofoyo  [author] 16 Feb, 2024 @ 2:59am 
It really depends. There's mainly two different types of what someone would think of as a texture swap.

Ones that change the material, which is the underlying physical properties of a surface and chooses which textures are selected for that surface

Ones that ONLY change out the texture files.

There's not really an easy way for anyone to check without looking through the mod files to see if any VMTs are included, AND if they differ from the default.

Depending on which mod overwrites which, and if the texture mod edits the texture paths or not, you'll either: Get the textures you want but be missing the lambert fix, get the lambert fix but the surface won't be shaded the way the other mod intended, or, get the lambert fix but the default textures will be used.
Anschluss 15 Feb, 2024 @ 7:24pm 
Sorry I need a lot of guidance. What counts as a default material or modification thereof? Would a mod changing the HEV Zombie textures qualify?
Bonk Man 15 Feb, 2024 @ 5:09am 
Alright. Again, thanks for your time.
Jofoyo  [author] 15 Feb, 2024 @ 5:08am 
It's exclusive to Black Mesa. There have been other implementations of deferred lighting, but none that are really publicly available. BMS's implementation is p unique as it was based off Unreal engines implementation.
Bonk Man 15 Feb, 2024 @ 5:05am 
Very, very interesting. This has the potential to be a game-changer for more survival horror sections of the game, if someone were to recompile the stock maps with them. I appreciate your time.

One final question: Is this an exclusive thing to Black Mesa, or did it originate in the Source build where it was built from? Could it potentially be ported back into other Source builds, even if it required the SDK?
Jofoyo  [author] 15 Feb, 2024 @ 5:00am 
No. Newlights are very cheap on their own. I've only seen noticeable performance dips from them when I had a shit ton of their attenuations overlapping, and even then, only when I was staring directly at the surface they were lighting with a lot of screen coverage.
Bonk Man 15 Feb, 2024 @ 4:53am 
Does that mean that newlights in long hallways can lag the game? Let us put for example the spotlight seen in the bridge lowering section of On A Rail 1. Were that a newlight, would it be too expensive to function?

Were that the case, I can see why they appear to be mostly used in the Xen observatory labs, which are relatively cramped and small compared to bigger sections. Still, its an intriguing concept that could be ported to other sections of the game.
Jofoyo  [author] 15 Feb, 2024 @ 4:45am 
@Bonk Man Performance varies. Depends on a lot of factors, and there's a lot of misconceptions about their cost because most people don't know a ton about how deferred lighting works.

Newlights are rendered per pixel, which means the more space on your monitor a newlight takes up the more it costs. The more the lights overlap, the more pixels that need to be rendered to twice or more, costing more.

Shadow costs also vary depending on if the shadows are static, dynamic, or stationary. If dynamic or stationary, the more meshes that are casting shadows the more it cost. With static, shadows are rendered once and then never updated.
Bonk Man 15 Feb, 2024 @ 4:34am 
Interesting. Perhaps it would be a thing tackled by the BMCE improvement maps.

How expensive are they? Clearly, they seem to be mainly used to cast realistic shadows. I presume they may work similar to uberlights in SFM? In that case, perhaps they would work well in scenes like the beginning of Unforeseen Consequences, or most of On A Rail?
Jofoyo  [author] 15 Feb, 2024 @ 4:30am 
@Bonk Man They're mostly present in Xen, they never really went back and updated the lighting of early chapters too extensively besides the later ones like ST, QE, LC, etc.

If you want, you can use this hotkey to toggle the gbuffer on and off, which will hide newlights so you can see better where they're used.

bind "=" "incrementvar r_gbuffer_disable 0 1 1"
Bonk Man 15 Feb, 2024 @ 4:25am 
What is the actual rate of usage of newlights in Black Mesa? Are they mostly present in Xen with only a few appearances on Earth, or are they a game-wide thing?
Jofoyo  [author] 15 Feb, 2024 @ 3:17am 
Sure. For future reference if you right-click the workshop page and copy url, paste it, you can see the workshop ID.

And yea. I'm planning on making a newlight tutorial series because there's a lot of misconceptions and techniques people haven't figured out.
MyGamepedia 15 Feb, 2024 @ 12:11am 
Also would be nice if you'll add in the description that the mod folder is 3160360493, so that other people don't have to manually search for it among a bunch of other folders.
MyGamepedia 14 Feb, 2024 @ 11:23pm 
@Jofoyo Thank you for explain. Tested it with my mod and noticed that it's make lighting with shadows on models more natural. With no shadows this makes models lighting unnaturally black, however this is not issue if your level isn't box with single new light.
The One Freeman 14 Feb, 2024 @ 4:16pm 
I have to play Black Mesa agiain XD
Jofoyo  [author] 14 Feb, 2024 @ 12:59pm 
@MyGamepedia The problem is that without this fix, the polygons facing away from the light are also lit which is unexpected, even with shadows turned this is not how things are supposed to be lit. Here's a Blender mockup to compare to https://imgur.com/a/5iy2Nhf .

You can see the effects above as well, in the comparison screenshots. Notice how the back side of the crate is being lit despite there only being one source of light in the scene which is in front of it. Same for the scientist.
MyGamepedia 14 Feb, 2024 @ 12:23pm 
And more and issues with new lights... damn, they are sucks. I'll probably go to document it some there in developer.valvesoftware.com . Although I don’t really understand what is problem, it is quite natural that models are completely bright if the shadows of new light are turned off.
LIL-PIF 14 Feb, 2024 @ 8:17am 
the new era has been found
C1TY 14 Feb, 2024 @ 8:12am 
will i get ban if i use this mod
jahpeg 14 Feb, 2024 @ 1:52am 
pimp