Mask outline

Marching ants is fine but I would like a defined pattern of lines and/or dots which cycle around a given path. This would make the “photoshop mark outline” effect super easy and effective.

Anyone know a quick and easy solution to this or is everyone using the marching ants filter?

Bumping this as I’m genuinely surprised that nobody has replied.

Let me see if any one in Engineering knows much about marching ants.

Rob

After quite a bit of experimentation I’ve got something working pretty well:

https://youtu.be/PTwsuUHfT6Y

I’ll post the code shortly.

Ok, so for this you’ll need my math lib:

https://gist.github.com/HoraceBury/9431861

You also need my graphics lib:

https://gist.github.com/HoraceBury/636e18da5f8bfc9cab6197fe3184d7e2

Place both of those libraries into the same folder as this lib:

https://gist.github.com/HoraceBury/3432b0c58b04fc7df8b3d810dc2caa13

Then you can just rename ‘cyclingants.lua’ to ‘main.lua’ and run it.

If you’re interested in how it works, it takes a path shape and a pattern table, scales the pattern so that the length of the path is evenly divisible by the sum length of the pattern. It then duplicates the pattern, cycling it’s values round so that each time the output is generated it produces a one-step increment around the path. The renderer is then called, iterating through the list of generated patterns, to render the cycling ants display groups around the path shape. Animating is simply a matter of cycling through the list of groups, one at a time.

That’s pretty cool looking!

Rob

Thanks Rob!

There was a slight glitch with the version I posted earlier so I reworked a lot of it and it’s now much smoother and faster:

https://youtu.be/4cwjTrpvnFU

You’ll need my table lib as well:

https://gist.github.com/HoraceBury/9307117

Use the same links as above to get the code.

Bumping this as I’m genuinely surprised that nobody has replied.

Let me see if any one in Engineering knows much about marching ants.

Rob

After quite a bit of experimentation I’ve got something working pretty well:

https://youtu.be/PTwsuUHfT6Y

I’ll post the code shortly.

Ok, so for this you’ll need my math lib:

https://gist.github.com/HoraceBury/9431861

You also need my graphics lib:

https://gist.github.com/HoraceBury/636e18da5f8bfc9cab6197fe3184d7e2

Place both of those libraries into the same folder as this lib:

https://gist.github.com/HoraceBury/3432b0c58b04fc7df8b3d810dc2caa13

Then you can just rename ‘cyclingants.lua’ to ‘main.lua’ and run it.

If you’re interested in how it works, it takes a path shape and a pattern table, scales the pattern so that the length of the path is evenly divisible by the sum length of the pattern. It then duplicates the pattern, cycling it’s values round so that each time the output is generated it produces a one-step increment around the path. The renderer is then called, iterating through the list of generated patterns, to render the cycling ants display groups around the path shape. Animating is simply a matter of cycling through the list of groups, one at a time.

That’s pretty cool looking!

Rob

Thanks Rob!

There was a slight glitch with the version I posted earlier so I reworked a lot of it and it’s now much smoother and faster:

https://youtu.be/4cwjTrpvnFU

You’ll need my table lib as well:

https://gist.github.com/HoraceBury/9307117

Use the same links as above to get the code.