Jump to content

how to add points to a curve?


Recommended Posts

Wow, I have been using houdini for so long but I never did curve editing. How do I add points to an existing curve? 

1. No, I can't go back and add points on a original curve sop. I mean post that operation, or if the curve was made in maya or I have edits after my initial curve sop, so I can't just go back add points to the original curve sop.
2. Resample is not what I am looking for, I just need to add a few points in specific locations.
3. The best thing I have found so far is to use poly split, but the problem with that is it connects every point I place, so I can only place a few points then I have to make another one so my points dont connect and make a face.

surely there is a way to do this, right?

Edited by ejr32123
Link to comment
Share on other sites

You're not kidding, I thought I remembered it being straightforward, but wow it's been awhile.   I found the refine SOP will let you create a new point along the curve without changing the shape by dragging an indicator in viewport or using the U position similar to carve

  • Like 1
Link to comment
Share on other sites

The simplest answer I can think of is to rebuild the input curve and turn it into a single curve node (very easy to do with python). From there, do whatever you want.

node   = hou.node('/obj/geo1/alembic_curves_unpacked')
parent = node.parent()
pos    = node.position()
geo    = node.geometry()
prims  = geo.prims()

for prim in prims :
    crvnode = parent.createNode("curve")
    pts = prim.points()
    tmppos = ""
    for pt in pts :
        tmppos += ",".join([str(x) for x in pt.position()]) + " "
    crvnode.parm("coords").set(tmppos)
    crvnode.setPosition(pos)
    crvnode.move([0,-1])
    pos = crvnode.position()

 

Edited by ftaswin
  • Like 2
Link to comment
Share on other sites

On 1/29/2021 at 6:12 PM, ejr32123 said:

Wow, I have been using houdini for so long but I never did curve editing. How do I add points to an existing curve? 

1. No, I can't go back and add points on a original curve sop. I mean post that operation, or if the curve was made in maya or I have edits after my initial curve sop, so I can't just go back add points to the original curve sop.
2. Resample is not what I am looking for, I just need to add a few points in specific locations.
3. The best thing I have found so far is to use poly split, but the problem with that is it connects every point I place, so I can only place a few points then I have to make another one so my points dont connect and make a face.

surely there is a way to do this, right?

yes .. here it is a 10-years-old thread

usage description there sounds long but usage is easy . just drop the otl . turn on points ..

post-5487-130658801487_thumb.png

helpThatCurve_001_py.otl

should be easy . hope that helps

.cheers

  • Like 3
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...