Create point (trail) by traveled distance?

   1491   3   1
User Avatar
Member
408 posts
Joined: June 2015
Offline
I'm trying to figure out how to create a trail behind an animated set of points that is evaluated by travelled distance and not by time. So no matter at what speed my points are animated at they leave a trail of point that has a constant distance between each point in the trail.

Thanks in advance.

A.
User Avatar
Member
1737 posts
Joined: May 2006
Online
generate the trail by usual methods, resample sop it with the distance you want?
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
408 posts
Joined: June 2015
Offline
Thanks Matt, yes i did that eventually, but i'm using the “resample by polygon edge” to keep my corners clean (those are paths with hard turns / corners), and when using that option i can't really decrease the amount of samples as much as i want, it sticks to a minimum that is quite dense. But in the end i just accepted the amount of trail points it gave me, then grouped by range to grab 1 out of 2 points on those trails and deleted those to get a lower sampled paths / lines. It works, but the grouping and deleting is a bit slow to playback.

I was hoping there would be a way to just evaluate the distance traveled by my points, and just create a new point behind each time it traveled let's say 0.1 unit, that in wrangle of course, or a simple vex line in the trail sop length parameter.

Cheers,

A.
Edited by Adriano - Aug. 9, 2020 20:42:54
User Avatar
Member
7759 posts
Joined: Sept. 2011
Offline
Adriano
Thanks Matt, yes i did that eventually, but i'm using the “resample by polygon edge” to keep my corners clean (those are paths with hard turns / corners), and when using that option i can't really decrease the amount of samples as much as i want, it sticks to a minimum that is quite dense. But in the end i just accepted the amount of trail points it gave me, then grouped by range to grab 1 out of 2 points on those trails and deleted those to get a lower sampled paths / lines. It works, but the grouping and deleting is a bit slow to playback.

I was hoping there would be a way to just evaluate the distance traveled by my points, and just create a new point behind each time it traveled let's say 0.1 unit, that in wrangle of course, or a simple vex line in the trail sop length parameter.

Cheers,

A.

It's possible to leave points in a trail by distance using a solver instead of trail, however the precision will be limited to the sampling frequency of the solver. In the solver an odometer attribute would be used, and each time the odometer passes a certain threshold, a point would be added. However it would only be when the distance is greater than a threshold, not when it hits an exact value. It might be possible to correct for the overshoot by using the velocity correct for it, but then it might have to handle adding points early, etc.
  • Quick Links