Announcement

Collapse
No announcement yet.

Applying Landscape Grass Outputs to specific altitudes (World Height) and slope angles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Applying Landscape Grass Outputs to specific altitudes (World Height) and slope angles

    I post here in the hope of receiving help.

    I have a material, applied to a landscape. The material itself has two layers, identified via the Landscape Layer Blend node. This gives me two distinct 'biomes' and this works fine.

    In addition, I am populating scatter/foliage on each of these Landscape Layers using two pins on a Landscape Grass Output node, as illustrated below:

    Click image for larger version

Name:	LandscapeGrassOutput.PNG
Views:	530
Size:	21.5 KB
ID:	1687008

    This achieves the expected result of populating the different grass type assets to each Landscape Layer. It does this in a uniform way and 'thins' the grass type assets based on the layer weight. Essentially, where the two layers meet, this achieves the effect of transitioning between grass types. So far, so good.

    However, the grass types populate in a uniform way across a single, full-weighted layer irrespective of altitude and slope angle. To take this further, I'd like to add some logic that ensures grass type assets populate in a more realistic way.

    What I want to achieve is to:

    1. Restrict grass type assets from populating on the Landscape Layer where a certain slope angle is breached.
    2. Restrict grass type assets from populating on the Landscape Layer outside of certain altitudes.

    I think (actually, whilst writing this - gave it one more try) I have managed to achieve #1, following the logic on the following thread: https://forums.unrealengine.com/deve...pe-angle-in-bp

    In my map, I am only interested in clipping the grass type assets above a maximum angle. This seems to be working.

    If anyone can provide any guidance on how to implement #2, which concerns preventing the spawning of grass type assets based on altitude/world height, I would be so grateful. In this case, I am looking to clip both at a maximum altitude and a minimum altitude.

    #2
    Because those layer cost next to nothing if they arent accompanied by a texture set for the landscape, you can create several types of grass and paint them at will.
    You just need to remember to subtract the interacting ones.

    So grassland pin - dead grass = final grass layer
    Dead grass - grassland = final dead grass

    Doing calculations for the material (an auto mateial) is performance heavy. But.

    Absolute world position > mask G > subtract.
    Scalar of world z.
    > divide
    Scalar for Fallaff Amount.
    > clamp.
    Subtract layers.
    >
    Final pin output.

    I would suggest you just paint stuff manually for performance sake.

    Comment


      #3
      Originally posted by MostHost LA View Post
      Because those layer cost next to nothing if they arent accompanied by a texture set for the landscape, you can create several types of grass and paint them at will.
      You just need to remember to subtract the interacting ones.

      So grassland pin - dead grass = final grass layer
      Dead grass - grassland = final dead grass

      Doing calculations for the material (an auto mateial) is performance heavy. But.

      Absolute world position > mask G > subtract.
      Scalar of world z.
      > divide
      Scalar for Fallaff Amount.
      > clamp.
      Subtract layers.
      >
      Final pin output.

      I would suggest you just paint stuff manually for performance sake.
      I know some time has passed - I just wanted to come back and say thank you for your reply/input.

      I am going to try out the logic you have suggested and see how the performance works - for me, it is as much about learning/understanding the ways to achieve things at this stage. Thank you!

      Comment

      Working...
      X