# Creating a ribbon in space

Hello everybody,

I’ve got a series of (x,y) points that form a curve, and would like to use these to produce a fence like surface that follows the curve. I would eventually then like to project an image onto this fence. I’m completely new to touchdesigner though (but was told it should do for what I want ) and can’t seem to find any guides on creating curves, is there an easy way to do this?

My first thought was that since I have sufficiently many points I could just create lines from each point to the next point to give an adequate looking curve, but am unsure how to combine lines end to end.

Any help would be greatly appreciated!

I’ve just been trying to resolve a similar problem.

Try this video on for size:
TouchDesigner_CurveCreation_Extrusion_Resampling.wmv

And another(not annotated), addressing the connecting points problem:
Points_Connected_ToCurves_Resampled.wmv

Its a very quick and dirty little tut, I hope you won’t mind.

Kizza

Thanks Kizza, that was just what I was looking for! The videos made everything nice and simple, and the first one made me laugh a couple of times Thanks heaps for putting in the effort to make them for me.

How did you insert the points for the second video? I presumed being in model geometry and hitting insert points would work, but it doesn’t seem to be doing the trick, so I’m probably missing something! Further, is there a way to specificy the (x,y,z) components of the coordinates rather than putting them down freehand?

Edit: Scratch the (x,y,z) bit, I’ve found the table dat and add operators that seem to do the trick

“How did you insert the points for the second video?”
Actually, I was trying to figure out how you created the points you mentioned in your first post. That way, I figured, must be:
1 - create the “TD” text as a curve
2 - apply “ADD” SOP with “Delete geometry but keep points” checked.
3 - Right-click on “ADD” SOP and export.
3 - Then drag-file import the exported file, into a new TD project.
4 - This results in a “Model” SOP, with just my points.

I didn’t think about using “Table” DATs + “ADD” - thanks for the tip.

If you copy the model sop and move the points around you can use the blend sequence sop to animate the ribbon.
Ian
ribbon_move.1.toe (7.6 KB)

Thanks iansmith, I find it very useful that you’ve shown the interconnections between nearly all the different categories of nodes in TD.

Your use of the “beat” CHOP + “math” CHOP(to modify the range) showed me the proper role of CHOPS - particularly how they are visual substitutes to writing expressions/function which calculate a series of values over time.

Also I think I now understand the primary use of “null” chops : its easier to connect a node then exporting a channel.

Thanks again.

Thanks guys! That was nice use of the sequence blend op, I’ve never looked at that before.

Once the ribbon has been introduced, my goal is to project another curve onto it, then colour the region beneath this curve. Just wondering, is there a way to colour surfaces and then merge them? I would also like to turn the xy plane into a pure white plane with a black grid on top of that, I suspect the grid SOP does this, but I can only get just a grid, or just a pure white plane when I try to use it.

At the moment my very humble project looks like this:
ribbon on plane.toe (4.72 KB)

Hi,
you have to put each element into separate geo components to apply different colours/materials/textures. You need; a geo for the filled grid, another for the wireframe grid and another for your ribbon. Then you create a camera comp, a light comp and a render top. These comps will auto connect to each other when you create them.
I wouldn’t do the ribbon the same way using dats but that’s up to you. Each of the geos is layered on top of each other when displayed by the render top, completing the scene. I’ve rotated each geo by 20x and 20y so you can see your ribbon from an angle. You have to do this with the same figures in each geo to synch the final view. There are other ways of aligning the parts but they may be to complex for now.
See attached and notice how the materials are attach to each geo separately. Unfortunately, you can’t have multiple objects with different materials within a geo and just merge them.
Ian
ribbon on plane (2).toe (7.11 KB)

Thanks for that Iansmith, I’ve now been able to apply all the colours. I use the dats because this is just a quick prototype for a project where the ribbon base is defined by a large set of (x,y) coordinates, and I’ll replace the straight line in the wall with a curve.

Is there a SOP to colour the portion of the wall below the straight line (or indeed any other curve placed on the wall? I feel if I could somehow extrude the same base as the ribbon, but then give it a height defined by the straight line I could put this with the ribbon with constant height, giving the coloring effect?

I’ve attached a (poorly sketched) paint drawing of the effect in case my explanation is hard to understand.

Hi,
touch will be able to do it as it can apply any maths that you might want to use. It’s been a long time for me but, using integrals usually calculates ‘areas under curves’. So you could look that up.
It depends on what your end composition is going to be. If you want the lower polygon to move like a waveform then that’s one thing. If you just want it to be a half height ribbon then you just create second ribbon and extrude it by half the distance.

You could;

1. Use a gradient to apply multi-colours to the ribbon and, if you want that to move, apply a chop to the values for the gradient (ramp sop plugged into a phong mat).
2. Project/texture a top effect (e.g. an input movie) onto a single ribbon.
3. Create a custom shape/polygon that sits in front of the ribbon using the same method you used to create the original ribbon (i.e. joining points) but placing it in a different geo.
4. Use a glsl shader but that’s pretty hard to learn.

Let me know what the actual effect you want is and I can try to help.
Ian

edit. Attached is the 4th option. Edit the geo1 or geo4 to change the ribbons.
ribbon on plane (2).2.toe (7.56 KB)

Thanks Iansmith, I found I could do it using the fourth method. Out of curiosity how would you go about method 2, projecting onto the single ribbon? I tried this using a phong colour map (like in the flower cube demo when you first open touch) but the ribbon only showed a small portion of the image. Do I need to re-size the movie in to have similar dimensions as the wall?

Hi,
I think you would have to match the sizes. However, if you place a ‘texture’ sop at the end of the chain for your ribbon (i.e. inside the geo) and set it to ‘Orthogonal’, you should be able to scale the texture. That sop has various resizing options that seem to work.

Let me know how you get on. I’ll have a proper go at it if you can’t get an example working.

Ian