I can't "close" a sop created with the sweep top. Any ideas?

Hi everybody,

Longtime lurker, first post!
I am trying to create a tube circle that is displaced by sinewaves, using a line as a backbone and a sweep top to create the tube around it.
I managed to find a way to do it, but the end and the beginning form a gap, because of the two circles created by the sweep are not aligned together.
Is there any way to close that gap?
I have diminished the number of points so you can see the problem in my .toe file.
Thank you in advance for your help!
(Note: not a pythoner here, been learning Touchdesigner for about a year now).

Sinewavetube_test.toe (7.3 KB)

1 Like

You can fix this by setting your circle to a closed circle instead of an open arc, making sure the line and the circle have the same number of points ( don’t do the n-1 in the circle) and setting the sweep’s Skin Output parameter (in output page) to On with Auto Close (which I believe renders the skin SOP un-needed) and finally by wiring your circle into the ChopToSOP instead of the line, as the vertex sharing on the first/last point is important to the topology of the backbone object of the sweep for the autoclose functionality. You may also want to use the angle fix and fix flipping toggles on the sweep.

All this being said you will find this method to be a pretty CPU intensive effect and if you need to do this at a high point count, multiple times or in conjunction with other things you may want to investigate a more GPU centric way of doing this which is of course a more complex solution in which you would likely do the deformation in shader with attributes on the points that give you coordinates to lookup noise with…

Thanks for the reply. Your solution works perfectly!

Are there any workarounds with SOPs or CHOPs that can make you turn on or off vertex sharing on the first and last point of any shape that you create, or is it only available in closed shapes (circle, box, etc)?

It is pretty CPU intensive. I will definitively have to look into shaders in the future.