No announcement yet.

Lerping normal maps for use in landscape?

  • Filter
  • Time
  • Show
Clear All
new posts

    Lerping normal maps for use in landscape?

    Hello, I've searched everywhere and can't find the solution to this....

    I'm trying to create a landscape material all in one and am having a really difficult time masking out the normal maps via LERP. So for example, instead of using landscapelayerblend, I'm using a series of masked LERPs. So I want my rock normals to be where my rock is masked, and the soil normals for the soil mask, etc...

    It works fine for everything else (color, roughness), but not normals. I've included some pics of my graph.

    Is there a technical problem? (No errors given in UE4).
    Is there a much better way to blend normals without using landscapelayerblend?

    Instead of lerp you can just multiply normals with their weights and then add them together. Normal is normalized at the end anyway so you don't need to even care about is those weights summing to 1.
    Ps. Performance tip: If you weights are normalized. You can just sum up x and y components and calculate z at the end. This way you save a lot of math from not computing z for all those normals.