Search Unity

[Published] Spline plus- Spline mesh deform

Discussion in 'Assets and Asset Store' started by elseforty, May 21, 2018.

  1. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290

    Spline Plus is a compact branching splines system and advanced path following tool for Unity3D.

    Feartures
    • Spline Branching.
    • Compact Spline modeling tools.
    • Node Speed.
    • Node Normal.
    • Node Scale (Taper).
    • Node type : Smooth, Broken, Free.
    • Simple/Complex (Train) followers
    • Followers smooth Acceleration/Deceleration.
    • Followers smart Keyboard navigation at intersections,
    • Projected path following for simple followers.
    • Advanced Events system.
    • Spline projection into mesh.
    • API to Create splines at runtime.
    • Custom Editor and Use of Unity Reorderable lists.
    • Import/Export spline data (.SP files).
    • Copy/Past spline data between Spline Plus game objects.
    • Full source code included.
    • Detailed Documentation.

     
    Last edited: Feb 7, 2021
    mgsvevo and Mark_01 like this.
  2. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290

    Spline Mesh Deform is a procedural mesh generation modifiers collection for Spline plus.

    Deformed Mesh
    A custom meshes procedural mesh generation modifier for Spline Plus.
    Features
    • Custom meshes combination.
    • Modes: Alignment / Deformation.
    • Procedural mesh generation on all spline branches.
    • Materials sharing.
    • Processing: CPU Single thread - CPU Muli threading - GPU.
    • Translation, rotation, scale with randomization.
    • Node Scale (Taper effect).
    • Node Normal (Bend effect).
    • Mirroring.
    • Mesh trimming.
    • Copy/Past/Duplicate prefab meshes between branches.
    • Export mesh generated as a Unity prefab.
    • API to generate procedural mesh at runtime.
    • Online Documentation.
    Extrude
    Extrudes the spline plus shape and transforms it into a 3D mesh.
    Features
    • Fully customizable extruded mesh.
    • Correct Uvs, tangents, normals generation.
    • UVs rotation
    • Extruded mesh generation on all spline branches
    • Node normal (Bend effect).
    • Node Scale (Taper effect).
    • Export mesh generated as a Unity prefab.
    • Online Documentation.

    Tube Mesh
    Tube mesh transforms spline plus branches into fully customizable 3D mesh tubes.
    Features
    • Fully customizable tube mesh.
    • Correct Uvs, tangents, normals generation.
    • UVs rotation
    • Tube mesh generation on all spline branches
    • Node normal (Bend effect).
    • Node Scale (Taper effect).
    • Export mesh generated as a Unity prefab.
    • Online Documentation.
    Plane Mesh
    Plane mesh is a simple and straightforward Spline mesh deform modifier, it is used to transform the spline plus branches into a plane mesh, similar to the Unity line renderer.
    Features
    • Fully customizable plane mesh.
    • Correct Uvs, tangents, normals generation.
    • UVs rotation.
    • Plane mesh generation on all spline branches.
    • Node normal (Bend effect).
    • Node Scale (Taper effect).
    • Export mesh generated as a Unity prefab.
    • Online Documentation.
     
    Last edited: Feb 7, 2021
  3. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Hello,
    spline plus path following advanced is finally approved by the unity asset store team,
    here is the asset page link
     
  4. chrisabranch

    chrisabranch

    Joined:
    Aug 15, 2014
    Posts:
    146
    i'm making a 2.5d game. can the character controller jump with out being locked into the path. $50 is a lot so i need to know it will work with 2.5d games.
     
  5. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    yes you have full control over position rotation and scale,
    in your script instead of using "yourPlayerVarName".transoform.position for the jump behavior, you need to use SplinePlus.Follower.Position instead , same for rotation and scale
    you can see those variable in the inspector image i posted under Follower settings
     
  6. richardzzzarnold

    richardzzzarnold

    Joined:
    Aug 2, 2012
    Posts:
    140
    Can you make trains with this system?
     
  7. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    hello,
    yes you can
     
  8. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Version 1.1
    will be released this week or the week after,

    this is a list of all the new features added,
    *Spline+ now supports multiple followers ,
    *the branch type solution was replaced with an automated solution "no branch type setup is needed anymore"
    *an import feature to merge splines together is added,
    *API to auto generate paths with curvatures at nodes "city roads for an example"
    * sub tool to auto generate paths , no editor editing is needed ,
    *more performance optimization
     
    tarahugger likes this.
  9. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Hello,
    Version 1.1 is gonna be available this week , here is a screen of the new Spline+ inspector also as the Path generator new feature of spline+ which will allow you to create complex path system in no time , all you have to do is provide the gameObjects which will be converted later into path points



    here is a list of the most important features added in this version

    * multiple followers supports,
    * head follower feature Or "train mode" this will allow you to define a follower as a head and the other followers will follow track , this will help you create a train animation in no time
    *the branch type solution was striped ,Spline+ will do that work for you so you ,
    *an import feature to merge splines together is added,
    *path generator tool which will allow you to create complex path system in no time , all you have to do is provide the gameObjects which will be converted later into path points.
    *API to do some awesome stuff with Spline+
    *callbacks that gets called whenever a follower is on a branch fork
    *more performance optimization
     
  10. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Head follower On
    Random branch picking On
    http://

    Head Follower Off
    Random branch picking On
     
  11. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290

    Hello,
    version 1.1 submitted for approuval
    Demo
     
  12. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    here is a couple of video tutorials i made for this new version









    don't hesitate in case you have any question
    regards,
     
  13. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
  14. chrisabranch

    chrisabranch

    Joined:
    Aug 15, 2014
    Posts:
    146
    i want to use it with opsive Third person controller as a 2.5 game? i know i asked a similar question already , but i would like to know will it work with that asset. i'll buy right now if its a yes :)
     
  15. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    hello
    i haven't used opsive third person controller before, the way to approach this is when you want to freely move you character in you scene you will use opsive character controller and disable spline+, if you want your character to move along a spline then you enable spline+ and disable the opsive component attached to your character, really simple,
    Spline+ acts like a character control system just like opsive but for paths only,
    try the tool if you don't like it refund is promised
     
  16. spetsdesign

    spetsdesign

    Joined:
    Jul 11, 2018
    Posts:
    4
    Hello i tried Spline+ and i'm having a little trouble moving a platforms without rotation"i want translation only ",
    i know that i can simply use Vector3.MoveTowards , but i want to use Spline+ events ,
    can you please help me achieve this ,
    thanx
     
  17. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    @spetsdesign
    hello
    you need to comment line 144 & 145 in a c# file callled "followerClass" in case you want to use translation only ,

    Code (CSharp):
    1.       if (follower.LookAtGO == null) follower.FollowerGO.transform.rotation = DistanceData.CurrentRotation;
    2.      else follower.FollowerGO.transform.rotation = Quaternion.LookRotation(follower.LookAtGO.transform.position - follower.FollowerGO.transform.position);
    the problem with this is that it will disable rotation on all gameObjects using Spline+
    if this is problem for you let me know
     
  18. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341
    Can I create a path at runtime? Thanks.
     
  19. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    @ikemen_blueD yes you can, there is an API just for that
    check this video
     
    ikemen_blueD likes this.
  20. spetsdesign

    spetsdesign

    Joined:
    Jul 11, 2018
    Posts:
    4
    hello again,
    the fix you gave me works , but now i need to have rotation activated for some spline+ gameObjects and disabled for others, is there a way you can help me achieve that
    thanx
     
  21. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    @spetsdesign Hello,this is planned for the next version 1.2,
    i have added a toggle box where you can set that On and Off, can you wait until next week for the new update or you are in a hurry?
     
  22. spetsdesign

    spetsdesign

    Joined:
    Jul 11, 2018
    Posts:
    4
    thanx alot i can wait
     
  23. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290

    Version 1.2 is on the way,

    new features:

    * full control over speed for every branch fork,
    * enable disable rotation,
    * keyboard input improvement "space key added for jump animation"
    * broken path point type branches switching bug fixed

    jump keyboard input preview


    full speed control on every branch fork preview ,
     
    spetsdesign likes this.
  24. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    @spetsdesign Hello here is a preview of the enable disable rotation feature

    rotation ON

    rotation Off
     
    spetsdesign likes this.
  25. spetsdesign

    spetsdesign

    Joined:
    Jul 11, 2018
    Posts:
    4
    @elseforty exactly what i wanted,
    thanx alot,
     
    elseforty likes this.
  26. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290

    Hello,
    version 1.3 will be available very soon
    some of the new features:

    * Curve to fully control Speed value on a branch
    * Curve to fully control Normal orientation on a branch
    * Enable Disable Rotation on a specified axis XYZ
    * Source code enhancement
    * Performance optimization
    * "Dead branch" is a new feature to create path following for stairs
    * Enhancement of the way tangents are calculated for broken pathPoints

    A look off the new inspector


    Curves for speed and normals orientation


    "Dead branch" stairs path following feature
     
  27. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290


    Hello,
    version 1.4 is on its way with so many cool features that will make your game dev life more easy
    here is a list of some of the biggest adds to this new version,

    - Full keyboard control system that includes acceleration and deceleration with brakes force (ideal for trains and cars)
    - Introduction of shared path point type keyboard, this will help switch branches using your keyboard inputs.
    - Auto spacing for followers in train mode(you don't have to set the progress value of each follower separately anymore)
    - Path point handles are adjusted automatically when created based on nearby path points position
    - Smooth path points feature with radius value that you can play with, this will help you reduce your path modeling time drastically .
    - I've also added some new methods to the runtime path generation API and changed some methods name for the sake of code clarity(if your code does not work anymore just check the documentation that i have uploaded online )
    - More performance optimization
    - New demo scenes included with new 3d art.
    - Stairs mode "dead branch" was stripped from the new version "if you need that let me know here or send me an email"

    i'll post some images bellow to showcase the new features

    if you have any question or suggestions for new features please let me know here or email me at elseforty@gmail.com
    regards,
     
  28. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    here is some images for shared path point keyboard type setup example

    here is a demonstration,
    navigation is done using keyboard arrows
     
  29. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Crowd control behavior is created using the multiple followers option and then the translation and rotation feature for each follower to create a diversity feel


     
  30. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Spacing can be very frustrating if you have a large number of followers, i made this feature to make easy for you,


    as you can see spacing can be turned On/Off in case you want to manually enter progress for each follower separately
    in this case the value is 5 and as you can notice followers progress is incremented by 5 0,5,10,15 etc

     
  31. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Acceleration ,deceleration and brakes feature was added to this new version of spline plus ,it's ideal for trains and cars,



     
  32. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Smooth path points feature with radius value that you can play with, this will help you reduce your path modeling time drastically .
    this works on both shared path points and normal path points

    normal path point example


    shared path point example
     
    DrOcto likes this.
  33. WrathOfThePixel

    WrathOfThePixel

    Joined:
    Mar 17, 2018
    Posts:
    2
    Hi, I've been trying your tool for a few days, and I have a couple of questions for you, if you can help me please.

    Is it possible to control a point tangent orientation and length with the API ? I tried to play with PathPoint.Tangent and other methods with no success.

    Also, is it possible to set an accurate numerical position to handles in editor mode, I can't find another way than moving the point with the mouse and it becomes impossible to get accurate shape/symetries/etc. ?

    Thanks

    Vince
     
  34. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Hello Vince,
    i think you mean path point handles not tangent ,
    to answer your question based on the assumption that i have made above, yes of course you can, to do that you need to access PathPoint Point1 and Point2 Transforms,

    here is an image explaining the components of a path point to help you better understand,


    Point,Point1,Point2 are 3 game objects transforms, that are usually hidden from the hierarchy to keep things clean,
    i unhide them in the image above so you understand better,

    to modify them in code :

    Code (CSharp):
    1.         myPathPoint.Point.position = new Vector3(0, 0, 0);
    2.         myPathPoint.Point1.position = new Vector3(10, 0, 0);
    3.         myPathPoint.Point2.position = new Vector3(-10, 0, 0);
    since Point1 is alway the same distance as Point2 from the center Point, then you can just write

    Code (CSharp):
    1.             myPathPoint.Point.position = new Vector3(0, 0, 0);
    2.             myPathPoint.Point1.position = new Vector3(10, 0, 0);
    3.             myPathPoint.Point2.localPosition = -myPathPoint.Point1.localPosition;
    or if you want to modify Point2 instead

    Code (CSharp):
    1.             myPathPoint.Point.position = new Vector3(0, 0, 0);
    2.             myPathPoint.Point2.position = new Vector3(10, 0, 0);
    3.             myPathPoint.Point1.localPosition = -myPathPoint.Point2.localPosition;
     
  35. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    @WrathOfThePixel for setting the handles position in the editor , i can quickly include that in the next version "next week", or if you're in hurry i can write you acode here to past in your c# spline+ files ,
     
  36. WrathOfThePixel

    WrathOfThePixel

    Joined:
    Mar 17, 2018
    Posts:
    2
    Thanks for your fast answer.

    Yes you got it, I mean handles instead of tangent (well actually, the handles does define a tangent to the curve, that's why I thought I could use the Tangent property, but I guess you use that in another way).
    I'm not in a hurry, being able to do that programmatically is fine for my test cases. I think it would be very convenient to have that for future versions though ;)

    Vince
     
  37. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    @WrathOfThePixel you're welcome,
    don't hesitate in case you have another question,
    regards,
     
  38. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    hello guys version 1.4 submitted today for review, expect it to live in the upcoming days,
    i made new demo for spline plus,here is it
     
  39. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    @WrathOfThePixel
    hello i have included the Vector3 position fields for the selected path point
    Regards,
     
  40. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    332
    I'm interested in using spline plus for a traffic system. Is it possible to have gameobjects that are following the path also react to other events. For example, traffic lights?
    How about reacting to other objects that are following the path - for example have a faster moving object slow down when it reaches the (extended) collider of an object in front?
    In the same way, can I have an object wait till another object has finished crossing its path?
     
  41. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    @copycat-LOL Hi, yes i believe you can build up a traffic system with the help of spline plus,
    the most important thing you need to have control over is speed for each follower separately which the thing that spline+ offers, you can also know on which branch each follower is currently on as well "if that will help",
    for followers reacting to each other is something you need to develop yourself , it's not included in spline plus but i can gladly help you achieve this if you decide to use spline +, i can provide you with a function that you can call to decrease the speed gradually , something in this pattern for an example void DecreaseSpeed(float newSpeed,float time) but you need to correctly play with this to get to the result you want,
    for followers crossing path , the issue will be detecting when the collision is about to happen ,i guess you will need to do some raycasting to detect that, the speed control thing can easily be done using spline+,
    let me know in case you have any other question,
    regards,
     
  42. Colin_MacLeod

    Colin_MacLeod

    Joined:
    Feb 11, 2014
    Posts:
    332
    Hey, thanks for getting right back to me.

    Yes, I understand this will require custom code - that's fine. I'm just trying to work out whether it goes "with the grain" of Spline Plus.

    I have a few more questions:

    1) Am I right in thinking there can be multiple spline branches, with many paths leaving (or joining) at the same point (for my intersections)?
    2) Do I have full control over via custom game logic which branch to follow at any time?
    3) Is it possible for one follower to overtake another?
    4) Finally, is there a way to get the angle of the tangent to the curve at any given point in the spline? I need some way to set the direction of the vehicle wheels.

    Thanks again!
     
  43. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    hello,
    1) yes, you can have an unlimited number of branches at an intersection
    2) yes,you a have full control over which branch your follower will switch to at an intersection,
    there is currently 3 options available in spline+
    Random branch picking,
    Defined branch picking"you pick which branch you want your follower to take"
    keyboard branch picking "your follower will pick the next branch based on keyboard inputs"
    3) for the moment this feature is unavailable ,there is an offset option available but i don't think that it will be useful in this case,
    4) yes you have access to tangents and normals at any point of the spline
     
  44. sandBucket2

    sandBucket2

    Joined:
    Mar 26, 2016
    Posts:
    29
    Hey elseforty,

    I'm curious about this spline product and I had a quick question: Say I have 3 straight line splines (lanes) and my character decides to go to one of the other lanes. Could I disable the current lane the character was on, causing the character will automatically interpolate to the closest lane?

    Edit: the character would be moving constantly in the lanes
     
  45. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    @sandBucket2 Hi, i'm not sure if i fully understood what you mean by " Could I disable the current lane"
    do you mean if the branch the follower is currently on was disabled then would the follower move automatically to next branch,
    well this behavior does not exist currently in spline+ but it could easily be achieved with some extra coding,
    i can help you achieve this if you decide to use spline+ , let me know if you do
    regards,
     
  46. sandBucket2

    sandBucket2

    Joined:
    Mar 26, 2016
    Posts:
    29
    Thats exactly what I need it to do, I've made a couple of typos (im just gonna use linear splines for 3 lanes the player will follow, but it will be curved eventually). I want it to be seamless, not a sudden interrupt, but rather a smooth transition from one spline to the next while keeping the illusion of momentum with the character.

    EDIT: the concept of the game is similar to an endless runner.
     
  47. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    i see , but i'm not sure about how the transition will look like if the branch curvature is smooth and not a strait line
    can you explain this so i can have a better idea to answer you ?
     
  48. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Hi,
    here is new spline + update
    i managed to create this new path following mode that i'm sure you will find use of in your projects , i'll include this in the next version

     
    Mark_01 likes this.
  49. elseforty

    elseforty

    Joined:
    Apr 3, 2018
    Posts:
    290
    Hi,
    version 1.41 was approved by asset store team today, this version contains important fixes for some issues that was detected by users , please update to this version ,
    have a nice day you all ;
     
  50. holdingjason

    holdingjason

    Joined:
    Nov 14, 2012
    Posts:
    135
    Hi. Very interested in your product but had a few questions based on our needs.

    1. We want to create "paths" around an island etc that the NPCs will loosely follow during pathfinding. We are using a* pathfinding found here https://arongranberg.com/astar/ currently with his navigation/movement scripts. The idea would be to do normal pathfinding but when near a spline that will take us further along the nodes from a* we will follow the spline and then hop off and continue back on a* nodes. I can see someways to do simply by following the a* nodes backward from the end point and seeing if any splines are near, then following the splines back to character and doing a rough distance calc to see if the spline would make sense. Just wanted your thoughts on how and if that makes sense with your product. Might also be a nice hook for you btw to incorporate spline pathfinding with the main pathfinding tools out there like a* etc.

    2. Along with #1 ie following paths wondering if your crowd option would work to avoid NPCs following the same paths/spline from colliding or overlapping one another.

    Every thing else we would use it for seems pretty straight forward ie entering exiting door ways. Just move to a starting point near the spline and hop on, let the spline system take over and then hop off again.

    Thanks.