Jump to content
lozruh

Extracting Isosurface as Curves

Recommended Posts

Hi There,

I am trying to extract isosurface from a geometry as curves so that I can manipulate it in another software - Rhino -. I was wondering if there is any procedural way to do that as my geometry will be keep changing.

With my limited knowledge, I thought of trying to somehow convert the black areas into continuous - ideally closed - curves. But I am open to any other suggestion.

The only constraint for me is for these contours to be three dimensional and organic as in the crappy image below. In the multi-color image that would be equivalent to getting a boundary curve for each color.

I have also attached the houdini file

Thanks

Levent

 

isoCurves.thumb.jpg.b0f3990b52aec08b90f77fd8e7532778.jpgisoCurves.thumb.jpg.b0f3990b52aec08b90f77fd8e7532778.jpg

 

 

isosurfacetest.hiplc

isosurface.png

Share this post


Link to post
Share on other sites

Hey @konstantin magnus, great solution for the contour lines. Thanks for sharing! I'm studying this exact subject and arrived at a similar place but through a different process. However, I have a question regarding this idea of extracting contour edges/lines from meshes and how to create faces from the contour lines.

So this is what I tried...On a high-res mesh box, I add a mountain sop and then I use a copy and transform sop connected to the initial box decreasing its scale and creating copies in a way that all copied and transformed boxes "cover" and slice the box with the mountain noise. After that, I use a boolean sop set to "seams" and the result I get is the contour lines.

However, I'm struggling to find a way to create faces from those contour edges. My goal is to create a topographical terrain or a model where the contour lines are actually extruded steps. I understand how to achieve the extruded steps terrain on a 2D mesh using a boolean sop but on a 3D mesh is a different story. Attached are images showing where I landed with my exercise and the reference showing what I'm trying to achieve. The reference is in 2D but I would like to achieve the same effect on a 3D mesh.

Would you have any recommendation on how to create a 3D model with the same aesthetic as the reference image or possible routes I could try? I tried extruding the initial box inwards to cover all lines and then connect a boolean sop set to subtract but no success. I wonder if the open lines are messing things up. I also tried poly fill and cap sops as a last resort but nothing.  Any help is greatly appreciated. 

meshcontouredges.png

1a.PNG

ContourLines.hip

Edited by Rival Consoles
adding hip file

Share this post


Link to post
Share on other sites

Hi Rival,

interesting topic, although decorating round shapes with flat slices comes with collisions (activate split along UVs for comparison). Here is a quick sketch on averaging normals, positions and distances for every piece, then projecting the extrusions to individual planes.

slices.jpg.2882c2933fdb117d23ff7049f4b114b3.jpg

slices.hiplc

Share this post


Link to post
Share on other sites

Hi Konstantin,

Thanks for chiming in on the idea. I'm still trying to get the look i'm going for and your file gave me some ideas for other things that are not quite related to this which is great. Nothing like studying Houdini through hip files. I'll keep trying.

Cheers

Share this post


Link to post
Share on other sites

I was trying to slice the VDB inside its depth and do booleen but can 't get for a now a nice result in a quick way.

In the second case, i clip the sdf

 

Im sure there are some way . The two other way i was thinking were

- Render a spherical cam inside using depth image, import it in COP and trace the image slice by slice with a solver

- work in a flat 2d voxel heighfield base and wrap back ...

 

 @konstantin magnus suggestion are always great :)

 

image.thumb.png.b05080fd16611d6d52516491a9a28dea.png

image.thumb.png.9246b0a0cecd240b713b5a964ff2025f.png

Share this post


Link to post
Share on other sites
36 minutes ago, vinyvince said:

trying to slice the VDB

volume_slices.jpg.3032f022e66be90a107bf87801299716.jpg

You could sample the volume again based on rounded position values:

float slices = chf('slices');
vector pos = v@P;
pos.x = rint(pos.x * slices) / slices;
f@surface = volumesample(0, 0, pos);

 

volume_slices.hiplc

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, konstantin magnus said:

volume_slices.jpg.3032f022e66be90a107bf87801299716.jpg

You could sample the volume again based on rounded position values:


float slices = chf('slices');
vector pos = v@P;
pos.x = rint(pos.x * slices) / slices;
f@surface = volumesample(0, 0, pos);

 

volume_slices.hiplc

Here we go, Rival you own Konstantin's a beer :)

Share this post


Link to post
Share on other sites

Now come the same problem to for example compute the gradient. Knowing you could only compute one direction gradient,  how will you combine the 3 directions, in a like triplanar way or spherical way (my suggestions above).. that's the hard part, maybe it's also hardly make sense, i though its was What Rival wanted no?

@konstantin magnus

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×