Line / Polyline Reveal Parameter

Avatar
  • updated
  • Under Consideration

Would be super cool if it would be possible to define a start and end ratio for lines. Would boost the possibilities for animations a lot IMO.
See this asset: https://assetstore.unity.com/packages/tools/modeling/data-renderer-2d-102377 (4th picture)

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Avatar
Freya Holmér creator

By ratio, do you mean being able to set the thickness of each end of a line shape?

(polylines already support setting width per-point)

Avatar
olleyOop

No. It's about to define by what e.g. percentage the line is "filled" or "progressed" from the beginning and the end.

You can see it in this video at second 57

;feature=emb_logo
Avatar
Freya Holmér creator
  • Under Consideration

Ah, like a reveal parameter!
This is something I've been wanting too, we'll see! It's one of these global things that's a bit of a multiplier to other shapes. As in, if I add reveal to Line and Polyline, people will (understandably)expect to have a reveal parameter on all other shapes too, but maybe we can start with the more useful ones

Avatar
olleyOop

Yes, let's start with the useful ones that let you reveal linesss :)

Avatar
ben ben

Agree, this is a very useful feature.

Avatar
Lollie

Found myself wanting this very strongly today. Hope a reveal parameter finds its way into lines and polylines eventually!

Avatar
Freya Holmér creator

the tricky part for me with the reveal parameter is that almost all reveal effects can be implemented already as is, as an animation of existing parameters

revealing lines is animating point B from start to end


revealing arcs would be animating angle B from start to end


revealing discs would be animating radius from 0 to r

etc.


And so having this as an actual shader property feels wasteful, but if it's not, it would be a sort of, pseudoproperty, that doesn't actually get passed to the shader, but rather modifies the input data before being rendered

There are some exceptions, but it makes me a little hesitant since it amounts to adding meta-features, which I'm worried about when it comes to scope, which is the same reason I don't add meta-shapes (wireframe cube, outlined rounded arc, etc)

Avatar
Lollie
It is a genuinely valuable feature, and can be more involved than animating two points.

In my experience (with After Effects plug-ins, so excuse any differences), a line reveal has three properties: Start, End, and Offset. You can set a Start and End range (0 — 100%) to reveal a percentage along the path, and Offset (0 — 360°) the revealed section along the entire path, with a complete cycle restoring it to its original position.

Image 506


The points on a polyline currently cannot be animated, which is where this becomes much more valuable. I don't think closed shapes like rectangles or polygons have a good way of revealing lines either, unless someone wants to attempt some ugly trickery with dashed lines and gaps.
Avatar
leonhard lass

A performant reveal feature for polylines would help me a lot too! Even if its just on a line segment basis (reveal segment by segment), but a continuos option would of course be fantastic. Thanks for considering it!