Landscape Layers giving unexpected results

   2444   3   3
User Avatar
Member
25 posts
Joined: June 2020
Offline
Hi there!
I've created a basic heightfield terrain with layers and brought the HDA into UE. Everything is hooked up right and showing up, but the layer blends are not what I expect. There are 3 layers here colored Red Green and Blue. Using the heightfield quickshade node in Houdini, you can see that the layers stack... so the Red layer (which is more or less covering the whole terrain) is overridden by the green and the blue. However in UE, the colors don't stack the same way. I suspect that under the hood, the layers are added up and divided out so they equal a value of 1... so where my red mask AND my blue mask have a value of 1 they each end up with a weight of .5 in UE. Is there a way around this? I'd like to have it stack just like it does using the quickshade node in Houdini.
Thanks!

Attachments:
TerrainColors.jpg (312.5 KB)

User Avatar
Staff
534 posts
Joined: Sept. 2016
Offline
Hi,

You're right, layers work differently in Unreal than in Houdini.
Basically, layers are weightblended and their total values add up to one.

https://docs.unrealengine.com/en-US/BuildingWorlds/Landscape/Materials/index.html [docs.unrealengine.com]

You could try experimenting with "unreal_landscape_layer_nonweightblended" to see if you could get what you want.
It's a primitive/detail attribute that expects the names of the layers (separated by spaces) that should not be weight blended.
User Avatar
Member
25 posts
Joined: June 2020
Offline
Thanks for the response!

I used the attribute you described above and set all of my layer blending in UE to LB_Alpha_Blend and it does indeed match the look of Houdini.

The issue now is that in order to paint on the layers in UE, you have to work with them as stacked layers rather than weighted... so erasing away the layers above to reveal the layers below which is kind of tedious and confusing.

I wonder if anyone has worked out a clever way to do the weighted math on the masks in Houdini, pre-export, that would be required to get the same look in UE as houdini but with a completely weighted approach. I guess it would need to take max of the layers above it and the subtract that from the original layer?

ex, for a landscape with three layers:
mask for Layer0 = Layer0 - max(Layer1, Layer2)

Any suggestions? I'm very new to Houdini, I'm guessing this is a COPS operation?

Attachments:
LayersWorking.jpg (145.9 KB)
Solution.jpg (113.4 KB)

User Avatar
Member
16 posts
Joined: Oct. 2018
Offline
If someone is still looking for an answer to this, I found a way how to do it.

If you only have 3 layers and Layer1 is your bottom layer, then you have to subtract Layer2 and Layer3 from it, then subtract Layer3 from Layer2.

There's probably some way to do it with VEX using the Volume Wrangle, but if you only have a few layers you can just use the Volume Mix nodes. Make sure to clamp the minimum and maximum or it will look different in Unreal.

Attachments:
Screenshot_2021-04-23-18-34-02.jpg (534.4 KB)

  • Quick Links