0

I have a vector graphics that's quite strange: when I open the file in Illustrator, every single element (line, surface) is enclosed in a frame. Also, there is a part that is not visible but it's still there. The problem is that the file is huge, and I was wondering if there is a way to reduce its size, for example, but just keeping only the visible parts. But selecting only the visible parts is a journey in itself, so any advice is greatly appreciated. This is a screenshot of the file: enter image description here

  • It is not strange, it is typical. This is how the 3D graphics accelerator works. it slaps triangles on top of eachother. For transparency reasons you often need to depth sort the triangles so you in fact have something you can just dump in a vector file. Not optimal but works. Also some primitives consist of a square of color / bitmap and then a clipping mask, very common. Also this is the way illustrator handles some primitives it can not internally use. – joojaa Jun 13 '17 at 13:20
  • On a copy of the file... Select all -- Click the Merge button on the Pathfinder Panel. What's that do? – Scott Jun 13 '17 at 15:15
2

You only have one problem although you described two. Your first observation, "every single element is enclosed in a frame" is not a concern for file size. If what you are calling a "frame" is really a "mask", then these masks are also vector and hardly contribute to the file size.

There is hope to reduce file size in your second problem, "there is a part that is not visible but it's still there." This sounds like your file contains many, many masks. There are two ways you can delete unwanted masks and their elements. Or do a combination of these two:

  1. Use the Layers Palette and start opening layers embedded inside layers. After digging deep in the layers, you will find each Mask is a parent layer. Delete these unwanted layers (Masks) by selecting the Trash Can icon at the bottom of the palette.
  2. My favorite trick when deleting unwanted Masked Items is to use the Direct Select Tool (A) - also called the Open Arrow Tool. *You have to use the Direct Select Tool, not just the Select Tool. If you can see all the unwanted masks in Outline Mode, then (with the Open Arrow Tool selected) click and drag a large area to grab any part of the unwanted masked lines. Now that you have some of the unwanted lines selected, you can hit the delete key.

A bonus trick if using solution 2, after selecting part of the unwanted lines with the Open Arrow Tool, do these steps in order 1) Copy, 2) Paste, 3)Undo, and 4)Delete. Pretty cool, eh? The Undo step will go back to select your partial selection AS WELL AS select all the lines that are associated with that mask. This removes many unnecessary clicking and dragging.

  • I'm lost in solution 2. If I use the Direct Select Tool and I select anything, I'm still selecting masks. For some reason, regardless of the type of object, all masks have the same size. – aaragon Jun 13 '17 at 13:08
  • Solution 2 refers to "parts that are not visible" and I was assuming they are not on top of (or behind) the visible parts that you wish to keep. If there are a lot of masks and elements that are "around" the desired object, then this is a way to trim the fat (sort of speak). – jhurley Jun 13 '17 at 13:44
  • 1
    @jhurley because Preview killed the vector data and reduced things to embedded raster data. Not good. Preview is really a horrible application to ever save anything with, especially vector graphics. Use it to "preview" a file, but never "save" with it. – Scott Jun 13 '17 at 15:14
2

Depending on how this file was generated and how it was saved, there is a possibility that those 'frames' that you are seeing are actually lots of little embedded image files. One for each triangle. While they look like polygons with a grey fill, they may in fact be polygons with a flat, grey image pasted inside (or masked by) them. This would potentially explain the large file size.

There are a couple of ways to find (if they are there) and get rid of these embedded images:

  • Open up the links palette. If my theory is right then you will have a long list of embedded image files in there. You can then select them all in the links palette and use the 'go to link' button at the bottom to select them and then delete them
  • Use the Direct Selection (white arrow) tool to select the shape only. Click on any one of the lines making up the polygons, then go to Select > Same > Fill and stroke. Next, go to Select > Inverse and hit delete. Everything that is not a line should get killed.

In either case you will then have to replace the colour of the polygons with actual fill colours if you want to restore the appearance, but your new file will be considerably smaller.

  • The links palette is empty. I started deleting frame by frame starting from the top, and indeed it seems that one of the frames contained, for example, an raster image of the right side of the cube. Any other ideas on how I can improve this? – aaragon Jun 13 '17 at 13:35
  • Actually, something very strange happened now. I opened the file with Preview (Mac) and save it as a different file. The file reduced size from 2.8Mb to 958Kb. Then I opened in Illustrator and the links palette is now full! – aaragon Jun 13 '17 at 13:41
  • That file sounds like it's a bit of a mess! The second of my two methods above should still work for you (I think!). It will get rid of anything that's not an outline, regardless of what those other objects may be. – Westside Jun 13 '17 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.