Hi,
I’m generating a heightfield from an Image Sampler: I create a point grid, sample grayscale values, remap them to Z, and build a Surface from Points. I’d like the black background to be completely ignored, so the 3D surface is created only from the remaining regions.
My goal is to get a surface only from the non-black area, with a clean boundary, so I can later turn it into a closed solid. I tried culling points by a threshold, but then Surface from Points breaks because it requires a full rectangular grid. I also tried a mesh approach (Deconstruct Mesh → Construct Mesh), but the topology becomes unstable and everything drifts/misaligns.
I’m attaching the .gh file and screenshots. Any help would be greatly appreciated—thanks!
Hello
if mesh and use of Nautilus plugin are OK here is a way with mesh Iso Splitting
The idea is to use MEsh Iso Splitting then connect naked edges (topology of 2 meshes MUST be the same)
Decon the mesh, get the centrepoint of each face, test for Z coord, use that to filter the face indices when reconstructing the mesh. I’ll give this a go…
But the method needs to be reworked to generate the infill “spine”
Instead of doing all the mesh work and then cutting, the mesh needs to be generated on the flat before cutting, then reprojected to both sides before doing the offsets. I can work on this later, but not now.
Hey @Tomaszko1, I know the topic is solved so I’m just sharing for future reference—prior to generating your height field, if it helps: there’s a handy import image component that brings in your image as a mesh with the colors, so you can quickly use them and keep only the faces with the brightness values you determine:
This works incredibly well. I’m very grateful.
Is it possible to drive an attractor using the generated cutting curve? I’d like to control the offset of the points shaping this structure based on the top edge — specifically, I want the top line to have the same thickness along its entire length.
I realize a major limitation is the Image Sampler input, but maybe there’s a way to work around it.
It’s a trade-off between a clean line in plan vs elevation, so yes you could have a consistent width, but it would be at a cost of an inconsistent profile. I didn’t take a screenshot, but when I tried it the profile became quite obviously a slice through a stepped mesh.
So you’re right - you’d need to massage the mesh near the boundary to tidy the edge up. Ideally you’d be in the flat phase to collect the data for which vertices to move, based on distance to the splitting curve, then blend those weights with the image sampler output. This would avoid doing any modification to the actual displaced meshes, which would get messy.
I don’t have time to experiment right now, but there’s definitely a way through.
Here you go. You can play with the Blend Width slider and graph mapper to get the fall-off curve you want. The “spine” width is 2x the minimum offset parameter.