Terrain Heightfield Masks flatten...

   6464   7   2
User Avatar
Member
23 posts
Joined: July 2015
Offline
Hi,

I'm using the new terrain heightfields operators and I want to flatten the terrain where I want to place buildings. I use the Mask by Object operator to mask to location where buildings will be placed.

The effect I try to acheive is the every contiguous patch of red (mask) on the terrain would be flattened using it's local center.

I tried using a for loop to loop on the primitives in the input Mask by Object but then I can't get the average height of each masked out sections in a voxel.

How would I go about flattening each of my masked out areas by using their local average?

Thx!
Christian

Attachments:
EHoudiniScene-H16CityGenerationRevival-01.hip - Houdini Core 16.0.504.20.jpg (159.9 KB)
EHoudiniScene-H16CityGenerationRevival-01.hip - Houdini Core 16.0.504.20_2.jpg (60.4 KB)
terrainSide.jpg (13.1 KB)

User Avatar
Member
280 posts
Joined:
Offline
like this?

Attachments:
terrain.hip (396.0 KB)
terrain.JPG (142.4 KB)

User Avatar
Member
16 posts
Joined: Dec. 2014
Offline
Hey Patar, your response was very close to what I'm also looking to do however in my case I do not have the elevation of the plots I am trying to flatten. What I have is a triangulated mesh, created from a point cloud. I'm using a point VOP to select and delete the points beneath the shapes I would like to flatten. Using remove point within the point VOP creates holes in the traingulated mesh beneath each shape. I use another triangulate node after the VOP to cap the holes created. What this does is effectively flatten each shape's corresponding plot on the triangulated point cloud to the elevation of the seam left after deleting the selected points. Whereas in your example you are flattening the terrain to the elevation determined by the building shape (in my case I am attempting to do the opposite, my building shapes are flat in Y). The reason I am doing this is because my scan includes building heights, so deleting the mesh points corresponding to the building shapes gets me a terrain mesh without the buildings, or an approximation of a ‘bare earth’ mesh. My current implementation works correctly for my needs however using two triangulate nodes on a very large mesh results in long cook times. My thought in replacing with height fields is that I could get significantly faster and similar results. Any tips or tricks in this regard are much appreciated!

I appologize for the wordy explination but I can not post files or screen grabs due to NDA. If things aren't clear enough I can create a simple hip file demonstrating my question.

Thank you,
-Mat
User Avatar
Member
280 posts
Joined:
Offline
maybe if you like i can do a teamviewer session for you so i can see on the spot without violating your nda
its kinda hard to picture without seeing the scenes…
but at least may e you can send me a simplified scene with your scenario…the asset it self doesnt need to be from your project….
User Avatar
Member
16 posts
Joined: Dec. 2014
Offline
Thanks for the reply Patar! I'll see about setting up a simplified file and post it here, that way we can benefit others who might come across this post

Cheers!
-Mat

(Edit: file added)
Edited by Mat Suarez - April 25, 2017 12:52:33

Attachments:
bare_earth.hip (213.4 KB)

User Avatar
Member
280 posts
Joined:
Offline
sure what ever is best for you
User Avatar
Member
23 posts
Joined: July 2015
Offline
patar
like this?

Wow this is great. Thx a lot. Sorry for the late response…
Thank again!

Christian
User Avatar
Member
280 posts
Joined:
Offline
Mat, heres what you have to do in your case you have to select those point that you dont want in your terrain(may it be a point cloud of buildings or trees or everything else)…
and since this is houdini you can use what ever tools houdini have to select them and blast it away you can use multi bunding box, paint selection etc… its not restricted in the HF terrain tools… this is where houdini shines compares to world machine.
and blast it and generate the triangulate mesh from it and then re-project it to the height field terrain.
  • Quick Links