Is there any way of merging heightfield masks?

   3513   5   2
User Avatar
Member
15 posts
Joined: Oct. 2019
Offline
I just have a number of very contrasting heightmaps that are made up of single slightly blurred lines that make up what are supposed to be rivers - I would like to merge them together if that's possible, I've used 'Heightfield_MaskExpand" but it only takes two inputs, and I'm sure that's not what it's for.

This is what they look like:

Attachments:
Screenshot 2022-12-15 131809.png (382.8 KB)

User Avatar
Member
2627 posts
Joined: June 2008
Offline
A "mask" is just a single 2D volume primitive with a name.
You could use an attribute wrangle to give each mask a unique name.
if(s@name=="mask"){s@name="mask_01";}
Then you can use a heightfield_combinelayers to add in multiple masks that get written out to a new volume named "mask".

Check the help card on combine layers.

There are probably other ways to do this as well...
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
15 posts
Joined: Oct. 2019
Offline
Thanks I'll give that a go, most of this is in VEX anyway

Isn't a mask just a grayscale bitmap applied to a plane though? That's why I thought it would be easy to combine them.
Edited by DavidB - Dec. 15, 2022 10:03:08
User Avatar
Member
463 posts
Joined: Nov. 2016
Offline
DavidB
Thanks I'll give that a go, most of this is in VEX anyway

Isn't a mask just a grayscale bitmap applied to a plane though? That's why I thought it would be easy to combine them.

Kind of but it's in voxel form. You should also be able to combine them in a volume combine with 'maximum' operation.
User Avatar
Member
8 posts
Joined:
Offline
It's probably a bit late, but I figured out a nice way to merge masks. Using an HF Insert Mask node from Labs, you can add mask layers with custom names quite easily into height fields, and then using an HF Combine Masks node mix them together to get what you want.

Hopefully this will be helpful for someone

Attachments:
InsertLayer.png (72.0 KB)

User Avatar
Member
2 posts
Joined: May 2022
Offline
WinterLight
It's probably a bit late, but I figured out a nice way to merge masks. Using an HF Insert Mask node from Labs, you can add mask layers with custom names quite easily into height fields, and then using an HF Combine Masks node mix them together to get what you want.

Hopefully this will be helpful for someone

Thank u so much, i was looking for this so long, glad that i found your post about this!
Much love )
  • Quick Links