Waterfall Blend Troubles

  • Site Migration: See bugs? Report them here. Want something changed or have an idea? Suggest it here.

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,341
For my detail contest submission, I am attempting to create a custom blend texture between the opaque and transparent versions of the waterfall textures to create a smoother transition between running and still water:
upload_2018-6-4_13-45-53.png
(The two waterfall textures I am attempting to blend, as seen in Hammer.)

The opaque texture is the same as the transparent texture, just with transparency disabled in the .VMT. However, in a blend texture's .VMT, it is not possible to define one of the textures as transparent and the other as opaque. So I copied the waterfall .VTF and removed the transparency by exporting it as a .JPEG (which does not support transparency) and re-importing it, creating this:
upload_2018-6-4_13-52-8.png
I then created the following .VMT file to test the texture, which I copied from one of the other waterfall .VMTs. I left transparency enabled to test how the texture would behave with transparency enabled (which is required for the blend).
Code:
"UnlitGeneric"
{
    "$baseTexture" "water\waterfall002_opaque"
    "$surfaceprop"    "water"
    "$model" "1"
    "$translucent" "1"
    "Proxies"
    {
        "TextureScroll"
        {
            "texturescrollvar" "$basetexturetransform"
            "texturescrollrate" -.45
            "texturescrollangle" 90
        }
    }
}
upload_2018-6-4_14-19-57.png20180604141253_1.jpg
Left: How the texture appears in Hammer; Right: How the texture appears in-game. As you can see, it worked; I had successfully created an opaque version of the .VTF. Next, I needed to blend the two textures together, so I created this .VMT:
Code:
"WorldVertexTransition"
{
    "$basetexture" "water\waterfall002"
    "$surfaceprop" "water"
    "$basetexture2" "water\waterfall002_opaque"
    "$surfaceprop2" "water"
    "$translucent" "1"
    "$nocull" "1"
    "$nodecal" "1"
    "%keywords" "tf"
    "Proxies"
    {
        "TextureScroll"
        {
            "texturescrollvar" "$basetexturetransform"
            "texturescrollrate" "-.45"
            "texturescrollangle" "90"
        }
    }
}
upload_2018-6-4_14-16-18.png20180604141801_1.jpg
The custom waterfall texture, next to a Mountainlab cliff blend. Both are displacements with the exact same alpha values (I copied the waterfall displacement from the Mountainlab displacement to ensure the alpha values matched). Left: In Hammer; Right: In-game. Despite the varying alpha values, the texture always appears constantly opaque or constantly transparent. In Hammer, it appears fully opaque, in-game it appears fully transparent. I'm not sure why this is, but as you can guess, that's not what I'm aiming for.

I've tried messing around with the .VMT, adding/removing various effects (including $blendmodulatetexture), even copying the .VMT from the custom water blend that EArkham linked to here and substituting the black texture with my custom waterfall texture, and it still didn't work. If anyone could identify why this isn't working and help me make it work, that would be greatly appreciated. All self-made custom files are attached in the blendwaterfall.zip. The waterfall blend is called "blendwaterfall", and the opaque texture is called "waterfall002_opaque".
 

Attachments

  • blendwaterfall.zip
    94.3 KB · Views: 37
Last edited: