Just kidding, no hacks, well the method is hacky though. Okay so we all want to know how to make 3+ way blends in Gmod. Well fear no more, now we know how. First I would like to thank Stiffy360 & Practical Problems for actually figuring out how to do this and then telling me. I am just a messenger.
Now one disclaimer before I start. I don't want to be hanged for this down the line for adverting bad methods. This method can come with some performance hindrances as well as other artifacts. For example, Stiffy360 said that some transparent entities may show through terrain using this method, however I personally have not seen such issues as of yet. In any case I reckon this info is worth sharing, but please be aware that it isn't the most optimal method. That being said it isn't the worst method either since displacements are relatively cheap. If you don't go ham you should be okay in terms of performance. Okay, enough babbling, lets get to it shall we?
Now the first thing you want to do is simply create a VMT that will have your third, as I call it, "dummy blend" texture. Simply replace the code provided below with the file-paths to your texture and it's bumpmap(Assuming it has one).
[code]
"LightMappedGeneric"
{
"$basetexture" "models\atexture" // Replace what's inside the quotes with the filepath to your texture. I assume most people know how to do this.
"$bumpmap" "models\atexture_n" // Replace what's inside the quotes with the filepath yo your texture normalmap/bumpmap, or simply delete it if not applicable
"$surfaceprop" "sand"
"$vertexalpha" "1" // These two params control vertex transparency together, they must be used with the "LightMappedGeneric"
"$vertexcolor" "1" // shader, as seen at the top of the VMT.
"%keywords" "custom" // This param is absolutely un-needed, however it is recommended because it makes finding custom textures in the texture browser easier.
simply typing "custom" in the texture filter in-editor will show you this texture and all other textures marked "custom" in their VMT's.
}[/code]
Once this has been completed, all you need to do now as go into editor, select a displacement that already has a regular two-way blend that you want to add a third texture blend to. Ctrl+C then Ctrl+Shift+V, this is paste special, when the dialog pops up simple press ok. This will copy and paste an exact copy of the displacement in the exact same position. Once this is done, hide one of the displacements and apply your "dummy blend" texture to this displacement. The displacement will now blend between your third texture and transparency, transparency will display what's under your third texture, which is your regular 2 texture blend. Don't forgot to disable ray collisions, hull collisions, and physics collisions in the displacement dialogue, as this is redundant and un-needed since the original displacement holding your two way blend already does these things.
https://s31.postimg.cc/79gsrjbgr/Capture.png
One last thing, this is very important, in editor you will see the transparency and texture blend normally, but in-game the transparency and the texture will be inverse. To combat this, simply paint your third "dummy blend" texture normally and then tick the invert alpha button as seen in the dialogue above. It will look strange in editor:
https://s31.postimg.cc/7aqqkuaor/Capture.png
But in-game? Very naic:
https://s31.postimg.cc/e177ue0gb/4000_screenshots_20180430023426_1.jpg
I'm sure you guys can get it looking much better and I hope you guys find this as useful as I do. Thanks for reading and have fun mapping.
Sorry, you need to Log In to post a reply to this thread.