Using 4Way Blends

Posted Dec 29, 2016
Last Updated Dec 29, 2016
Using 4way blend

Support for the Lightmapped_4WayBlend shader was added to Wall Worm in 2016 to accomodate some of Black Mesa's art goals. This shader is not available in all branches of Source. At this time, the games it works in includes at least Black Mesa and Counter-Strike: Global Offensive. See the VDC for more information on the Lightmapped_4WayBlend shader.

The display shader for Lightmapped_4WayBlend in 3ds Max requires 3ds Max 2015+ and also requires that the display driver is set to Nitrous DX11. Older versions of Max or other display drivers (like D3D) are not supported. For best results, make sure you have WW 2.947+.

Creating 4Way Blend Materials

Required Global Setting

To generate Lightmapped_4WayBlend shaders you must first set you global settings to use this shader.

  1. Click Wall Worm > Wall Worm Settings
  2. Open the Materials Tab
  3. Set the Default Multiblend Shader in the Material Generators section to Lightmapped_4WayBlend
  4. Save the settings

Creating Lightmapped_4WayBlend Materials

The VMT exporter will automatically export any Composite Material to a Lightmapped_4WayBlend if your global settings have that as your default.

To start the process of making a Lightmapped_4WayBlend material, first create four Standard Materials that will reperesent the four textures in your material and pipe them into the first four slots of a Composite Material. Note that the Base Texture slot will represent the $basetexture. The next three slots will represent $basetexture2-4.

All maps in each slot will get input into the Lightmapped_4WayBlend VMT. This means that the each material's textures will be added to the VMTs texture list. It is up to you to include those textures that are allowed in any slot: for example, CSGO's implementation does not like the inclusion of $bumpmap3,  etc.

Once the composite material is made:

  1. Assign the Composite Material to an object in the scene
  2. Select the object you assigned the Composite Material to
  3. Click Wall Worm > Wall Worm Materials > Concert Blend/Composite to DX Shaders
  4. Open the Material Editor
  5. Click the Pick Material
  6. Pick the object with the Material
  7. Double click on the Direct X Shader that the composite material is now going into
  8. Change any settings in the DX shader to make the material work as you want

Exporting the Lightmapped_4WayBlend VMT

Once you have the VMT working as you would like, you can export it by selecting any object that has the material applied to and click Wall Worm > Wall Worm Exporters > Export Brush Textures.

Painting 4Way Blends

The Lightmapped_4WayBlend shader will utilize Vertex Colors stored in Map Channel 10. You can add a Vertex Paint Modifier manually or you can select an object and click Wall Worm > Wall Worm Level Design >  Paint Multiblends.

When Painting the 4Way Blends, you can control which texture(s) will be affecting a vertex by opening the color picker in the Vertex Paint tool and using the Red, Green and Blue Channels as controls. Each color represents how much to apply that texture to the painted vertices.

  • Black (RGB all at 0) paints the $basetexture
  • Red paints $basetexture2
  • Green paints $basetexture3
  • Blue paints $basetexture4

You can paint multiple textures by mixing multiple color channels at once.

Working With Displacements

When you are painting 4Way Blends onto a sculpt mesh, remember that the actual displacements that get exported into the game will not get 4way blending until after you have clicked the Commit Sculpt Mesh function.