sweep a primitive along a curve

   4394   4   2
User Avatar
Member
793 posts
Joined: 4月 2020
Offline
Hello all,

I have a set of curves that start at the center of a primitive. I now want to extrude all the primitives along the curve that is at it's center.

I was playing around with the sweep node, but could not find a way to make this work. One option I could think of is to transform all the primitives in a foreach sop to remove the translation and rotation, but that seems a lot of trouble. I have a feeling there should be an easier way.

I have attached a file in which I was playing around a little. Any help is appreciated.

Cheers,
Koen
Edited by - 2010年10月12日 01:08:08

Attachments:
prims.png (180.1 KB)
grid.png (178.8 KB)
sweep.hipnc (82.8 KB)

User Avatar
Member
3 posts
Joined: 8月 2007
Offline
Hi Keon.

The hip file would be more useful but it looks like you're just trying to sweep a poly mesh sphere along your curves, which should work without resorting to a foreach SOP. Typically, you would be sweeping cross-section geometry along the curves but other geometry will work. You'll probably want to play with the Scale parameter in the sweep node, and you may also want to resample the curves to get the right number of points at which to instance the geometry.

See the attached example.

John

Attachments:
sweepExample.hip (57.2 KB)

User Avatar
Member
793 posts
Joined: 4月 2020
Offline
Hello John,

Thanks for looking at this, the last example of my post was actually a hip(nc) file.

The problem I am having, is that when the profile is not aligned properly and centered at the origin, the sweep seems to have a hard time to align them properly. I tried using the vertex option, this might work, but then I still need to figure out the rotation.

The goal is to have the sphere match up perfectly at the center, and have the “tubes” comes out smoothly. That way, after a subdivide, I get a nice shape.

Cheers,
Koen

Attachments:
close.png (87.8 KB)

User Avatar
Member
1922 posts
Joined: 11月 2006
Offline
Here's something I just tried with a pretty old asset of mine. It's kind of successful but it has some issues in trying to adapt to handle lots of pieces: it was originally designed for just one. I should look at redoing it to suck less now, however it might provide some ideas.

Attachments:
sop_extrudealongcurve.otl (25.5 KB)
sweep_192.hipnc (84.7 KB)

Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
793 posts
Joined: 4月 2020
Offline
Thanks Graham,

I'll have a look.

Cheers,
Koen
  • Quick Links