Due to an ongoing thread at the Polycount boards about the snow and ice of Uncharted 2, I replicated Paul Greveson aka MoP’s vertex blending material in Unreal.
This is my result:
![Snowblends Snowblends](http://www.laurenscorijn.com/wp-content/uploads/2009/12/Snowblends-500x328.jpg)
The tank tracks are another type of blend, this one’s about the snow on the ground.
I was asked to post my node layout on my blog, so here goes:
![vertexsnow001 vertexsnow001](http://www.laurenscorijn.com/wp-content/uploads/2009/12/vertexsnow001-500x224.jpg)
The base mask for snow coverage is calculated by using the Red vertex color channel (you can easily paint onto one channel only in UDK, great feature!) and a heightmap. These are combined together to create a transition effect with the heightmap, where the vertexcolors fade out. Clamped at the end to prevent extreme values, just for safety.
![vertexsnow002 vertexsnow002](http://www.laurenscorijn.com/wp-content/uploads/2009/12/vertexsnow0021-500x367.jpg)
Using the Green vertex channel, we calculate a varying number for the mask’s hardness. 20 is the ceiling value, a 1 is added to prevent powering to 0 (bad). The invert on the vertex color is just to make sure the default value is hard (default vertex color is 1,1,1,1).
![vertexsnow003 vertexsnow003](http://www.laurenscorijn.com/wp-content/uploads/2009/12/vertexsnow003-398x500.jpg)
Both groups are combined by powering the raw mask to the hardness value, adjusting the contrast. Clamped for safety, though technically not necessary since we’re only powering a value of max 1to20,resulting in a 1 anyway.
![vertexsnow004 vertexsnow004](http://www.laurenscorijn.com/wp-content/uploads/2009/12/vertexsnow0041-500x353.jpg)
The mask is used on 3 LinearInteroplate nodes, to blend between snow and non-snow diffuse, spec and normals. Since I had the heightmap anyway, I just used it for a quick parallax effect on the diffuse (I should apply it to normals as well…).
![vertexsnow005 vertexsnow005](http://www.laurenscorijn.com/wp-content/uploads/2009/12/vertexsnow005-500x221.jpg)
Total material. Nothing too complex, only 63 instructions which really isn’t expensive.
I recommend doing this in UDK only, since painting vertexcolors is incredibly easy there.