Generate an electric arc between two points

Hello,

This is my first message here, so I will present myself a little bit.
I’m Flo, and I’m a motion designer (working with After Effects).

I want to learn to use TD to be able to work on interactive projects (projection mapping, etc.)
I went trough several tutorials, but I’m still a beginner.

I need to create an electric arc between two points, in order to imitate a Tesla coil.

Right now here is the network I created:
Line (with point A and B) > Noise > Noise > Geo > Render

I will then use some feedback > level > over
to give the electrical aspect…

But the result is not really nice… not realistic enough…

So my question is, how would you create this kind of effect ?
Is there something that simulate electrical arcs?
Any tutorial or source file already existing that could be usefull for my learning quest ?

Thanks a lot !
Flo :smiley:

Hi Flo, years ago I created a very similar effect using the LSystem SOP to create a randomly branched structure. It’s length randomly changed from frame to frame, so then I then remapped it to fit between two specific points.

I can’t find the code, but TouchDesigner LSystems is based off Side Effect’s Houdini’s LSystems, and you may be able to find simple lightning examples in their discussions.
The syntax should be the same.

Hope that helps,
Rob.

Hi Rob,

Thank you for the suggestion, I will look into LSystems.
I’ve found some exemple files with different trees and branched structures.

How would you remap it between two specific points?
Thanks a lot !

Flo :smiley:

If you using a Transform SOP you’ll be able to scale to a a given input bounding box, though that requires the lightning to lie along some axis.
Align SOP can also be used to first orient a set of polygons along another direction as well.
Lots of different techniques in the end.

Post a simplified version of some SOP output here, and that might help us generate some techniques for mapping it

-Rob

Another idea (that won’t have random branches but might be computationally cheaper than animated L-systems) would be to use animated Noise CHOPs with start/end constraints to lock your arc between two “electrode” points. Probably easiest to use 3 Noise CHOPs (for tx ty and tz respectively), each with unique seed, and drive their tz param with absTime.seconds or a Speed CHOP. You can then drive a CHOPtoSOP or Limit SOP with the noise channels to create arc geometry.

You could probably make some branches by repeating this process with some Noise CHOPs with varying combinations of start and/or end constraints. You could also instance some L-system branches along that arc, to combine the techniques suggested in this thread thus far.

I modified the file you sent me to work with Noise CHOPs. This way you can specify your electrode positions in the Constant CHOP and the arc will stay locked between them. As an example of dynamic electrode placement I exported an LFO CHOP to ty of the right electrode.
tesla noise noise.10.toe (7.03 KB)

Woaw that’s really great ! Thank you ! :open_mouth:

Now I can play with the position of each electrode and pimp the electric aspect of the line…
:smiley:

Thanks a lot !

Flo :stuck_out_tongue:

oh yah, constrain start/end on Noise CHOP. great call!

looks great with the feedback trail! Glad I could help. It’s fun to control the electrode positions with hand tracking (kinect/etc).

You can also fake like the arc is growing from the electrodes in the texture map. Turn on Limit SOP “Apply Texture” parameter and experiment with ramps/etc scrolling along…

Oh how I love this kind of stuff! :nerd: Such a nice distraction from the frustrations of optimizing my current project.

Good to know ! :wink:
I have other small problems…
If you may, I could use some help again later…

Thanks again for your assistance !

Flo :smiley: