Jump to content

Is it possible to create a polygon from 4 points in houdini?


treebucks

Recommended Posts



sel = kwargs['pane'].selectGeometry(geometry_types=(hou.geometryType.Points,), allow_obj_sel=False)
cur_node = sel.nodes()[0]
items = sel.mergedSelectionString()
add_node = cur_node.createOutputNode('add', 'points_to_poly')
add_node.setParms({ 'prim0':items, 'closed0':True })
add_node.setDisplayFlag(True)
add_node.setCurrent(True, True)


 

Place this code to shelf tool and assign Scene Viewer hotkey. Hope this helps.

Edited by Alexey Vanzhula
  • Thanks 1
Link to comment
Share on other sites

It's a very cool technique - but if you are learning Houdini it's good to know a built-in method too.

 

Add an AddSop to the network, Set the AddSop to Polygons/ By Group and use the white reselect arrow to select the points. Point order matters too. You may also want to set 'Delete Geometry But Keep the Points' under Points tab, and, 'Remove Unused Points; under Polygons tab.

Edited by tar
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...