Reading Layer Information from Landscape Material to HDA

   1693   2   0
User Avatar
Member
11 posts
Joined: 4月 2017
Offline
Hey y'all!

I am trying to create a tool that allows me to place plants onto a terrain using the layers from the landscape material. Has anyone figured out a way to read the paint information from the landscape mat and pass it to an HDA?

Thanks!

Jim
Jim Watson
Senior Technical Artist
Bend Studio - Sony Interactive Entertainment (SIE)
User Avatar
スタッフ
534 posts
Joined: 9月 2016
Offline
Hi,

If a landscape has layers, they will be available as masks on the Heightfield created by a landscape input.
ie: layer “grass” will be avaialble as the “grass” mask in Houdini.

So you simply just need to use a landscape input.
User Avatar
Member
11 posts
Joined: 4月 2017
Offline
Dude! Super nifty, thank you. I wasn't able to see the layer information when making in Houdini, but when I coded it in, it worked like a charm.

For anyone who is wondering, the simplified version is once you have converted the heightfield to geometry in Houdini, the layer information is transferred to the points. Simply put a point wrangle in and write something like this:

if(f@grass_layer > 0 (or input your own threshold))
{
//run code you only want to run on the grass layer
}
else
{
//run code you want done to the other layers
}
Edited by Technically_Jim - 2020年8月17日 16:03:30
Jim Watson
Senior Technical Artist
Bend Studio - Sony Interactive Entertainment (SIE)
  • Quick Links