Corgi Splines - Extremely fast and easy spline editor and jobified spline access.

Link!
Asset Store URL: Corgi Splines | Utilities Tools | Unity Asset Store
Documentation: Corgi Splines Documentation - Google Docs

What’s this?!
Corgi Spline is a spline editor plugin for Unity. It offers Burst compatible jobified acces to spline data out of the box, allowing for very fast and efficient spline access for multi-core spline projection and evaluations.

Why Corgi Spline??
I have been using Dreamteck Splines for a couple of years on a project at work. Their spline editor seems okay at first; but, I ran into so many issues that have created such a deep eternal hatred for that plugin, which pushed me to finally just making a better spline plugin. There were a lot of issues, such as slow spline access, buggy editor experience, bad ui, and overall madness in their source code; so I used the pains from that experience to create an all around better solution.

  • Corgi Spline has a very simple and intuitive editor experience, so you can get straight into creating and editing splines that fit your needs.
  • I’m supporting multiple spline types, such as Linear, Bezier, and B-Splines.
  • Burst compatible Jobified access, so you can take advantage of many CPU cores to further increase the speed of frequent projections and evaluations.
  • Straightforward scripting API, no confusion on how it works. Everything you can do in the editor is supported at runtime via the API.
  • Full source code included in the asset store package.
  • By request, many types of procedural meshes tied to splines have been added to the plugin since release. All of which are burst-compiled jobs.

Examples, please!
I’ve included a few example videos in the Unity Asset Store page. Please check them out.

38zult
Need help?
If you need any help with anything Corgi Spline related, just email me: coty@wanderingcorgi.com

2 Likes

Hey I‘ve been looking around for some spline solution that leverages the job System for high performance and just found this post. Looks great, will check it out.

Thanks. Let me know what you think. I’ve been using it in side projects, but outside input always helps improve things.

Will do, when I get to implementing it.

Pushed an update. Mostly minor fixes around the self space spline setting.

Hello! I have also been looking around for a spline system that leverages Unity’s job system and burst compiler and came across this thread. I am very interested in purchasing this asset but I would like to ask if it is possible for this asset to slowly fill up a spline path with meshes from the point of origin to the end of a spline path? I have attached a gif showing what i mean:

weeperfectbats

Here you can see that I have a simple spline path, and I have a simple cube mesh that slowly fills out over the shape of the spline path. I need to be able to do this at runtime without incurring too much of a performance cost for mobile devices. I was wondering if your asset with job system and burst compiler would be able to achieve this? Thank you for helping! :slight_smile:

Yes! It would be possible. I’ll see if I can throw together an example script on how to do this.

Ouh thank you thank you!! :smile:

Just to clarify; are you looking for a mesh that is created from the spline; or do you simply want something like gameobjects being instantiated along the spline?

Here’s an example script that comes with the project already: rmmgj7

Is the exact effect you want a mesh that “fills” in along the mesh? So procedural mesh like in this video, but coming in over time? Are you wanting the mesh itself to come in over time, or would your effect be better if the mesh always existed (created all at once, and then a fragment shader makes it look filled in over time?)

Out of curiosity, does it support constant rate movement regardless of how far apart the points are? My own stuff here does but seeing yours is jobified is compelling!

Also any DLLS or allocations?

Constant rate is possible, yeah. I personally tend to default to the simplest version though, which is just project, move, project, move, haha.

edit: since this was posted, ProjectDistance() has been added, which allows very accurate constant speed movements along splines of any complexity.

1 Like

I am looking for a mesh that is created from the spline. Yes! just like in your video, procedural mesh along the spline but it comes in over time. Would I be right in saying that if the mesh always existed (created all at once, and then a fragment shader makes it look filled in over time) would be better in terms of performance? If yes, then I would definitely prefer that!

I have attached a gif showing you exactly what i wish to do:

digitalpreciousgalah

Here you can see that I am using Dreamteck’s spline. The spline is in the shape of a polygon, and I would like the mesh to slowly fill up. In dreamteck, I am doing this easily by adjusting the clipto value. However this costs a lot of performance even on a m1 mac (a lot of gc, and takes about 6ms every frame):

7245950--872927--Screenshot 2021-06-17 at 1.42.40 PM.png

I hope this shows better what I would like to do >< Thank you!

Oh, I see exactly what you want! While yes, a fragment shader with a clip() would probably be a nice optimization it would be project-specific, not something you’d want built into the spline plugin. A clipto in the meshbuilder is definitely do-able though!

I made this addition to the spline based mesh builder helper script in the project this morning. I also opened the profiler to show what a single burst’d job looks like. Performance is mostly determined by the Quality setting seen in the helper script. It’s set to 256, setting to 512 would roughly double time taken to mesh, while halving it to 128 would roughly halve the time taken to mesh. Meshing with this script can be Async, which potentially can remove most of the time taken on the main thread, as the heavy work would happen on a job thread.

0pazaq

I want to note, it only took me a few minutes to make this addition to the existing meshing helper script (showing how easy it is to use this plugin). I’ll get it pushed as an update to the asset store soon.

7247570--873221--upload_2021-6-17_9-13-38.png

1 Like

Oof! Those are some beautiful numbers! Thank you so much for taking the time to set all these up! Just got your asset, am incredibly excited for the new update to arrive ^-^v

Thanks! I’ve just pushed the asset store update. If you have any more requests, feel free to send them my way. Emailing me will get the fastest response. coty @ wanderingcorgi.com.

If you’d like some more types of procedural meshes or something like that, I could whip them up pretty fast. I’ve done a lot of work in that area in the past.

Ouh! alright, I will keep that in mind! Thank you for being awesome possum! :slight_smile:

1 Like

Just pushed an update to further improve meshing, by request.

* optional end caps on the generated meshes
* closed meshes no longer intersect, they will also stitch if the end cap option is enabled
* consistency between spline types closed loops
* added the option to stretch uvs

v9dnqi

2 Likes

Great, thank you!

Just pushed another small update.

* fixed a subtle bug when sampling a Closed BSpline type Spline
* fixed an issue with built_to_t being 0
* remeshing from changing built_to_t will now maintain vertex positions from the previous remesh analytically, so no more subtle jitter when trying to animate. the final point is also shifted such that it creates a smoother animation.

7297543--883216--6xshBeLpAf.gif

1 Like

Pushed a new update. Improved the mesh builder script a bit more, and added a new mesh builder script. This one generates tubes. The quality of the tubes are greatly configurable. I’ve also included a bit of angle checking within the mesh generator, so long stretches of straight lines won’t generate tons of vertices.

7317898--887791--3KcbgPR3hn.gif

1 Like