Let lines simultaneously been drawn

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Xav
Posts: 1117
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Let lines simultaneously been drawn

Postby Xav » Wed Jun 20, 2018 5:25 pm

Moini wrote:Yeah, I know, I wanted to make a pun... something less ordinary.


Conversely you also need to think about discoverability. It would be nice to think that this extension might make it into a later release of Inkscape, in which case you really want a simple, obvious, descriptive name so that someone looking through the menus for this sort of functionality can find it easily.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

tylerdurden
Posts: 2088
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Let lines simultaneously been drawn

Postby tylerdurden » Wed Jun 20, 2018 9:57 pm

Wow Moini, this is just great... Thank you for diving right in!

Naming it "animate stroke" would be direct (if not boring).

But, reflecting on the OP's interest, how about "Path Inscribe" or "Stroke Writer"? Particularly if the extension can read the entire document and animates all the paths sequentially... isn't that what VideoScribe does?

I'm staying away from using x-scribe, since "Videoscribe" is a registered trademark... but anything using derivations or synonyms is fair game in my book. US law rests on "reducing confusion", so if it doesn't rhyme or have the same exact words, we're good.

:mrgreen: :mrgreen:

(I'll register and post wishlist items for the extension on GitLab.)

TD
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Wed Jun 20, 2018 10:05 pm

I like Brynn's 'ghostpen' a lot... But there's a German ghostwriting agency named like that, so it wouldn't be a wise choice, unfortunately.
So, something ordinary it will be. Line Animator, then, as it seems a bit more obvious than Path Animator (which sounds a bit more as if I'd be animating the d attribute).
Thanks for all the input, Xav, TD and Brynn, it was very helpful!
Last edited by Moini on Sat Jun 23, 2018 4:12 am, edited 1 time in total.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Wed Jun 20, 2018 10:07 pm

Repository name changed, so its primary web address has now changed to:
https://gitlab.com/Moini/ink_line_animator/
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Fri Jun 22, 2018 12:08 am

First working version available. Example created with it:

https://gitlab.com/Moini/ink_line_anima ... mation.svg
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
Xav
Posts: 1117
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Let lines simultaneously been drawn

Postby Xav » Fri Jun 22, 2018 1:02 am

Very cool. A few suggestions, I hope you don't mind:

* Should the extension be in a sub-menu of "Web", since the animation only runs in a browser?

* Add support for animation-direction.

* When using animation-delay there's a slight problem, in that the fully rendered path is visible for the duration of the delay, then the animation kicks in and the path disappears before being drawn. For animation-direction: reverse (or alternate-reverse) this gives a rather nice effect of the line un-drawing itself. But for forward direction animations it largely defeats the point of having a delay - that being the ability to sequentially make lines draw themselves.

I can see two solutions to this, neither of which is perfect. You can add the initial stroke-dashoffset to the object's own style (but that then makes it disappear in Inkscape). Or you could add a second animation which runs for the duration of the animation delay, "animating" the stroke-dashoffset from its initial value... to its initial value. Effectively you'd be creating a pair of chained animations where the first one sets an initial state, but does nothing else, then the second one takes over after the specified delay.

* I would lose the ability (requirement?) for the user to enter a unique name for the animation, and instead just derive one yourself from the path's ID. Already I've accidentally overwritten my second path's parameters when I meant to replace those for the (selected) first path, because the field still held the last used value for the animation name.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Fri Jun 22, 2018 2:37 am

* I prefer having it in Animation, I think that's going to make it easier to find for the average user. As Inkscape doesn't show *any* kind of animations (e.g. gif), there's not really a potential for confusion - all animations need to be viewed with an external tool. I'll make sure it's very obvious that one must look at the SVG in a browser.

* Animation-direction added to wishlist. For a simple change of direction, path direction can be reversed for the same result, soit's mostly relevant for back-and-forth. Edit: mh, not correct. It could have all four modes: eraser, pen, draw + erase, erase and redraw.

* Yes, that second animation is an option to deal with the delay issue (hadn't even tested it yet, lol).

* As for the last suggestion: It's because I have groups of paths that can be animated at once, so I need an ID. Of course, I could make up a random one, but then users cannot modify an existing animation. It's intentional, to allow for later modification without having to remove all, then reselect everything (see README). It also helps when you just want to remove a specific animation. I cannot list them in an extension dialog, so users need a way to know what they have.

Thanks for testing and for the feedback, Xav. I'll have another look at your suggestions later, need to go now :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
Xav
Posts: 1117
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Let lines simultaneously been drawn

Postby Xav » Fri Jun 22, 2018 5:28 pm

Moini wrote:* I prefer having it in Animation, I think that's going to make it easier to find for the average user.


Easier to find, but more confusing, I think. You and I know that Inkscape doesn't do animation natively, but a new user doesn't. It's not a problem while the extension needs manual installation, as I think you can assume a reasonable amount of familiarity with the program in that case. But if it ever makes it into a release build (and I think it would be a great extension to be in the default set), I can see new users easily getting confused.


Moini wrote:* As for the last suggestion: It's because I have groups of paths that can be animated at once, so I need an ID. Of course, I could make up a random one, but then users cannot modify an existing animation. It's intentional, to allow for later modification without having to remove all, then reselect everything (see README). It also helps when you just want to remove a specific animation. I cannot list them in an extension dialog, so users need a way to know what they have.


I see what you're saying, but I wonder if you've over-complicated the simple use case in order to support a more complex one that may not be necessary.

As it stands, if I want to separately animate several lines I have to manually keep track of the animation name for each one, and make sure I update the dialog if I want to change the settings on any of them. This, in my view, makes it too easy to accidentally overwrite one path's settings with another's, or to lose track of what name you've used for which path. (I recognise that the issue here is with the limited capability of the extensions UI, and the fact that you can't retrieve the existing ID to put into the dialog)

For the multiple path case, there are several possible alternatives, including:

  • Make the animation ID optional. If it's not supplied, create separate animations for each selected path.
  • Don't try to handle multiple paths at all. Just let the user set the same settings on each one. It's a pain to update or edit them all in this case, and adds redundant entries in the CSS, but it's simple and avoids some potential problems with multiple edits.
  • A way to link to an existing path's animation. Perhaps a second extension: select the path with the animation, then select all the others, and choose Animation > Link Path Animations.
  • Require multiple paths to be in a group, and use the group's ID as the basis of a calculated value.
  • Require multiple paths to be turned into a single compound path with Path > Combine, reducing the problem back down to animating a single path.
I suspect that most use-cases can be met with just single path animation and the requirement to combine multiple paths if you want them all to share an animation. Once you go beyond the cases that can be covered by that, you're probably well into the realm of wanting either a proper animation tool, or being prepared to wade directly into the CSS in a text editor.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sat Jun 23, 2018 4:21 am

> Don't try to handle multiple paths at all.

But that's what the whole extension is about! It's for writing text. And text needs to consist of multiple paths, else there's no way to not draw the letters simultaneously (you'd need to connect all paths into one continuous line, so you couldn't write i's or j's). This is to allow to just select a text and let it be written. I'm not going to remove that option, and make users determine how long a path is to know how fast they need to make it run, when they select the next path. This way you can select your hand-written text, and animate it in just one click. That is what I wanted to make!

Will look closer at the rest later :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sat Jun 23, 2018 4:24 am

The group idea sounds like a possible way to do it - but it adds complexity to using it. Not sure if I want to go that way, will think about it.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sat Jun 23, 2018 4:26 am

The compound path thing does not work - try it to see what you get. It's going to animate all subpaths at the same time. Some will finish early, some later.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sat Jun 23, 2018 4:30 am

The grouping could become an issue later, as I've been thinking of allowing to add multiple animations to a single path...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sat Jun 23, 2018 4:37 am

We have 'selection sets'... They /could/ be used for it, and they do give an overview. It's kind of hacky, but would give a UI...

Edit: probably not a good idea, because it may be difficult to keep both CSS styles and selection sets in sync, if the user 'interferes'.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
Xav
Posts: 1117
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Let lines simultaneously been drawn

Postby Xav » Sat Jun 23, 2018 8:49 am

Moini wrote:The compound path thing does not work - try it to see what you get. It's going to animate all subpaths at the same time. Some will finish early, some later.


It seems we've been talking at cross purposes, as I thought that was the effect you were looking for (based on the Inkscape logo in the example you posted earlier).
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sat Jun 23, 2018 10:04 am

Lol, yes, you're right. The logo animation thing (multiple subpaths being drawn 'like a firework') is just a by-product of how SVG dashoffset works when animated. What I want is really to make it look as if an invisible hand is drawing the things one has previously drawn on canvas - in the order one has drawn them. So a user can grab the pencil tool, draw something, select everything, apply the extension, and then watch how 'a ghost' redraws it in the browser.
And when they have drawn one thing (e.g. a word) and then want to add another one, after a pause, or starting just a bit later than the first one, they draw that second thing, and add a second animation with a delay.

If then people want to use it to animate faucets and fountains and fireworks and wait cursors or other things (with multiple 'arms', or with back-and-forth animation) in the same style, they can, of course.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sat Jun 23, 2018 10:26 am

E.g. like this (but with delays, and objects being hidden during delay, still need to implement that):
https://framadrive.org/s/GSG9zFzQztbKJEb
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sat Jun 23, 2018 10:34 am

(May I ask what you kind of animation you built, Xav?)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 9931
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Let lines simultaneously been drawn

Postby brynn » Sat Jun 23, 2018 11:10 am

Congratulations Moini! Well done!

tylerdurden
Posts: 2088
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Let lines simultaneously been drawn

Postby tylerdurden » Sun Jun 24, 2018 7:24 am

This is great!
(Well, not this, but the extension...)
SVG Image

This was made by simply running the extension on all the paths in one go.

This could nip at VideoScribe and others like it. :twisted:

(Refresh the browser, if the animations have finished by the time you scroll down to these.)
Last edited by tylerdurden on Sun Jun 24, 2018 8:01 am, edited 1 time in total.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tylerdurden
Posts: 2088
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Let lines simultaneously been drawn

Postby tylerdurden » Sun Jun 24, 2018 7:41 am

I'm gonna have too much fun with this.

SVG Image
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tylerdurden
Posts: 2088
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Let lines simultaneously been drawn

Postby tylerdurden » Sun Jun 24, 2018 7:55 am

Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tylerdurden
Posts: 2088
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Let lines simultaneously been drawn

Postby tylerdurden » Sun Jun 24, 2018 8:40 am

And another bit o clip-art...

SVG Image

This one was broken apart before running the extension... and a trick added.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

tylerdurden
Posts: 2088
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Let lines simultaneously been drawn

Postby tylerdurden » Sun Jun 24, 2018 9:18 am

I promise I'll stop... sometime.


SVG Image

This is good to know... pattern along path LPE works fine.

In this case, the three paths were named differently, so they would run concurrently, with the same duration.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sun Jun 24, 2018 10:15 am

*grin*

Love to see you having fun, TD :) Looking forward to more creations.
The delay issue will still take a bit, I took a wrong road today, and only noticed that it won't work later - but need to stop for now.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Moini
Posts: 2769
Joined: Mon Oct 05, 2015 10:44 am

Re: Let lines simultaneously been drawn

Postby Moini » Sun Jun 24, 2018 10:16 am

Oh, and if you've got updates for the README (path effects?), let me know on gitlab.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: No registered users and 7 guests