Distribute geo along curve

   1739   3   0
User Avatar
Member
7 posts
Joined: Aug. 2020
Offline
Relative Houdini newbie here, but spent the day trying to figure out the most elegant solution to this…

I want to duplicate a mesh along a curve evenly - ideally with the ability to control orientation too. The easy/newbie way I found was a simple copy to points but that obviously doesn't work if you want a smooth curve with only a couple of meshes along it.

Also looked into the sweep node but couldn't really achieve what I wanted.

Other solutions would be most welcome!
User Avatar
Member
340 posts
Joined: June 2017
Offline
Did you try copy to points after resampling your curve? What didn't work with sweep? Here is a file with three different ways of distributing an object along a curve. The object has arrows, so you will see how it gets oriented. I used object merge nodes just to separate the object mesh and curve from the process of cloning along a curve, but one could have just kept it all with the mesh that has the arrows.
Edited by Island - Aug. 24, 2020 17:43:29

Attachments:
ObjectsOnCurve.hiplc (247.6 KB)
ObjectsOnCurve.jpg (175.2 KB)

User Avatar
Member
7 posts
Joined: Aug. 2020
Offline
Hey - I guess the copy to points solution isn't ideal because the curve may need a high number of points but but I don't want that many copies.

Using H18, maybe I'm not understanding how sweep works but I couldn't reproduce a primitive across a curve like seen in many examples pre v18.

I'd imagine I'd want to somehow sample the length of a curve via curveU and then distribute geo along the length with num of objects by it's length?
User Avatar
Member
340 posts
Joined: June 2017
Offline
If you look at the example attached above, you can choose your number of clones by changing the number of points on the curve resample (change the “segments” value) in the copytopoints or sweep geometry. Because Houdini (unlike every other 3D program) allows one to make node systems that are not necessarily linear, you can use the resample just for the clones and leave the curve as is for some other operation.

Here is a non linear node setup where the curve is used for three different purposes: a continuous sweep as well as two ways of cloning. The number of points on the original curve has nothing to do with either function.
Edited by Island - Aug. 25, 2020 00:32:33

Attachments:
ThreeUsesCurve.hiplc (318.0 KB)
ThreeUsesCurve.jpg (150.1 KB)

  • Quick Links