Adding vertex colors to a Source 2 model using Blender

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)
This article or section is a stub. You can help by expanding it.
Todo: Improve the grammar of the article and add to its content (for example, add info about skipping the second step in Counter-Strike 2, since its shaders automatically find the necessary color attributes).

A quick guide on how to add vertex colors to your model in Source 2 using ModelDoc and Blender.

Note.pngNote: Requires basic knowledge of vertex painting in Blender and creating simple models in ModelDoc.

Step 1. Vertex Painting

In Blender, switch to vertex painting mode and add the desired colors to the desired parts of the model.

Step 2. Renaming a data stream

  1. Open your model via ModelDoc.
  2. Right-click on the render mesh.
  3. Find and select Add RenameStream.
  4. Click on RenameStream under the desired mesh and fill in the nodes as shown below:
  • From Name: color$0
Note.pngNote: Digit specifies the slot for vertex painting in Blender, so instead of 0 (first slot), it can be anything if your model has more than one slot.
  • To Name: VertexPaintTintColor$
Changing the data stream to vertex colors

Step 3. Enjoyment

Supported shaders

List of shaders for various Source 2 applications that support vertex colors on models.

Application Shader(s)
Counter-Strike 2 Counter-Strike 2 Csgo Environment
Csgo Simple
Half-Life: Alyx Half-Life: Alyx [Todo]
Dota 2 Dota 2 [Todo]
SteamVR Home SteamVR Home [Todo]

See also