Search Unity

[RELEASED] Curvy: Fast Spline Interpolation

Discussion in 'Assets and Asset Store' started by Jake-L, Feb 14, 2013.

?

Is it fine to release Curvy as a Unity 4.2 package?

Poll closed Dec 27, 2014.
  1. YES, I'm already using Unity 4

    103 vote(s)
    88.0%
  2. YES, but it should work in Unity 3.5 nevertheless

    7 vote(s)
    6.0%
  3. NO, I don't have Unity 4 installed and won't be able to access it in the AssetStore

    7 vote(s)
    6.0%
Thread Status:
Not open for further replies.
  1. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    We're happy to announce the release of Curvy 1.5, our all purpose spline engine for Unity! Whether you just want to animate some objects or build your levels with extruded shapes, Curvy delivers! You're looking for a solid spline engine to integrate into your level editor? Curvy comes with a full featured API you can use both in the editor and at runtime!

    Main Features

    • Create and edit curves in the scene editor and at runtime
    • Spline Types: Linear, Bezier, Catmul-Rom and Kochanek-Bartels with local parameter control
    • Advanced editing features like Split/Join/Connect/Spline Groups
    • Get position, tangent, orientation, scale and custom data for any spline point by absolute (units) or relative (F) distance
    • Extrude Shapes and custom meshes or clone objects along a curve
    • Export curves to meshes
    • Create Splines from Superformula
    • Designed for speed: almost all data can be precached and linear interpolated later on
    • Lots of editor tools and wizards, ready-to-use components
    • Support for playMaker and Magical Box
    • Full featured API, C# Source Code (well formatted and fully Intellisense documented)
    • Example scenes, Online Manual, Support Forum

    It's available in the AssetStore!

    Cheers
    Jake
     
    Last edited: Sep 29, 2015
  2. Toad

    Toad

    Joined:
    Aug 14, 2010
    Posts:
    296
    This is a really nice spline tool with great support from the developer. Thanks Jake.
     
  3. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,146
    WOW ! It's wonderful !!!

    6R
     
  4. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    v1.01 just hit the AssetStore!

    New Features:
    • Custom user data to Control Points (basically an array of Vector3's that can be used to interpolate almost anything like Scale, Color, Speed etc...)
    • Wizard to align objects position/orientation along a spline in several ways
    • SnapToFit feature to create splines with a certain length

    Cheers
    Jake
     
  5. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    We just released a service update to Curvy, it should pass review soon:


    • Fixed some bugs
    • Added another example scene: DynamicSpline.

    The new example is also available as a webplayer demo, click here !

    Cheers
    Jake
     
  6. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,331
    Hi, Great package.

    I would like to create a continuous path via scripting that can have Both Curved and Sharp corners.

    Is this possible with Curvy?

    Thanks
     
    Last edited: May 11, 2013
  7. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Hi Rocki,

    yes, this is possible. Set the spline type to "TCB" and you have full control over the spline segments. For each segment, you then can set Tension, Continuity and Bias individually, even different values for In (Start CP) and Out (End CP). Check the "Dynamic Spline" scene in the package for an example how to add control points by code.
     
  8. GrooGadgets

    GrooGadgets

    Joined:
    Apr 2, 2009
    Posts:
    60
    Hey Jake,

    I just purchased your Curvy Splines plugin and i'm very impressed!

    I am creating a 2.5D platformer and I would like it "on the rails" using a spline that conforms the player to the spline path while retaining full rigid body collisions. So essentially the spline path would be like an invisible rail underneath the terrain where the player is free to jump and collide with the terrain, platforms, etc while conforming to the underlying spline path

    A perfect example of exactly what i'm trying to do can be seen in this trailer for the game ScaryGirl: http://www.youtube.com/watch?v=uAaYwU4M5Kg

    Would this be possible using your system?

    Cheers,

    Simon
     
  9. Ullukai

    Ullukai

    Joined:
    Aug 24, 2010
    Posts:
    737
    I saw your manual for curvy and have not bought your curvy yet because I need to know something:

    Do we have to create scripts with your curvy to get it to work ? All I want to do is make like a grinding on rails game real fast and not have to spend time on making scripts to get it done.
     
  10. Ullukai

    Ullukai

    Joined:
    Aug 24, 2010
    Posts:
    737
    SOLD !

    I just purchased it !

    Thanks for answering all my questions I sent to you in pms :)
     
  11. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Hi Avrigus,

    thanks for buying Curvy.

    if you place and align colliders along the path, this should does the trick. Check the Align Wizard or the Distances example scene for an example how to place and align objects along the spline.

    Btw, orientation calculation will be much improved in the upcoming update.
     
  12. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Just answering again visible to everyone:

    Curvy comes with several scripts that can be used to move and/or align objects along a spline. Also they are a good starting point to get a clue about Curvy's API. Although the API contains a lot of properties and methods to tweak and play with for those that need to get the last performance bit out of it, you'll most of the time work with 2 or 3 methods to get position/tangent/orientation of a point on the spline.
     
  13. GrooGadgets

    GrooGadgets

    Joined:
    Apr 2, 2009
    Posts:
    60
    Hey again Jake,

    Not sure if you get what i'm trying to do. In a nutshell I would like to conform the local X and Z of my character to the spline leaving the Y axis free for jumping etc. So the player wouldn't conform exactly to the spline, it would be more like an invisible rail underneath the geometry of my level.

    The video link I posted in my previous post (from the game ScaryGirl) is exactly the effect I am after. An even more straight forward example is this video for the IOS game "Mr. Crab": http://www.youtube.com/watch?v=wW1e3oaFMx8

    As you can see in the video, the player constantly rotates around the world, conforming to a circular spline path while being able to travel up and down the Y axis.

    I was recently in contact with the creator of SuperSplines asking the same question, here is his response:

    You must know that i'm using PlayMaker so naturally when I saw you supported it I knew I was on the right track! I really hope you can help me as i'm having a hard time trying to find a good working solution.

    Thanks,

    Simon
     
  14. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Ok, I understand. And my answer is more or less the same as from the author of SuperSplines. Personally I wouldn't lookup the closest point each frame (it's quite costly), but I'll look into this to find a good solution. So expect a example showing exactly what you want soon.

    I'm hardly working on v1.04, which among bug fixes and some new features will add more documentation, examples and improved playmaker support. Also, starting with 1.04, all example scenes will be done as playMaker FSMs as well.

    Jake

    PS: You might want to register at our support forum. It's easier to exchange WIP there.
     
  15. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Just a quick update: 1.04 will be released in the next days, we just need to port some examples to playMaker and finish the documentation rework. Due to popular demand :) we added a railrunner example to the package. You can preview it here!

    Jake
     
  16. Ullukai

    Ullukai

    Joined:
    Aug 24, 2010
    Posts:
    737
    Awesome ! Can't wait to see and play all the new games coming out with this new railrunner example !
     
    Last edited: May 25, 2013
  17. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Quick update: We overhauled the performance example scene and made it available on our website: click me!
     
  18. Ullukai

    Ullukai

    Joined:
    Aug 24, 2010
    Posts:
    737
    cool... is that 1.04 update done yet ?

    and how do we get the update if we already bought Curvy ?
     
  19. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,331
    Great, the performance chart is very helpful.

    Would it be possible to add multiple Splines to the performance test. For example, what happens when there are 100 Splines at the same time?
     
  20. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    @Ullukai: 1.04 is complete now and will be submitted tommorow - should be live on the AssetStore on Monday or Thusday. And like every other package from the AssetStore, the newest release will be automatically available to you. When you enter the "My Assets" page in the AssetStore, you'll notice a message "A newer version is available" and the import button is replaced by a download button. Just download&import then and you're using the latest version.

    @Rocki: Each spline is an individual object, so there wouldn't be any difference performance wise. If you have 100 splines, multiply those numbers by 100. All parameters that affect spline performance (Type, number of Control Points/Segments, Granularity) are present in the test.
     
  21. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Hi,

    the 1.04 update is pending and should be available soon. Meanwhile, we updated the online documentation and the (complete overhauled) playMaker actions. Release notes for the new version:


    • New
      • Added Feature: Swirling! Swirl the orientation Up-Vector along segments or the whole spline
      • Added options to show tangents and UserValues in the editor
      • Added option to smooth edge tangents, resulting in smoother orientation change on sharp edges
      • Added a lot of new API methods
      • Added Rails example scene
      • Improved documentation
    • Changes
      • Changed Orientation calculation to Parallel Transport Framing, making it much more stable
      • Huge performance increase of Distance based methods
    • Fixes
      • Several fixes regarding caching
      • Fixed Tangent calculation

    Full release notes available here.

    Big thanks to all customers who reported errors and made suggestions for new features! We always appreciate user input and we're pleased to implement new features and improve the product. And there's more to come, we already have some nice ideas in stock.

    Jake
     
  22. GrooGadgets

    GrooGadgets

    Joined:
    Apr 2, 2009
    Posts:
    60
    Hey Jake,

    I just got back from a two week honeymoon to see your awesome updates and the excellent rail runner example. This is exactly what I needed for my game, thank you so much!

    Your fast and friendly support is very much appreciated, i'll be sure to give you a glowing review in the asset store :)

    Cheers,

    Simon
     
  23. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Congratulations, hopefully you got a great time! And I'm glad you like the example.

    Thank's a lot!

    Jake
     
  24. memetic-arts

    memetic-arts

    Joined:
    Feb 27, 2011
    Posts:
    82
    Hi -

    Curvy looks like a great tool, and great to see that you've got PlayMaker support. I've also been an avid iTween user, but am running into some issues with my latest project, and Curvy was recommended as it seems to be able to do some things that iTween can't. I'd appreciate it, though, if you could confirm. Basically, I'm looking for two features:

    1. Ability to programmatically accelerate/decelerate an object (or group of objects) as its moving along a spline, after the tween/motion has been started.
    2. Ability to tween on a spline containing multiple nodes of varying distances with a constant velocity. In other words, without having the object slow down around curves and speed up on longer straightaways . . .

    I've found solutions for both of these in iTween, but it will require some degree of integration and testing, which I'd rather avoid. If your tool can do it out of the box, you've got a sale. And if it's supported through PlayMaker Actions, even better!

    Thanks!
     
    Last edited: Jun 28, 2013
  25. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Hi,

    sorry for the delayed answer, I didn't receive a thread notification from the forum this time! If your questions aren't answered within 2-3 days (I usually check mails and forum every day), feel free to contact me by mail or private message to remind me.

    1. Sure, Curvy comes with premade scripts and actions to travel/tween a spline.
    2. You want to travel the spline by a constant unit distance, no problem. The option in Curvy's scripts/actions is called "Use World Units". Other options are to move by a constant F (results in faster movement on longer segments) or by angle.

    Cheers

    Jake
     
  26. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    We're happy to announce the release of Curvy 1.5! As implied by the big version jump (1.04->1.50), LOTS of features were added, so finally Curvy matured from a dedicated Interpolation tool to an all purpose spline solution featuring Mesh Extrusion and Object Cloning based on curves.

    Watch the new trailer video to see most of the new features in action!

    Release Notes

    New:

    • Added SplinePathCloneBuilder to dynamically clone transforms along a spline
    • Added SplinePathMeshBuilder to dynamically create a mesh representation
    • Added Export wizard to export closed splines as meshes
    • Added SceneView shortcuts for adding (G/Shift-G), deleting(H) and toggling Control Points (T/Shift-T)
    • Added option to let a Control Point become the first Control Point
    • Added option to CurvySpline.Add() to insert before (also available in the Control Point's scene GUI)
    • Added option to CurvySpline.MoveBy() and CurvySpline.MoveByFast() to change accuracy
    • Added option to GetApproximation() to return local coordinates
    • Added CurvySpline.GetBounds()
    • Added CurvySpline.MoveByAngle() and CurvySpline.MoveByAngleFast() to move until a certain curvation angle is reached
    • Added CurvySpline.OnRefresh event that will be raised when the spline updates
    • Added CurvySpline.InterpolateScale() and CurvySplineSegment.InterpolateScale()
    • Added CurvySpline.Destroy()

    Changes:


    • Improved inspector look&feel
    • Reworked GameObject->Create Other->Curvy menu structure into a subfolder to make room for future components
    • Added proper Undo support for all scene view operations
    • Reworked Constraints wizard

    Fixes:


    • Fixed TCB properties bug when multi-editing Control Points
    • Fixed distance to f returning 0.9999999 instead of 1 due to float inaccuracy
    • Fixed some crash cases when recompiling during runtime
    • Fixed broken AlignWizard example
    • Fixed a bug sometimes causing weird spline orientation when entering runtime
    • Fixed several minor bugs

    and there's more to come, expect an even greater editor experience and more nice features in the next in the near future!

    Attention!

    If you like Curvy, spread the word and tell your friends, write an Asset Store Review, we deeply appreciate it!

    Do you want to actively participate and shape Curvy's future? Tell us about your feature requests and ideas, make suggestions!

    Want to become a beta tester? You don't necessarily need to be a coder! If you're using Curvy regularly and got time to test new features and give feedback, feel free to contact us!


    Kind regards
    Jake
     
  27. memetic-arts

    memetic-arts

    Joined:
    Feb 27, 2011
    Posts:
    82
    Thanks, Jake, no worries about timing, we're all busy!

    In the interim, I actually found a way to do what I needed with Vectrosity, which I already owned. BUT, I also bought The Magic Box, and will most likely go for Curvy as well, so don't worry, you didn't lose a customer! ;-)

    Awesome stuff, really looking forward to digging in. And on that note, I had a question about your YouTube tutorials -- they seem to not have any audio, but the screens are so small that it's almost impossible to see what is being shown. . . am I right that there's no audio? Any chance you could add some? Or some kind of captioning? I know that's a tall order, but would really add value to the presentation.

    Thanks, keep up the great work!
     
  28. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    MB videos need a rework, I know. But Curvy's video is Full HD and all future videos will follow that standard. The next video will demonstrate Curvy's editing capabilities.
     
  29. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    695
    Hi Jake, just purchased... compliments, great tool!

    my request in a future update:
    -could be very usefull add a "drop on ground" (terrain or meshes) feature to easily move nodes above a surface.
    An example could be to place a road(SplinePathMeshBuilder), or a wall/fence (SplinePathCloneBuilder) over a terrain.
     
  30. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    +1. Very good idea. ;)
     
  31. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Good idea and added to the Roadmap!
     
  32. Bryan-Pope

    Bryan-Pope

    Joined:
    Apr 30, 2013
    Posts:
    14
    With this request of the spline following the terrain, could we also have something where the spline deforms the terrain by say lowering the terrain when we "push" the spline into the terrain or raise the terrain to match the spline?
     
  33. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Yeah, we'll see if this can be done, but it sounds like a useful feature.
     
  34. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    248
    I find it difficult to generate a smooth mesh for a floating track with this; it generates a bunch of up-down hills along the inner edge of triangles:
    $hills.jpg
    $More Hills.jpg

    With a horizontally-striped texture and the triangles highlighted in a light cyan:
    $Curvy Grid.jpg

    In this state, the track is far too bumpy for my uses, both visually and while adding mesh colliders. Some sort of post-smoothing would be required.
     
  35. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Hi,

    you're right, this result isn't intentional. Right now I'm on vacation, but I'm recording all errors and will fix them when I'm back in the office. You should ignore this bug for now, this will definitely get fixed asap.

    Jake
     
  36. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    248
    Will do. Thanks
     
  37. Jimww

    Jimww

    Joined:
    May 14, 2013
    Posts:
    63
    I just bought Curvy and while playing around with the Align wizard, Unity crashed.
     
  38. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Could you please send me a bug report using the "Question Mark"->"Send Bug Report" option from CurvySpline's inspector and please give me some additional infos like your OS and Unity version and detailed steps to reproduce the problem (if applicable).

    Thanks
    Jake
     
  39. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    248
    I haven't played around with the package enough yet to know if this is already possible or not, but copying points from one spline onto the end of another would be quite useful.
     
  40. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    You could do this manually by reparenting the control point GameObjects. However, the next version adds a bunch of editor functionality like Join/Split/Flip/Group etc...most of the stuff is already implemented and in testing.

    Jake
     
  41. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    880
    i buy it :) i have no road in MeshBuilder scène in game maybie is normal
    one way for calculate the light map ?
    i can acces api in java script
     
    Last edited: Aug 3, 2013
  42. Hesham

    Hesham

    Joined:
    May 29, 2008
    Posts:
    146
    Just wanted to say that this is a great tool by itself and the integration with playmaker makes it just awesome.
     
  43. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    @Kilik: Bug is already reported and will be fixed. And it should be fine using Curvy from UnityScript!

    @Hesham: Thanks, we do our best to deliver a tight playMaker integration.
     
  44. sinoth

    sinoth

    Joined:
    Jan 15, 2013
    Posts:
    30
    Currently if I assign a GameObject to a CurvyClonePath, it looks like that object has to stay "live" in the scene for the path to render correctly. What am I supposed to do with this rogue object? It would make sense to me that I give the CurvyClonePath a prefab and it can generate this prefab on the fly. I don't like having to keep that one section of the path live in the scene and just shuffle it away behind a wall or something. Am I missing something here?
     
  45. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    You're right, the CloneBuilder should use Prefabs- will be changed asap
     
  46. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    880
    This morning i have try assign SplineWalker script but i'am in Javascript so he not found the script and when i move him in Plugins
    he say another miss!
     
  47. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    Correction: You'll need to move the Curvy folder into Assets/Plugins, then move the Editor folder (Assets/Plugins/Curvy/Editor) one level up (becoming Assets/Plugins/Editor).

    I'll add this to the FAQ and Docs...
     
  48. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    4,746
    Does Curvy allow you to branch from one spline to another? If for example I have an object traveling down one spline and that spline intersects with another spline, I'd like to be able to have the object choose which spline to continue on.
     
  49. timhays

    timhays

    Joined:
    Jun 19, 2013
    Posts:
    12
    When I moved the folders as you mentioned, the example scenes are broken (MonoScript: the associated script cannot be loaded...)

    Also, can you please give a download link to your RoadSpline (curvyspline) asset that you used in your demo video?

    Thanks!
     
  50. Jake-L

    Jake-L

    Joined:
    Oct 17, 2009
    Posts:
    397
    All assets used in the video are part of the example scenes or generated on the fly (e.g. the rectangle mesh for the road).
    I tested calling Curvy from Javascript with Unity 4.0 and it worked when moving the folders the way Unity wants them to get compiled before Javascript kicks in. Even all example scenes I checked were running, no broken links. Perhaps you could try to reimport Curvy.

    Jake
     
Thread Status:
Not open for further replies.
unityunity