1

I have grass on my terrain.

enter image description here

The terrain is textured by a single Image texture which is simply dropped onto the terrain.

The grass is created using a hair particle system.

How do I make the grass take on the colour of the terrain below it? For example, where the terrain is white I'd like the grass to be white, where the terrain is green I'd like the grass to be green, etc.

Below is my terrain shader setup. As you see it's as simple as it gets.

enter image description here

Joehot200
  • 592
  • 2
  • 7
  • 28

1 Answers1

2

Copy the shader you used for your terrain onto your grass, but use "object" texture mode instead

Final result: enter image description here

Terrain shader: enter image description here Grass shader: enter image description here

While you could choose to apply the terrain texture directly, I chose to multiply the original grass texture with the terrain texture. This way, the grass retained it's colour but would be lighter where the terrain is lighter and darker where the terrain is darker, as seen in the image above.

The best way to experiment is to make a plane and use your grass shader on the plane to check it matches up with your terrain. I had to tweak the texture coordinates quite a bit.

Before: enter image description here After: enter image description here

Joehot200
  • 592
  • 2
  • 7
  • 28