Jump to content

Creating a material graph with TerrainLerp and Vegetation animation


photo

Recommended Posts

Posted

Hello,

In the base material, TerrainLerp allows to sample the underlying Landscape surface so we can blend a mesh with the ground. I've been thinking about using this to cleanly blend the small vegetation with the ground. Alas, the blend itself is not configurable, it's all or nothing.

So, is there a way to use this TerrainLerp in a custom material graph?

Ideally, I'd like to take the hue from the terrain and keep the saturation & lightness from the source texture.

Bonus: how do you replicate the vegetation animation of mesh_base in a material graph?

Thanks!

Posted

Hi Stephane,

Terrain Lerp option should be already available for shader graph materials:

image.png

but it's not configurable at all. The terrain texture will overlap custom material. In theory it could be solved, but it would require a lot of changes in already existing shaders and CPU code (including LandscapeTerrain / TerrainGlobal and graph implementation). There is a lot of things to do and I'm afraid they are not currently planned at all.

It is also currently unclear how to proceed with the vegetation state. There is a built-in replacement node available for that in the shader graph: Tree Animation, but it only functions effectively with float precision distances. For instance, if you place a tree far from the world origin (over 10 km), the tree animation may appear quite jerky. You can check example tree materials in the Art Samples. 

We are currently working on a fix that will enable the use of Tree Animation node in both engine variants; but so far I do not have an exact ETA for this feature to be implemented.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...