Best way to create multiple "layers" shown on top of a landscape

PierreSpace
Wed, 20 Apr 2022 15:31:35 +0000
Asset Creation

Hi, I am working on application where I need to overlay, on top of the surface of a Landscape, various texture (akin to layers in multilayer maps found in geographical information systems, GIS) to represents information such as slope, height, or terrain grid lines. I want the user to be able to turn these one or off, change their transparency levels (to show multiple and even re-order the “layer”.

As a first throw at this, I have created a few Material Function that use the Absolute World Position and VertexNormalWS to return the color (and in some case opacity) at a given location.

I have then created a Material (which I called M_Layered) that makes use of MaterialAttributesLayers, and I have created MaterialLayer for each information I want to display (ex: slope, gridlines, etc.). I also created a Material Layer Blend Asset (which I called RGBA_Mask) that blends 2 layer using an alpha value. I then add my MaterialLayers in the M_Layered material, and add my RGBA_Mask to each.

This works OK (I have not yet looked at how I am going to provide the user with a UI to set the “layers” order and transparency).

I am a newbie in Unreal, and I am wondering if there is a better or simpler way of doing this ? Are there limitations to this approach ?

Thanks !

1 post - 1 participant