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
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 1 10 04-03-2024, 03:16 PM
Last Post: _Aka_
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 4 03-27-2024, 07:25 AM
Last Post: amutp
  Generating GO only on CPs in Generator GameDeveloperek4123 1 7 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: