Combining multiple Beizier/NURBS Curves
9869 7 3- gupon
- Member
- 9 posts
- Joined: Dec. 2015
- Offline
I'm trying to find a procedural way to combine multiple curves in Houdini.
And for the first step, I tried to combine multiple circles as below, but couldn't make it happen..
(image above is done by Adobe Illustrator)
–
Here's a process i've been through.
At firt, I made a simillar state in Houdini. Still not combining.(#01)
Next, I tested combining only two circles. And It worked well.(#02)
And I tried to merge two states above using for-loop. (#01 and #02)
It works like combining curves one by one. Seemed it worked, but after 5 times of iteration, whole curve broke. This is because curvesect SOP's Keep Even/Keep Odd settings need to be changed depending on curves' positions or shapes. And I couldn't control this in any ways…
After a while, I came up with another method.
Which is to convert and combine as polygons first, then convert them again as NURBS.
Even though curves have to be resampled, worked well than the previous way.
(Boolean SOP is used for self-intersections, so I used left input only)
But when iteration comes to the end, center area gets filled with polygon.I tried Hole SOP couldn't resolve this.
If possible, I want to avoid converting/resampling as polygons or VDBs, and keep them as curves during operation.
(so the shapes won't change and keep accuracy)
Curvesect SOP was really nice but couldn't determine EVEN/ODD settings…
Sorry I'm new to Houdini, and my English is poor.
It would be really appreciated if you could give me any advice. Thank you.
Edited by gupon - Dec. 25, 2017 02:35:26
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
For polygons to have holes, there need to be “bridge” edges to the hole. What's shown in that last screenshot is a polygon for the outer boundary and a separate, overlapping polygon, wound the opposite way, for the inner boundary.
The Hole SOP should be able to bridge the hole, and it seems to work in this case, though it's not always the most stable in its choice of bridge. Alternatively, you can use a Group Create SOP to group unshared edges, then use a Dissolve SOP set to Delete Non-Selected to delete shared edges, with the option on to bridge the polygons with holes. (See Attached)
Of course, if you have to use NURBS for some reason, that introduces a huge pain, because either you need to use trim curves, (which are a mess to work with; I tried just now and spent maybe 40 minutes before giving up, but maybe you can figure something with the Project and Trim SOPs), or you need to insert duplicate vertices to preserve the sharp transition for the bridge. If you can avoid using NURBS, I always try to recommend that people do, because they fundamentally aren't what people expect in a lot of cases, leading to a lot of confusion.
The Hole SOP should be able to bridge the hole, and it seems to work in this case, though it's not always the most stable in its choice of bridge. Alternatively, you can use a Group Create SOP to group unshared edges, then use a Dissolve SOP set to Delete Non-Selected to delete shared edges, with the option on to bridge the polygons with holes. (See Attached)
Of course, if you have to use NURBS for some reason, that introduces a huge pain, because either you need to use trim curves, (which are a mess to work with; I tried just now and spent maybe 40 minutes before giving up, but maybe you can figure something with the Project and Trim SOPs), or you need to insert duplicate vertices to preserve the sharp transition for the bridge. If you can avoid using NURBS, I always try to recommend that people do, because they fundamentally aren't what people expect in a lot of cases, leading to a lot of confusion.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- BabaJ
- Member
- 2042 posts
- Joined: Sept. 2015
- Offline
- gupon
- Member
- 9 posts
- Joined: Dec. 2015
- Offline
Thank you ndickson for the great help.
I understood about Hole SOP and the bridge, not to get errors in inner boundary.
And thanks for the long try with NURBS.. didn't know about trim SOP yet, so I'll try dealing with it.
Also will try to avoid NURBS too. All I want is to keep the vector shape as it is.
It is fine using either bezier curves or polygons.
I understood about Hole SOP and the bridge, not to get errors in inner boundary.
And thanks for the long try with NURBS.. didn't know about trim SOP yet, so I'll try dealing with it.
Also will try to avoid NURBS too. All I want is to keep the vector shape as it is.
It is fine using either bezier curves or polygons.
Edited by gupon - Dec. 25, 2017 01:22:17
- gupon
- Member
- 9 posts
- Joined: Dec. 2015
- Offline
- vusta
- Member
- 555 posts
- Joined: Feb. 2017
- Offline
- gupon
- Member
- 9 posts
- Joined: Dec. 2015
- Offline
- gupon
- Member
- 9 posts
- Joined: Dec. 2015
- Offline
I gathered two ways of merging shapes in hip.
Method A is an idea from yone80 (https://twitter.com/yone80).
Thank you for all the help.
Method A is an idea from yone80 (https://twitter.com/yone80).
Thank you for all the help.
Edited by gupon - Dec. 26, 2017 05:54:59
-
- Quick Links