Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Discrepancy in interpolation Generator vs Controller ?
Hi all,

Today I've encountered an (I think) interesting problem.
I've been trying to get a Curvy Generator and Controller 
to work together but so far I have failed.

What I need is the following:
I have a Generator with a shape extrusion. To Control how far along the spline the
extrusion goes I'm using the .To value of the BuildShapeExtrusion component of the Generator.
leading the 'trail' is a spline controller that is being moved by setting it's .RelativePosition value.
My propblem now is that it seems that the method used to interpolate these two entities is not the same,
for instance when I set the .To to .3f, I have to set the .RelativePosition to .2675f to visually match the two
objects (see image below).
[Image: e378e6f0cb.jpg]

I hope someone can point me in the right direction as to solving this conundrum.

Thanks in advance!

Yeah, I can bring some light in Wink

The difference is that the SplineController's "RelativePosition" is actually TF, while the other Controllers (Path,Volume) as well as the Generator uses % due to the fact that a path inside CG don't need to come neccessarily from a spline.

I agree that this might be confusing, but my dilemma was that CurvySpline use TF allover the place (so did the old controllers), that's why I decided to leave it as is with the SplineController.

Perhaps we can add a mode to the SplineController to set position by % as well. Until that you can inherit a custom controller from SplineController and set the RelativePosition by percentage (using spline's length and Spline.DistanceToTF / TFToDistance).
I see, that makes sense.

I've got it working now. used: 
controller.RelativePosition = Spline.DistanceToTF(Spline.Length * value);
where value is a 0-1 float.

I think it would be nice to have a mode for using % values for the controllers. Also I think
it might not be clear to everyone (it wasn't to me) that TF and % are in fact not the same.

Since we're on the subject, what does TF stand for?

Thanks again for the quick response Jake!

F = Fragment (used for each segment)
TF = Total Fragment (used over whole spline)

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reference the materials used in generator boriskourt 5 69 05-09-2021, 09:32 PM
Last Post: _Aka_
  Activate Curvy Generator After Scene Load jdkirk1 7 222 05-07-2021, 02:14 PM
Last Post: _Aka_
  Variable Mix Shape Interpolation Not Spanning Entire Input Spine Diasporism 4 215 04-20-2021, 06:54 PM
Last Post: _Aka_
  How to change the mesh inside the generator elitegorgong 5 333 04-03-2021, 04:53 PM
Last Post: _Aka_

Forum Jump: