Method simple to Draw Complex

Post questions on how to use or achieve an effect in Inkscape.
santamaria
Posts: 4
Joined: Mon Sep 28, 2015 8:24 pm
Location: tech
Contact:

Method simple to Draw Complex

Postby santamaria » Mon Oct 05, 2015 6:59 pm

Hello everyone!

I often end updrawing my own patterns that contain complex grouped objects in some form of repeated tiling.
This quickly leads to enormous files, and frequently Inkscape crashing.

My solution is generally to create the pattern in it's own file (away from anything else at all that would consume memory) and gently nurse it into exeistance - export to PNG - import into gimp and manually resize/fit to whatever I'm wanting to pattern - scale it down - export to re-import into Inkscape for use.

I'm sure there's a better way than the above though! - ?

I've seen comments that saving as non-insckape svg flattens images but I haven't seen any change in behaviour/file size doing so.
Last edited by santamaria on Thu Nov 05, 2015 6:47 pm, edited 2 times in total.
G9!

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

Re: Method simple to Draw Complex

Postby brynn » Mon Oct 05, 2015 8:38 pm

There an almost identical topic in this forum somewhere.....

I don't understand why you're bringing it into GIMP, only to scale it. Are you scaling it twice, or you just said it twice?

Exporting to PNG will certainly make it smaller(in file size, not dimension), if it's made of complex tiles. Is that the reason you export to PNG? You could scale it in Inkscape more easily than using GIMP, only because you eliminate using GIMP altogether. Just import back into a new Inkscape doc.

I think the term "flatten" is a raster terminology. I'm actually not sure what it means. But if you had several layers in the SVG file, when you export to PNG, then everything of course, is all in one layer (because it's all one image as PNG).

If you're exporting to PNG, to make the file size smaller, that's about the only way I know. You could use Edit menu > Make a Bitmap Copy, which puts....I guess it's a PNG, in the same file with the vector tiles. You'd have to copy that into another SVG file. So that's about the same difference as exporting the PNG, and importing it back.

The only other way to possibly make a smaller file size, with the complex tiling, would be to have us look at the object you're planning to tile. There may be issues with the way you constructed it, that could make it smaller.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Method simple to Draw Complex

Postby Lazur » Wed Oct 07, 2015 3:22 am

Hi.

Just guessing what you describe -by tile pattern, you mean duplicants of the same (probably clipped) group of object, or even worse, the tile object copy/pasted next to eachother?

The problem is crashing. But, it's not always the file size that triggering it.


There are two parts of the svg file, one where the definitions are stored, and one where objects are described which show up on canvas. Clipping paths are stored in the defs, and, by copy/pasting you double their definitions, as well as gradient definitions if they were used.
By duplicating, the defs won't add up. My experience for crashing is mostly by unused definitions. Check for the clean up document/vacuum defs in file menu.

There is also cloning, where one parent object is like stored in the defs and clones only link to it, reducing file size. But in practice that alone doesn't speed up rendering, nor make your file free from crashing.


What you would need instead of these, is converting a base tile to a pattern fill -which will result it stored in the defs, so that you can add that fill to any selected object. Rendering might not be fluent, based on what you open the file after, gaps in betwen tiles may appear due to anti-aliasing.

You can also make the following trick: group the tile object(s) and clip them -if needed-, then clone the group,
and convert the clone to a pattern. This way you can edit the pattern fill's base tile after, and even add new objects to the parent group. Similarily to this.

I suggest reading the manual, those are described better there.



Related topic on crashing due to running out over your computer's limit (which causes your crashes) can be found here.


Return to “Help with using Inkscape”