Jump to content
You must now use your email address to sign in [click for more info] ×

Optimisation of vectors (removing redundant nodes) and exported SVG


Guest

Recommended Posts

I'm finding that when I expand strokes within Affinity Designer I'm often left with dozens of nodes that can often lead to performance issues on mobile devices in complex compositions. In Adobe Illustrator these convert to stroke to path operations are much more efficient and can be further optimised by using the 'simplify' command to further reduce the number of nodes in the resulting shape. Often going from hundreds of points to a few dozens without any significant change in the overall shape.

 

This has a significant impact when using SVGs exported from Affinity Designer in apps/websites as the files themselves tend to be quite bloated and the additional nodes can lead (in excessive cases) to redraw performance issues (aka: 'jank') when scrolling.  For a very simple example the variable width line in the attached file has two nodes as a line, and over 60 nodes as a shape (it's also very jagged with many of the curves being translated to straight lines). The result is the exported SVG files is over 6Kb (for a line) and even when run through SVGOMG https://jakearchibald.github.io/svgomg/it's over 1.5Kb. In Illustrator this shape would likely be in the range of 12 nodes and less than 1Kb when exported and run through SVGOMG.

excessive nodes.afdesign

post-39847-0-90642100-1482341905_thumb.png

Link to comment
Share on other sites

  • 3 years later...
  • 6 months later...
On 12/21/2016 at 7:05 PM, MEB said:

Hi bryanrieger,

Welcome to Affinity Forums :)

We are aware of this. There's plans to improve it in a future version/update.

Thanks for reporting it.

So... How is this coming along? I have a drawing made in AD that combines and subtracts a couple of ellipses and has some outlines. It's been expanded twice. The result is thousands of nodes in the outside outline. Totally un-editable. Manual reduce is inefficient and often inaccurate.

I wonder how hard it is to add a reduce nodes feature. CorelDraw 3, about 25 years ago, did this quite well enough and had a slider to choose the reduction/accuracy ratio. It's been requested 6 years ago. Is it really that hard?

 

I can't fathom how anyone using lines can do without it...

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...
  • Staff

Hi @Alex de Kyburg,
No, the closest thing you have is the Smooth button in the context toolbar for the Node Tool. The first passage/click removes coincident or collinear nodes if there's any, then further clicks will refit the line adding or removing nodes as necessary, so not exactly simplifying (reducing nodes/complexity).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.