Splines Feedback

This a thread about the experimental package of the Splines, ie an older version. A much better newer preview version will be released soon.


First time user and early feedback is important, so I thought I’d share my experience on the experimental package.

Adding a spline was easy, modifying it wasn’t. I had to figure out that there’s a small dropdown here that you have to change:

I somehow can follow why this is there, but when I click on a spline gameobject, i’d like to be in its edit mode. However, if that separation is necessary, then there should be a keyboard shortcut.

In order to edit a knot (why is it called knot, isn’t that an anchor?), you have to first click on each and every single one of them. That’s too many clicks:


The handles should all be visible and instantly modifiable.

Inserting a new knot is circumstantial. You can only insert new ones along the spline, but not outside.

7615153--946372--upload_2021-10-30_7-20-33.png

So you have to click the insert tool first, then insert the knot along the spline, then move it outside. No idea yet how to snap that point when you move it.

Moving the start point is an arrow down. That’s confusing. It should be an arrow along the spline since all you can do with it is move the knot along the spline:

5 Likes

The rotation arrow is nice, but this should be a delta. Or in addition to the arrow it should show the delta from the up direction:

Could be visualized differently, eg as cake shape with transparent fill.

1 Like

It is visible if you select the Bezier mode instead of Catmull mode (which should also show the tangent direction by default though)

Not for me:

7615177--946393--upload_2021-10-30_7-40-45.png

I can only move 1 knot here. In order to move another I first have to click on it.

I moved the spline. It’s nice that all knots move with it, but the next question arises instantly: How do I snap them all to the terrain?

I wanted to write my own spline editor, but there doesn’t seem to be an api which allows to delete a knot:

There’s the AddPointToEnd method. But for the user it’s irrelevant where the spline starts or where it ends. There should also be an AddPointToStart method. This also reflects in the UI:

I can only add a point at the end, not at the start.

Here’s an example about how I did the editing with YAPP:

It would be really nice if we could get something like that from Unity.

Or at least if we could write our own editor.

2 Likes

Deleting should delete the closest knot at the press of a hotkey and mouse click. Not click, then hit the delete key and that over and over. That’s tedious, especially for longer splines.

Here’s an example, starts at 01:19:

1 Like

Btw regarding the above mentioned adding: The adding of a knot is nice this way:

7615231--946411--upload_2021-10-30_8-19-33.png

But this kind of adding is snapping. That should happen only using a snap hotkey.

Some of my knots are in the air, no idea why. I thought they should snap to the terrain.

Also, I added 33 knots. How do I restart? There doesn’t seem to be a clear or reset button:

1 Like

Why are the knots using float3 instead of Vector3?

I guess to make them compatible with burst or integrate them with DOTS in the future

3 Likes

Ah, that makes sense then.

Please add a triangulator utility class, e. g. used for the closed spline. Should consider the resolution of the curve. I tried with the Spline Square preset and a quick triangulator I took from the web:

7615297--946429--triangulator.gif

It can come in very handy, e. g. using terrain projection:

Basically one could select multiple houses as settlement, align their height, create a closed spline around their bounds with height of their lowest vertices, create a triangulated mesh (invisible, on a dedicated layer) as the “floor” and drag that settlement around while the terrain aligns properly to the mesh. Not just the houses, but the spline area around them. It’s a special use case, but a valid one nonetheless. But it starts with the triangulation.

4 Likes

That could also be cool for intersections. IIRC they want to focus on a good editor UX though so that the core functionality (creating splines) is really solid before adding more utilities though, which IMO seems like a good way to go. Otherwise I agree with all your suggestions, except that those might be a good fit for a community/open-source spline tool based on Unity’s splines :slight_smile:

2 Likes

It would be nice to have a simpler default constructor additionally:

2 Likes

Hey! This thread is awesome, thanks! I’m super busy for the next few days, but I’ll try to find time for good detailed answers. Thanks for all the info!

2 Likes

Yup, this gets much better in the updated Unity alpha - these “Edit Modes” are a more clear toggle.

Yup, we also are adding a generic “Enter/Exit Editing” keyboard shortcut.

So, both yes and kinda. We took the path of “treat all these sub-objects exactly like GameObjects, enabling anyone to use all the same selection/manipulation/snapping/etc tools”. That means interacting with12 anchors/knots is the same as 12 cubes.

However, we also prototyped a “Direct Manipulation” method, and hope to add this in the next version - essentially a way to click-drag on a thing, and immediately (“directly”) manipulate it, skipping all those annoying clicks.

That will also become (not sure when) a method available for GameObject manipulation, too!

This was what the devs felt made sense when beginning work. Still TBD final naming.

Just like you would for GameObjects :slight_smile:

  • CTRL will snap to increments
  • CTRL+SHIFT will snap to surfaces (I believe this currently requires a collider, though)
  • V will snap to vertices

Another item we’re working on for the next version - taking it a step further into branching and merging.

Do you mean:

  1. Hover on the knot
  2. Hit hotkey
  3. That knot is deleted

I think I’m misunderstanding?

What sort of “restart” would you expect? For example, would it become a straight line with two points in space … or delete all … not sure what “restart” would be?

4 Likes

You could always use default if you just want an uninitialized knot. Otherwise I suppose we could omit rotation?

As mentioned above, yes this is for DOTS compatibility but also because we are using the Unity.Math package rather than UnityEngine.Mathf.

That would be cool, I agree. Possibly something we could do with ProBuilder integration, as there is already a triangulation library implemented there.

Yeah, we’ll need to add a Remove method. I believe we even have a task in the backlog for the Spline class to implement IList, which would make this much easier to work with in custom editors.

3 Likes