Re: Tracing Spline Won't Sync by Thomas Alberti on Jun 13, 2015 at 4:00:38 am Last Edited By Thomas Alberti on Jun 13, 2015 at 4:02:20 am
So my longshot solution was to find an equation that captured the difference in position between the text and the object.
I tabulated ten data points from the sweep nurbs end growth (10%, 20%, etc.) with the corresponding Offset value of the Spline Xpresso node (which outputs to the position of the object). They differed by about 5% +/- 2% or so each time. Then I just pasted that table into an online polynomial regression calculator (http://www.xuru.org/rt/PR.asp) and grabbed the equation.
I added a COFFEE node to the Xpresso group and pasted the equation into the script editor. It was just bit tedious to change all the notation (e.g. pow(Input1, 6) through pow(Input1, 2)--I ended up selecting a 6 degree polynomial equation), but in the and to my surprise, it worked pretty well. Sometimes the object was still off by 1%, but never much more--for my purposes that will do.
note: This was a sample case; I have to try the solution on a longer phrase of text. If it doesn't work I'll update this post.
note: In the image you'll see that I ended converting the End Growth percentage to an actual distance (which I got from a COFFEE script using SplineLengthData, but it's not necessary--i was trying to get more precision which ended up being fruitless).