Javis.jl icon indicating copy to clipboard operation
Javis.jl copied to clipboard

Save as SVG

Open TheCedarPrince opened this issue 5 years ago • 4 comments

Is your feature request related to a problem? Please explain. This issue was somewhat described in #106 . It would be good to continue improving quality of animations being made by supporting SVG creation.

Describe the solution you'd like Implement svg creation similar to #101

TheCedarPrince avatar Aug 31 '20 03:08 TheCedarPrince

Is there an implementation of saving an animation as SVG that could serve as a model for how this would work? After a cursory half hour or so of looking at how to do this, I've found that there seem to be several ways to "save an animation as SVG", including:

  • Using one of the interfaces described in the SVG standard to create an SVG which has animated elements. This does not seem to be a particularly popular format for animations, as it's not supported by any Adobe products or Inkscape. The only context I've seen it discussed at length for practical use is web design, and many of those applications seem to be in the context of CSS tutorials. It would be feasible to implement, but significantly more involved than the mp4 implementation. Instead of using an existing backend to render frames individually and assemble them into a video, you would have to add every element used to an SVG, and specify all the transformations/changes in attributes as animations happening at specific times. I can't find any Julia libraries that already have this functionality, but it's definitely possible I just didn't look hard enough.

  • Generating frames as SVGs, saving them together in a folder, generating a txt file with all the filenames in order, and optionally also having a native interface where the slideshow can be played quickly. I saw a couple mentions of this, and I think I've encountered it working with matplotlib animations in Python. The idea behind this is seems to be that it's ideal for taking the frames to other software to assemble like a time lapse into a video or for use in some CSS based method for displaying animations, which is probably an output format worth supporting, although not really high priority. This would be the implementation most similar to #101 code-wise, although with significantly different output.

landrumb avatar Oct 04 '20 20:10 landrumb

Thanks for the detailed comment. It's possible to output svg from Luxor. We have this planned for quite soon but are both on vacation the following week. Saving svgs instead of png shouldn't be any problem. Not sure about generating an animation out of it or should this be handled by another software?

Wikunia avatar Oct 04 '20 20:10 Wikunia

Luxor has svg output, but only for still images. Is this issue as simple as using svg in place of png for generating animations which would be saved as gif or mp4? If so, I agree that shouldn't be too hard, but what advantage does that ultimately provide if it's rasterized anyways when converted to gif or mp4?

landrumb avatar Oct 04 '20 21:10 landrumb

Sorry for the confusion. Maybe I didn't fully understand your second point in your first comment. Which file format would be produce in the end? My idea was to output svgs in a directory and maybe a different software can handle creating an animation out of it.

Wikunia avatar Oct 05 '20 06:10 Wikunia