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
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
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
  Connections Between Opposing Splines lockiidraws 1 62 12-04-2025, 02:14 PM
Last Post: _Aka_
  Spawn at start/ end of splines rickgplus 4 2,237 03-21-2025, 12:34 PM
Last Post: _Aka_
  Any performance 'hacks' for scene with lots of splines rickgplus 1 1,468 03-18-2025, 10:11 PM
Last Post: _Aka_
Smile Simple splines movement shills 3 2,407 02-26-2025, 09:40 AM
Last Post: _Aka_

Forum Jump: