rFactor2 "Blended grass infields" Shader

The "blended grass infields" shader can blend two different textures and reduce the tile effect.

Simple, Free Image and File Hosting at MediaFire

What is stages and map channels?

Stages: Stages as like a layer in Photoshop. If you play with blend modes in PSD you can see multiply like in shaders.

Map channels: When do a UVW mapping the coordinates will store in a specific channel number. We can do different uvw mapping for same object.

A stage uses a channel but also can use a channel already used by another stage. Some shaders do not allow you to choose other channels.

"blended grass infields" shader description:

Stage nÂș Description Map Channel
1 Grass Texture T1 1
2 Grass Texture T2 2
3 Detail Grass (mult) 3
4 Detail Specular (Add) 3
5 Normal map (bump) 2

The T1 and T2 are used for coloring the detail grass (stage3). in game you will see a mix ( t1, multi, specular and bump). when you're near the grass you see a detail grass, when you're away you see something similar to texture of T1 or T2.

Setup the object:
The object need 3 uv maps channels.
Channel 1: Uses a larger scale that of the detail grass. No matter if the texture looks big.
Channel 2: Same of channel 1 but can rotate or change the scale a bit.
Channel 3: Use a natural scale to match the real grass size.

How to Blend two textures:
To do the blend effect need to use Vertex Alpha. Vertex Alpha are values 0% to 100% for each vertex (vertice). In editabe Poly look in "vertex properties" then change the value for selected vertex and you see it in max a dark zone.

To blend textures change vertex alpha to 0.0. In game the vertex with zero will show grass Texture T2 the vertex with 100 will show T1.
When do a blend of diferent objects is important to the both objects must share the same UV map in channel 3 (detail) Why? to the detail grass match in both objects.

"blended grass infields" shader have another cool effect the alpha mask.

Simple, Free Image and File Hosting at MediaFire

Alpha mask is the alpha channel in texture image.


What the mask do? The grass detail texture only show in white areas the black will show the T1. The mask can be used in large grass texture do avoid detail grass in dirty areas.

Simple, Free Image and File Hosting at MediaFire

Pratical case.

Blend edge to open grass field.

Setup of edge:






Simple, Free Image and File Hosting at MediaFire Simple, Free Image and File Hosting at MediaFire