Left 4 Dead 2

Left 4 Dead 2

50 ratings
Boomer Bile textures without doubling the VMTs (Modders Guide)
By Ellie
This Guide for L4D2 Modders aims to unlearn a misconception about the boomer bile effet and the minimal steps needed to implement it.
   
Award
Favorite
Favorited
Unfavorite
[General Information]
Difficulty :

Short description : Aims to unlearn something that might be useless when it comes to Boomer textures, in order to simplify the modding process, with less VMTs needed (good if you want Boomer textures but struggle with the 32 VMT limit).

Time to implement : 0 seconds. This mod aims to remove a step for modders.

Needed skills :
  • The ability to make a character mod.
  • ''Knowing'' how to put Boomer textures in a survivor mod
The unnecessary step
If you know how to make characters mods for L4D2 on your own, first of all, congratulations and thank you for bringing to the community awesome mods and make L4D2 live since all these years.
If you mod characters, you might have at one point wanted to add Boomer texture effects on your characters mods, and since you probably didn't learn to make character mods by yourself, you probably read a guide about it. The problem is that guides are incorrect about the minimal required steps to implement boomer textures, because one major step is not needed if you do not plan on using a $detail texture.

The error itself does not break any mod, it's not unsafe or unstable, however, it doubles the VMTs in your mod, because, and you probably do it that way, you use two pairs of VMTs, one normal and one with _it at the end.
This results in another problem, since models usually have a 32 VMT limit. So for more complex mods that requires a lot of VMTs, people usually do not implement Boomer textures.

In other words, if you learned how to add boomer textures reading this, this is NOT ALWAYS NEEDED. You do not need this step if you do not plan on using $detail.

The (possible) useless step in мяFunreal's Custom Playermodels Guide

The (possible) (former) useless step in ZeqMacaw's Modding a Left 4 Dead 2 Survivor Guide

The (possible) useless step in Splink's Custom Survivor Replacement Guide

The (possible) useless step in Oachkatzlschwoaf™'s L4D2_Custom_Survivors Guide

The ONLY thing needed for Boomer effects
This is the only thing you need to do if you want Boomer bile effects on your survivor.
You need to repeat these steps in all VMTs that need to have Boomer effects.

STEP 1
Add one
}
at the end of your VMT.

If you do not do this, it will still work, but you will get errors in console.

STEP 2
See this thing at the beginning of your VMT ?
VertexLitGeneric {
REPLACE it with that
patch { include "materials/models/survivors/survivors_it_shared.vmt" insert {

STEP 3
That's it, you're done, Boomer effects are now activated. Just do that in every VMT and you're good !
Why was there an error ?
What probably happened is that at the very beginning of L4D2 Modding, Splinks and other modders made the first guide ever about Modding Survivors in L4D2 which helped a lot of people, but that contained the (mostly) unnecessary step that was later passed on every other Guide and between modders.

Of course, they looked at the default files and the ones provided by Valve in the VPK, and there was all the reasons in the world to believe a modification in the .qc with skin families and double _it VMTs was mandatory because that's actually how the original game survivors are done after all and how the modding material Valve itself provided was set up.

There was also all the reasons in the world to believe that the only way to display boomer texture was to "swap" the models when the Boomer vomits, since that's how the game works. So why is this step unnecessary ?

It turns out that actually, almost everything that changes the Boomer Bile texture in handled by Materials Proxies in the VMT. The patch {} thing you need to do is a way to include a VMT file in the game that contains a code to display Boomer textures. This code changes the $detailblendfactor of a $detail containing the Boomer vomit, which is gotten by a Proxy. If you just insert that code in the VMT, the result is the same.

These are the only lines that handle the boomer effect, found in the survivors_it_shared.vmt:
$detail "models\survivors\survivor_it" $detailscale 3 $detailblendfactor ".001" $detailblendmode 0 $ITAmount 0 Proxies { IT { resultVar $ITAmount } Equals { srcVar1 $ITAmount resultVar $detailblendfactor } }
Copying these lines in any VMT will activate the Boomer effects on its own !

Originally posted by you:
Well, okay Ellie, that's nice, but that still doesn't explain why the original survivors have all these double VMT with _it.vmt for the Boomer. You do not seriously think that Valve's developers went in all that trouble for something that is useless? You must be wrong.
To this, I can answer that yes, there is a reason why the developers coded the game this way.
The reason is that it is not possible to change the $phong settings after the model is rendered, using Material Proxies. In other words, the code above is unable to change $phong settings on its own because of engine limitation. Therefore, the developers, that wanted special $phong settings on the survivors, had only the option to swap the models when the Boomer vomits. That's the reason why it exists, and you should actually ignore that Guide if you actually want different $phong settings for when the Boomer vomits... but well, I've seen very few mods that way.
16 Comments
Blue 3 Dec, 2021 @ 8:58am 
Can I do this on VMT's with DMG code without messing it up?
мяFunreal 9 Oct, 2020 @ 5:06am 
Thanks.
I have also modified my own guide to properly explain that this is possible, while also explaining when do do it and when to avoid it.
Ellie  [author] 9 Oct, 2020 @ 3:53am 
@мяFunreal : I rebranded it as "(mostly) unnecessary step". It's still true that the Guides are wrong about the minimal steps to have Boomer effects, but I can get the confusion, so I stopped using the error word, to avoid any further confusion.
мяFunreal 8 Oct, 2020 @ 2:26pm 
good to know you aknowledge this view.
But your guide makes it seem like we are doing it absolutely incorrectly.
It would seem better if you would re-brand this guide to a "simpler and resource friendlier Vomit overlay", also stating this issue.
As opposed to individually calling us out and telling everyone that this is the incorrect way and doing it must be avoided.
Ellie  [author] 8 Oct, 2020 @ 9:02am 
@мяFunreal : I agree. Both have their advantages and disadvantages. If you're familiar with the _IT method, it's nice and easy, but I actually made this Guide because I randomly got to help a few people that were taking a lot of time to re-UV-map their models to merge textures because they wanted Boomer textures, but had too many VMTs (more than the limit of 32). For that specific case, I think it's cool to know that you have a workaround :). If you do not use $detail, it's better to just not do the extra step :D.
мяFunreal 8 Oct, 2020 @ 8:43am 
honestly, i don't mind if the detail goes away when the _it material shows, because you wouldn't see that because its covered.
Going through the defail frame stuff is just more work than making a _it material.

Your way is neat, but not better.
Ellie  [author] 8 Oct, 2020 @ 4:07am 
@мяFunreal : True, in the sense that if you use the default code, it will not allow for a $detail (but your $detail will also go away when the survivor gets bile on him).
However, to simplify everyone's life, I could code a very quick VMT thing that switches the $detailframe from 0 to 1 when someone has boomer vomit on him, and back to 0 when it goes away (and you put your $detail on frame 0 and the boomer $detail on frame 2). This way :
- First of all, you would not have to do that _IT step anymore in any case
- Second of all, you could display a mixed $detail when someone has boomer vomit, instead of replacing the $detail, which would be an improvement over the current result

What do you think ?
мяFunreal 7 Oct, 2020 @ 8:24pm 
that's cool and all.
but it breaks the use of all detail textures you'd want on the texture.
We're doing it the original way valve had done it, so that IF you want to have, lets say aleather detail, this detail won't be lost.
฿ØⱠ₮Ø₭¹⁷³ึ 3 Oct, 2020 @ 12:36pm 
thank you so much, this is very useful
Ellie  [author] 29 Sep, 2020 @ 2:03am 
@ZeqMacaw : Nice :D, and honestly, the first time it worked without the _IT .vmt because I did a test to understand how the Proxy worked I was like WTF :giraffe: , this makes no sense.