Correctly Export Terrain Layers as Masks for UE4 Material LayerBlend

   14890   11   2
User Avatar
Member
33 posts
Joined: April 2017
Offline
Hello community, I have a couple of questions please, I have created a Terrain01.HDA with some layers:

- A mask layer to select a slope interval.
- The Erode node produces layers like: Bedrock, Water, Debris, etc.

I want to use those layers in the LayerBlend in UE4 Landscape material but once I import Terrain01.HDA in UE4 only 2
LayerInfo are created: bedrock, mask !!! what happened with the other layers??? how do I correctly export them??

also what if I want to create more than just one mask but: MASK1, MASK2, MASK3 etc , how can I create these layers in Houdini,so that they produce the LayerInfos correctly???

Thanks in advance….

Attachments:
TerrainHoudini.png (421.8 KB)
MaterialUnreal.png (668.1 KB)

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

All layers present on the Heightfield in Houdini should be available as landscape layers when the HDA is imported in Unreal. There is, however, one exception to that:
If the layer/mask is “flat” (only one or no value), Unreal will just ignore it…

In your hda, the water and debris layer are not present because of this.
(it's certainly due to the fact that you're exporting the first frame of the erosion, you can use a timeshift node to export later frames in the hda)
Or, you can check this by adding noise to the missing layer, and they should be available in UE.

If you wanna create your own mask, mask2 etc.. you dont have anything special to do, they'll be converted to Landscape layers in UE4 if they contain information.

Let me know if you have other questions about that.
User Avatar
Member
33 posts
Joined: April 2017
Offline
The erosion node now exports correctly Thanks a lot dpernuit, as for the multiple separated masks question, what I don't understand is which node is used to create the name for the layers(or do I have to create them with Vex??)…
Edited by apaza610 - June 5, 2017 01:23:45

Attachments:
MultipleMasksQuestion.png (347.2 KB)

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

You can use the “Heightfield Copy Layer” for that:

MaskByFeature will create data in “mask”, use copy Layer to copy its data to “MyMask1”
You can then use a second MaskByFeature to create new data in “Mask” (be sure to have its “combine with existing” parameter set to replace to ignore the previous data in Mask), which you can then copy to “MyMask2” with the copy layer node … etc..
User Avatar
Member
33 posts
Joined: April 2017
Offline
Thanks again dpernuit, that worked great and solves my questions, have a good day
User Avatar
Member
5 posts
Joined: Feb. 2018
Offline
Hi all
I just export the landscape into UE4 with all of the layers info, but I don't know how to make higher resolution of these layer mask

Attachments:
{4B886799-B31F-426C-86F6-20E181D8C1C5}.png (1.1 MB)

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

In Houdini, the resolution of the layers/masks are tied to the resolution of the heightfield itself, so you probably wanna create a higher res heightfield in houdini.
User Avatar
Member
5 posts
Joined: Feb. 2018
Offline
Thank you . I Add the resample node and it looks better
User Avatar
Member
15 posts
Joined: Oct. 2018
Offline
This works pretty good, but I have a quesion about the weight maps itself.
In Unreal the weight is mapped from 0-1, so you can layer different kind of materials. Well, sounds great, but to be honest I can't see so much usage for this.

For example you want to blend grass on top of the bedrock layer by using the slump mask output, you will see most of the time both materials, because the values given by the mask are somewhere in the mid range. This isn't really realistic at all. When I want to have grass, I need a weight of 1, bluring towards the edged to get a better blend.

For this I have to remap the weight values, but I don't know how. Is this even possible in Houdini?

Well, I could just use a COP2 Network to enhance my weight maps, but I use the Houdini Engine to import my landscape into Unreal, so I have (no) control over the import process.

The question is - am I wrong and this bevaior is totally fine, or am I right and I have to remap the weight values. If I am right, how can I do this?

Best regards
User Avatar
Member
38 posts
Joined: June 2019
Offline
Agree, layers seem washed out and at 50% opacity like if the weight is 0.5 and not 1
User Avatar
Member
2 posts
Joined: Sept. 2018
Offline
How to set the attribute_create in houdini to export ue4 terrain layers?
User Avatar
Member
47 posts
Joined: April 2020
Offline
Gumminerd
rong and this bevaior is totally fine, or am I right and I have to remap the weight values. If
edit : it appears unreal has two types of layer masks. weight blended and non-weight blended. WB is the default and it'll never let the combined layers ever get above 100%, so if you had two layers both set to 100% on a pixel, they'll be capped at 50% each. so to get around that make sure if you have an opaque pixel to have the other layers not be opaque in that same pixel so the opaque one can actually be fully opaque. Or you can use the non-weight-blended layer i assume but that's usually not wanted for material blends.

also, if you wanna try out the non-weighblended layer, you have to have this detail attribute set on your terrain. the docs say it's a string of all the layers that shouldn't be weight blended with spaces between : https://www.sidefx.com/docs/unreal/_attributes.html [www.sidefx.com]

setdetailattrib(0,"unreal_landscape_layer_nonweightblended","forestPlants","set");
Edited by indigosm - June 3, 2021 16:04:56
  • Quick Links