Activity › Forums › Maxon Cinema 4D › Tracing Spline Won’t Sync
-
Tracing Spline Won’t Sync
Posted by Thomas Alberti on June 10, 2015 at 7:48 pmHi,
I’m trying to get an object to follow a sweep growth along a text spline, but the object is out of sync with the text. I’m using XPresso as shown. Any ideas?
Thanks,
TomThomas Alberti replied 10 years, 11 months ago 1 Member · 1 Reply -
1 Reply
-
Thomas Alberti
June 13, 2015 at 4:00 amSo 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 (https://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).
Reply to this Discussion! Login or Sign Up
