Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import splines from GeoJson
#2
Hi,

About the 15000 limitation, it is as the warning message says due to avoid Unity's "String too long for TextMeshGenerator" error. This error is related only to the displayed string in the import/export window. This should not impact the imported content if you import from a file.

The format used by Curvy in import/export is a custom format based on JSON made for ease of use in mind. It is not a standardized format. Its goal was to allow to easily save/mass edit/load/share splines.

Things were done in a way to allow to users to easily integrate their needed format, as long as it is a JSON based format.
Curvy defines the JSON wrappers expected in the SerializedCurvySplineSegment and SerializedCurvySpline classes in Curvy\ImportExport\Wrappers.cs. You can modify these classes to be able to deserialize your own JSON based format, as long as your spline (SerializedCurvySpline ) is defined as an array of control points (SerializedCurvySplineSegment)

Here is an example of a spline with two control points:
Code:
{
   "Array": [
       {
           "Name": "Curvy Spline",
           "Position": {
               "x": -30.329999923706056,
               "y": 37.90800094604492,
               "z": -14.991999626159668
           },
           "Rotation": {
               "x": 0.0,
               "y": 0.0,
               "z": 0.0
           },
           "Interpolation": 1,
           "RestrictTo2D": false,
           "Closed": false,
           "AutoEndTangents": true,
           "Orientation": 1,
           "AutoHandleDistance": 0.38999998569488528,
           "CacheDensity": 50,
           "MaxPointsPerUnit": 8.0,
           "UsePooling": true,
           "UseThreading": false,
           "CheckTransform": true,
           "UpdateIn": 0,
           "ControlPoints": [
               {
                   "Position": {
                       "x": -30.329999923706056,
                       "y": 37.90800094604492,
                       "z": -14.991999626159668
                   },
                   "Rotation": {
                       "x": 0.0,
                       "y": 0.0,
                       "z": 0.0
                   },
                   "AutoBakeOrientation": false,
                   "OrientationAnchor": false,
                   "Swirl": 0,
                   "SwirlTurns": 0.0,
                   "AutoHandles": true,
                   "AutoHandleDistance": 0.38999998569488528,
                   "HandleOut": {
                       "x": 1.0,
                       "y": 0.0,
                       "z": 0.0
                   },
                   "HandleIn": {
                       "x": -1.0,
                       "y": 0.0,
                       "z": 0.0
                   }
               },
               {
                   "Position": {
                       "x": -26.718000411987306,
                       "y": 37.90800094604492,
                       "z": -16.320999145507814
                   },
                   "Rotation": {
                       "x": 0.0,
                       "y": 0.0,
                       "z": 0.0
                   },
                   "AutoBakeOrientation": false,
                   "OrientationAnchor": false,
                   "Swirl": 0,
                   "SwirlTurns": 0.0,
                   "AutoHandles": true,
                   "AutoHandleDistance": 0.38999998569488528,
                   "HandleOut": {
                       "x": 1.0,
                       "y": 0.0,
                       "z": 0.0
                   },
                   "HandleIn": {
                       "x": -1.0,
                       "y": 0.0,
                       "z": 0.0
                   }
               }
           ]
       }
   ]
}

Not all fields are mandatory

Did this post answer your questions?
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
Import splines from GeoJson - by Qpid36 - 11-19-2019, 09:40 PM
RE: Import splines from GeoJson - by _Aka_ - 11-20-2019, 01:20 PM
RE: Import splines from GeoJson - by Qpid36 - 11-20-2019, 09:44 PM
RE: Import splines from GeoJson - by _Aka_ - 11-22-2019, 03:39 PM
RE: Import splines from GeoJson - by _Aka_ - 11-22-2019, 03:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Unity Splines _Aka_ 5 18 04-25-2024, 11:11 AM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  Using Unity's SplineContainer in Curvy Splines dlees9191 3 15 02-26-2024, 09:49 AM
Last Post: _Aka_

Forum Jump: