splines- SVG TOP (or SOP?)

howdy.

I’ve always wanted to have more options for importing and dealing with splines in Touch Designer. There’s so many uses for custom splines in TD, but I always have to create convoluted workflows to get them in. For example, I use 3ds Max, where I can import an Adobe Illustrator or SVG spline, and then manipulate, extrude, etc.

I know I can build them in TD’s geometry modeler, and I do use it for simple edits. But to create complex splines, a program like Illustrator or Inkscape is much more desirable.

One workflow I use to get splines into TD is this- create spline in AI, import to 3ds Max. Extrude to mesh. Export as FBX. Import to TD. Use delete SOP to remove points from extrusion, leaving only the spline points. Convert to CHOP. Use limit SOP to generate lines between points. That’s a lot of steps.

3ds Max can export FBX and OBJ formats, or course. The OBJ exporter in Max even supports splines- but they wont import into TD.

I’m super psyched about the SVG TOP. But I wonder if it’s possible to think about using SVGs as SOPS as well. It would be so great to be able to import splines directly.

Any thoughts?

2 Likes

Hi,

i face a simliar problem.
It seems kind of impossible to import drawings / splines in TD.
It seems equally impossible to work properlyx with the Model node,
as it A) crashes very often and B) Scaling relationships to other Objects
in the scene seem to change everytime you open a curve, even in different instances of the model node,
so it is almost impossible (for me) to draw a decent camera aninmation path for an existing landscape geometry…

DXF, AI, FBX. None of the curves seems to come in…
Actually i find it a bit irritating that the only way to get a curve should be to run it through CHOPs or to trace it from a bitmap. Serious workflow hinderance!

Best
Stefan

1 Like

One option that I’ve been looking at is exporting paths as XML - this is really all an SVG file is afterall, and then doing a bit of parsing to extract the points and then use an Add SOP to build a path.

I’ve successfully done this with mesh reconstruction, and UV offsetting - so it’s worth exploring.

2 Likes

We did a strange workaround on our last project that worked ok where we drew the splines as polygons in C4D and added a point that was obviously not part of the spline that closed the poly. Then we imported the polygons into touch, deleted the one obvious point that wasn’t part of the spline and you’re left with the line. Was useful for creating paths for geos to follow.

2 Likes

Still no better solution for importing Splines in TD?

You can try the Alembic SOP which supports curves, it is in builds from 2018 and later.

2 Likes

Hello
Could you please guide me on how to output the SOP to SVG component as a sequence or frame by frame? Thank you.

Hey @amirmahrav,

could you point via a link to what component you are referencing?

cheers
Markus

Dear @Snaut,

Thank you for your response. This component is from @raganmd, and the output file that you generate from the SOP section can be obtained as a vector in SVG format.

Hi @amirmahrav - Matthew here.

This doesn’t have a sequence output option as it’s built, but you could script it to capture an svg every frame. There are some limitations when working with a SOP → SVG pipeline, so it may take some trial and error to complete this task. Can you say a little more about what you’re trying to achieve?

Hi Dear Matthew
I am glad to be speaking with you and I have learned a lot from your teachings.
Dear @raganmd , I have built a machine drawing and I am using the component that you have created to prepare the generative design for printing with the machine. I want to create motion in the designs I make and save each frame of motion and then convert it into a flip book. I couldn’t find a script for this purpose, would it be possible for you to help me write this script?

Hi @amirmahrav - I’d be happy to help you get started, but without knowing about your whole project it can be difficult for me to help. A good place to start would be for you to get as far as you can in the process, and then share a TOE file we can discuss.

I needed to import a lot of splines from Illustrator and have those splines have drawing animations (like a complicated growing microchip). What worked for me was this: I saved all splines in SVG, then converted them to OBJ in Blender, each as independent file. OBJ is displayed in Touchdesigner as a set of points. Then I used Add to create spline from points and carve to add drowing animation. Only the project does not look very elegant, since there are about 200 individual splines in it, but everything works well.

1 Like