Lack of a Bumpmap Causes Props To Light Weirdly

    • Lack of a Bumpmap Causes Props To Light Weirdly

      Something that has been bothering me for a good long time is the existence of 'glowing' props that seem to be much brighter than their surroundings for no adequately-explainable reason (these are not props like light bulbs that have a reason to glow and use $selfIllum to do it; they're weird things like desks and bulletin boards). By comparing the material files for glowing and non-glowing props, I've determined that (at least for many of them) the effect is caused by the lack of a $bumpmap material in the .vmt file- adding even a blank 128 128 255 one will make the prop light much more normally.

      I'm posting this not because I demand the devs put Xen aside for the ext year to go back through and fix every last one of these props (I'm more than capable of doing that myself, actually) but as a reference in case anyone else was experiencing this problem.

      Once I get a good portion of these props fixed, I think I'll put them all together into one big workshop addon along with a bunch of other assets and random useful things I've created over the course of BMPD- that way people who want to use them in other mods can do so without having to download every restored Black Mesa map and hunt through its VPK.
      Pre-Disaster Planning Thread: Thinking of Restoring a Part of Black Mesa? Come Here First!

      Office Complex PD: I'm the Slowest Pre-Disaster Mapper!

      Pre-Disaster Questionable Ethics: It's here!
    • Originally I wanted this to not 'interfere' with the canonical maps in any way, but thinking about it as a fix and not a pre-disaster thing specifically it does make sense to just change the canonical models. I'll have to do some experimenting to see if this is an issue introduced at compilation, or when the map is run- if it's introduced at compilation my fix would not affect the canon maps at all without recompiling them.
      Pre-Disaster Planning Thread: Thinking of Restoring a Part of Black Mesa? Come Here First!

      Office Complex PD: I'm the Slowest Pre-Disaster Mapper!

      Pre-Disaster Questionable Ethics: It's here!
    • Just a quick screenshot to show what I'm talking about:

      Both of these copy machine models use the same base texture; both have a single brightness-30, pure-white constant light 64 units directly behind them. The one on the left, however, has a $bumpmap parameter leading to a blank 128 128 255 normal map.
      Pre-Disaster Planning Thread: Thinking of Restoring a Part of Black Mesa? Come Here First!

      Office Complex PD: I'm the Slowest Pre-Disaster Mapper!

      Pre-Disaster Questionable Ethics: It's here!
    • That's... really odd. I'm going to check the vmts myself to see if there's any other explanation, because I'm 100% the vertexlitgeneric shader isn't supposed to act like that.


      Source Code: copy_machine.vmt

      1. "VertexlitGeneric"
      2. {
      3. "$basetexture" "models/props_office/copy_machine"
      4. // "$bumpmap" "models/props_office/copy_machine_normal"
      5. }

      Hmm... Yeah, no, that's really weird. I'm pretty sure the other source games don't behave this way, but I also can't think of any reason that Crowbar Collective would have had to modify the material shaders for. I don't think that the CSM system would have required all shaders to be modified, but then again I know from the Lost Coast commentary that Valve had to redo all their shaders when they introduced HDR, so I could be wrong.

      Kind of interesting to see that the copy machine used to have a normal map as well. I wonder if that was a leftover from when they were using CS:S content and the custom version didn't need a normal map, or if there was one for the BM copymachine and it got cut for one reason or another.

      The Javid wrote:

      I can't wait til we ditch that pattern too. It only blends in with gravel and shitty couches.
    • Just experimentally determined (through running the same map with those two copy machines while making changes to the fixed one's vmt but not recompiling) that the glowiness is determined by the state of the vmt at runtime and not baked into the lightmap at compile. This is good news for a workshop fix as it would not require recompiling the canonical maps, but... well, it's slowly dawning on me that this issue affects quite a lot of props. So, while I'm not advocating whether they should or shouldn't look at it, I'd kind of like some confirmation from the developers as to whether they are or aren't going to be fixing this issue- it'll probably take me until well after December to tweak all of those VMFs myself, and I'd hate to do so only to have them all be fixed (or the problem removed entirely) along with Xen anyway.



      Regardless, however, next step will be determining whether world brushes are also affected by the presence or absence of a bumpmap, or just props.
      UPDATE: They are not.
      Pre-Disaster Planning Thread: Thinking of Restoring a Part of Black Mesa? Come Here First!

      Office Complex PD: I'm the Slowest Pre-Disaster Mapper!

      Pre-Disaster Questionable Ethics: It's here!

      The post was edited 1 time, last by Admiral Sakai: The results are in. ().

    • Don't bother fixing this. I asked our graphics programmer, Chetan, and he said that this happens because non-bumpmapped props are vertex lit instead of pixel lit. This was some kind of CSM hack, from what I can tell.

      He said that in the Xen build, all props are pixel lit. So this issue should go away with the Xen update, hopefully.

      Nice catch, though! Good bug hunting!
      Chon Kemp - Level Designer and Community Manager
      Creator of the Black Mesa "Uncut" Mods - Surface Tension Uncut and
      On a Rail Uncut
      My dev blog on the development of dm_gasworks