Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Metadata interpolation
#2
Hi
In the CurvyInterpolatableMetadataBase class, you have access to the ControlPoint property. Using it, you can do the conversion you talked about in the Interpolate method's implementation. An example with the example script E01_HeightMetadata:

Code:
        public override float Interpolate(CurvyInterpolatableMetadataBase<float> nextMetadata, float interpolationTime)
        {
            if (nextMetadata != null)
                return Mathf.Lerp(MetaDataValue,
                    nextMetadata.MetaDataValue,
                    ControlPoint.LocalFToDistance(interpolationTime) / ControlPoint.Length);
           
            return MetaDataValue;
        }

Did this help?
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
Metadata interpolation - by tairoark - 10-16-2022, 06:09 PM
RE: Metadata interpolation - by _Aka_ - 10-17-2022, 10:07 AM
RE: Metadata interpolation - by tairoark - 10-17-2022, 11:47 AM
RE: Metadata interpolation - by _Aka_ - 10-17-2022, 01:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  "MetaData" Of Entire Spline Heightmap SAMYTHEBIGJUICY 3 6 10-16-2023, 08:42 AM
Last Post: _Aka_
  Proper metadata usage tairoark 2 8 10-01-2022, 12:04 PM
Last Post: _Aka_
  Accessing Metadata from CG hucota7 1 8 02-16-2022, 08:49 PM
Last Post: _Aka_
  Metadata warnings Josenildo 4 740 07-13-2021, 12:19 AM
Last Post: p30better

Forum Jump: