# How to animate perpendicular strips moving along a cable? (visualizing DC electric current)

I'm a newbie to Blender. I've been doing mediocre solid modeling (using Alibre) for years, so creating models to import isn't a big problem for me. But I'm wanting to learn to do a very specific simulation of electrical current flowing using Blender. This animator did a wonderful job of current flow simulation tracking an electrical path (wire) at the 0.48 to 1:10 point:

https://youtu.be/CWulQ1ZSE3c?t=48s

The white cylindrical current objects track the path (wire) even when the wires move as the switch is put in place.

I've watched some tutorials on:

I'm guessing there may be multiple ways to perform this current flow simulation. I'm finding Blender so powerful but also feature rich - feature rich enough to be confusing and difficult to learn. Anyone have ideas on tutorials i should watch to help me get to this electrical current flow faster? I really appreciate any help! Lane

• Create a bi-color cylinder, give it an Array modifier and a Curve modifier, make it move on the right axis so that it moves along the curve. To move the curve you can hook the vertices of the curve for example. Mar 26, 2021 at 18:46
• Thanks Moonboots! I'm not sure how to do that, but i can try to learn how. any good tutorials you know of to show me how? Lane Mar 26, 2021 at 18:48
• Also, how do i set up the multiple cylinders to track together? does that have to happen in the dope sheet? Mar 26, 2021 at 18:48
• take a look at this kind of tutorial: youtube.com/watch?v=_3NFtRBDCV0 Mar 26, 2021 at 18:55
• Can you add a screenshot from the linked video to your question next time, please? If the video goes offline, any future readers will have no idea what you're referring to. Mar 26, 2021 at 19:16

If you don't mind some stretching and compression - that happens when the segments of the curve don't have all the same length - then you can just bevel a curve and add a procedural bi-color shader that is driven by the frame rate for the animation.

If you don't like the stretching and compression then you can do what moonboot suggested: create a cylinder, apply an Array and Curve modifier. Last but not least, use a procedural shader for the animation. The drawback of this method is that you need one cylinder for each cable. But it can be a linked duplicate, so no biggy.

Enter #frame + 12 in the purple value field to create the driver. 6 is the speed, and the +12 (=2x6) is needed for a continuous loop over all frames. 2 because it's bi-color. Switch the Add math node to Substract to reverse the direction.

• wow... thanks much Blunder! i'm devoting an hour a day to try to pick up these skills. Something tells me i'll have to put in some overtime! haha. but i look forward to running once i learn to crawl, then stand, then walk first. Mar 29, 2021 at 13:33
• Thanks Moonboots and Blunder. i could use some advice. I have limited number of hours to learn Blender, so i'm trying to maximize of my learning time. I've been able to figure out (to some degree) setting up the array and curve modifier. I've just spent some time looking at videos where folks are talking about procedural shading... and i'm not doing well with grasping the concept quickly. Does Blender Cloud have basic tutorials for newbies? I am finding this world where there is so much vernacular and use of shortcuts to be challenging for picking up object animation skills quickly. Apr 1, 2021 at 18:12

Just a side-note to Blunder's Answer. You can get a shader-solution with even spacing if:

• You convert your curve to a mesh
• UV unwrap the mesh with one quad face active, and the 'Follow Active Quads > Average Length' option.

The shader-tree could then look something like this:

You have the option of key-framing the 'Location X' of the Mapping node to move the bands.

However, these steps are destructive. You would need to take them right at the end, when you are sure your geometry is settled.