Jump to content

How to extract a clean curves from a SOP clip cut ?


Recommended Posts

Hi Guys,

I want to extract the intersection curves of 2 polygon mesh.

I get correct result with the SOP cookie > crease option, but it is slow and base on a node i don't trust that much ... :)

I would like to replicate this by using a SOP clip, i have suceed to extract the section i want , but i am struggling to extract a clean curves from this,

If you have any idea that would be great !

Thanks for your time !

E

 

curve_from_cut.hiplc

Link to comment
Share on other sites

ok sorry to intercept this guys but, i was searching this for a long time now, how on hell you can fiund "delete edges but keep boundary ones" in "Divide SOP" ??? 50% of tools in houdini are spreads over toons of SOPs with not so desciptive name.

Do someone ever wrote a SOP Visual Guide or something ???

Link to comment
Share on other sites

edge_to_curve.gif

Here is how to fix Divide SOP limitation about open geometry:

// Point Wrangle.

#define ALMOST_ZERO 1e-6

vector4 plane = chv("../clip2/dir");
plane.w = ch("../clip2/dist");

float dist = abs(@P.x * plane.x + @P.y * plane.y + @P.z * plane.z - plane.w);
if (dist > ALMOST_ZERO)
{
    removepoint(0, @ptnum);
}

And with it, it should be really fail-proof solution, comparing with Cookie SOP. But in 15.5 there is a new Dissolve SOP which able to create curves from edges, and it works quite good, much better than old one. Give it a try also, if you are up to date.

edge_to_curve.hipnc

 

@NNois, I agree, many nodes have such "side features", like Facet's removing inline points by threshold or Divide's removing shared edges. I believe it is what you could get from the main algorithms for free. If you do something like shaders or VEX wrangles, you might notice that you could compute a lot of auxiliary and potentially useful data by outputting inner variables.

  • Like 4
Link to comment
Share on other sites

Thanks a lot for all your very useful answers guys ! This one was sneaky ... :)

I have assemble a hip that sum up all the methods ...

 

I would also be curious to know how to do this in NURBS in Houdini , cause it was pretty obvious to me that this would be very straightforward ,

you have 2 nurbs patch and you just want to isolate the intersected isoparm , but i fail to use SOP surfsect correctly , i only get ugly stuff.

I might be responsable for that anyway ... :)

 

Cheers

test_cut_02.hiplc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...