heightfield terrain questions

   8721   11   0
User Avatar
Member
194 posts
Joined: 8月 2011
Offline
Hi, so, i finally got around to checking out the heightfield stuff yesterday. I love what I am seeing so far, but I have a couple of questions.

So, in order to get different materials on my different layers, i'm gonna need to attribute create “unreal_material” prim/detail attribute on each layer? is this correct? I see, for instance, a layer called “cliffs” would be listed as “@cliffs” in the group dropdown box of a node. So, a layer can essentially act like a group if you call it “@layername”?

is there a quick way to make heightfield_visualize colors showup in unreal? It seems to come in as only a checkerboard pattern. Also, is there a way to get each layer exposed to add materials separately inside unreal? someway i could avoid a punch of copy/pasting text and typing until i actually figure out what materials i want to use?

my other question has to do with scattering and instancing. i tried to isolate a layer and throw down a scatter node, but the problem i see is that the scatter node doesn't scatter with y information. It only scatters in the x-z plane. what can i do about this? do i need to convert to polys before scattering? is there a better way that I haven't noticed?

thanks
Edited by twelveplusplus - 2017年3月31日 15:05:08
User Avatar
スタッフ
550 posts
Joined: 9月 2016
Offline
Hi,

So for the landscape/layers workflow, the best workflow is to simply use a single landscape material.
All heightfield layers / masks will be translated to Unreal as a Landscape layer when you import the HDA, so your cliffs mask in Houdini will become a cliffs layer in Unreal.

You can then set up your landscape material to use that layer, and for example use it to draw a rock texture on the cliffs.

In houdini, you'll simply need to add an “unreal_material” attribute, with a ref to that Landscape material to have it set up automatically.

For the heightfield visualize, for now, there is no easy way to get that in Unreal.

Finally, for the scattering, heightfield_scatter is what you're looking for I think.
User Avatar
Member
194 posts
Joined: 8月 2011
Offline
ok, thanks I missed the heightfield scatter node. looks good.

I'm still a little foggy on setting up the landscape material. Do I need to specify the different layers from the material blueprint in unreal? I think i tried that but i got strange results.

is there some example I can look at?
User Avatar
スタッフ
550 posts
Joined: 9月 2016
Offline
Hi,

So the way you handle the layers should be done exactly like standard Unreal Landscape Material.
You use a Landscape Layer Blend in your unreal material, and set the layer name to the houdini one
(mask, bedrock, cliffs, water etc…)

I've attached a screenshot of a simple landscape material, applying a different color for each layer:
bedrock, water and debris.

You can then use a “unreal_material” attribute to assign it, or simply override it on the asset by changing the landscape material in the details panel (under Houdini Generated Meshes).

For more info, I'd recommend you have a look at:

https://docs.unrealengine.com/latest/INT/Engine/Landscape/QuickStart/4/ [docs.unrealengine.com]

Attachments:
LandscapeMaterial.PNG (1.1 MB)

User Avatar
Member
118 posts
Joined: 2月 2016
Offline
dpernuit
Finally, for the scattering, heightfield_scatter is what you're looking for I think.


hello,
is there any way to convert masks to groups or attributes once the heightfield is converted to polys?

I believe that it might help to have more control over the scattering of objects onto the landscape.
User Avatar
Member
194 posts
Joined: 8月 2011
Offline
thanks i got it working, i think i was running into a bug that got fixed in the latest build? i was pretty much setting up the material correctly, but i was getting odd results.

I updated to 570 and rebuilt the asset and it all looks as expected now. thanks for the help
User Avatar
スタッフ
550 posts
Joined: 9月 2016
Offline
Hi,
@twelveplusplus: Yes, there was a bug that I fixed recently that made the layers rotated by 90 degrees in Unreal, so that may be the issue you ran into!

@Andr1: What are you exactly trying to do? Are you trying to output landscape or input them to Houdini?

If you generate your heightfield in Houdini, you can use heightfield_scatter on the different masks/layers and you don't need to convert the landscape to polys for that.

If you're thinking about the landscape input, (sending the landscape as a mesh to houdini), then you can use heightfield_project to convert the mesh to a heightfield.. then use the heightfield node on it.
User Avatar
Member
194 posts
Joined: 8月 2011
Offline
so, now everything looks good, but when i go to save the level, unreal crashes… and doesn't save the level.. anyone else having a problem like this?
User Avatar
Member
118 posts
Joined: 2月 2016
Offline
dpernuit
@Andr1: What are you exactly trying to do? Are you trying to output landscape or input them to Houdini?

If you generate your heightfield in Houdini, you can use heightfield_scatter on the different masks/layers and you don't need to convert the landscape to polys for that.


I generate my heightfield in Houdini and once it's converted to polys, I'd like to have the masks converted to groups as well (or to a float attribute 0-1 in order to take in account also the blurred borders of the mask).

So, for example, once I have converted the mask “plateaus” to a primitive group, I can use some custom vex code to create a density attribute for the scatter node, or I can analyze that area with the measure sop, so that if the plateau is bigger than a certain value, a bunch of houses is scattered on it, otherwise a forest would take place.
User Avatar
Member
5 posts
Joined: 2月 2018
Offline
Hi
After I input the HDA file into UE4 ,all the landscape layers are filled ,I found a lot of missing textures. I have no idea

Attachments:
bug01.JPG (88.5 KB)

User Avatar
スタッフ
550 posts
Joined: 9月 2016
Offline
Hi,

That might be an unreal issue, seems like some of the landscape components fail to update…
Could you send me your hda so I can have a look?
User Avatar
Member
5 posts
Joined: 2月 2018
Offline
Thank you dpernuit,I add heightfield clearlayer node to remove some default layers and reimport into UE, then landscape missing texture is fixed. But I still not very clear about how to control the every default layer mask information, can I adjust the default layer mask like debrock, mesa for example.
  • Quick Links