I'm working on a file using different colored rectangles, stacked brick-like, that form a map (specifically I'm trying to duplicate the map of China from the video game Romance of the Three Kingdoms XI). So far the file contains a bit over 22000 rectangles in 24 layers (one layer per terrain type). Every once in a while I export to .png to keep a record of my progress and make update posts on the forum I'll eventually post the finished picture on. Here's my last successful export ...
Anyway, I've run into a problem where Inkscape no longer wants to export the file to .png. It starts the export, but before it finishes I keep getting a message that says "Microsoft VIsual C++ Runtime Library - This application has requested the Runtime to terminate it in an unusual way. Please contact the application support team for more information." Is there a limit to the number of objects one can have in a file or something that could be causing this? The file is expected to have nearly 40000 rectangles in order to finish the project.
I've run into a little problem.
Re: I've run into a little problem.
as a temporary workaround..have you tried imagemagick to convert svg to png?
Re: I've run into a little problem.
Out of curiosity, why are you using vectors for this project? Does each rectangle have a stroke? If not,I think I would use a raster program with bicubic interpolation turned off in the preferences. It would be just as scalable, I think, and vastly simpler to manipulate...
Of course I don't know all the uses you plan to put it to...
Of course I don't know all the uses you plan to put it to...
Your mind is what you think it is.
Re: I've run into a little problem.
I can't answer whether there's a limit to number of objects for export. But you could test that theory by converting like rectangles to paths, and then combine the paths. I'm not positive, but I think that would make each block of like-colored rectangles, one object. It would greatly reduce the number of objects. At least you could do this for the solid colored rectangles.
Looks like a fun project! I enjoy doing tedious kind of geometric images like this. Hhmmm.....you may have inspired me to do something like this.... I've had in mind to do something like 1px by 1px squares, and simulate raster graphics with Inkscape. Sort of like....oh gee, what's that called, pointilism? Or something like that, when the artist paints tiny dots? Oh yes, here: http://en.wikipedia.org/wiki/Pointillism
Looks like a fun project! I enjoy doing tedious kind of geometric images like this. Hhmmm.....you may have inspired me to do something like this.... I've had in mind to do something like 1px by 1px squares, and simulate raster graphics with Inkscape. Sort of like....oh gee, what's that called, pointilism? Or something like that, when the artist paints tiny dots? Oh yes, here: http://en.wikipedia.org/wiki/Pointillism
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: I've run into a little problem.
also, if you intend to stick with svg, the complexity might mandate/imply command line or programmatic handling of svg creation and manipulation. in other words, it might be generally getting beyond typical GUI program capability...which happens in all sorts of things, and not just inkscape. it might be even easier (in theory) to create the layout in some simple datastructure file, and use a script to generate the svg etc. Then you could use a svg viewer to check results, without resorting to inkscape with much bigger/complex footprint.
Re: I've run into a little problem.
I'm using Inkscape because I find the objects easy to manipulate, especially with the crtl-shift-a alignment functions. I've used Inkscape to make boards and pieces for shogi variants like this one ...druban wrote:Out of curiosity, why are you using vectors for this project? Does each rectangle have a stroke?
[ Direct Link ]
and then used Inkscape to move the pieces and keep track of board positions for email games. I plan on making the map available on some Three Kingdoms forums for keeping track of games (besides the terrain squares there'll also be objects for armies, city developments, etc.)
At the moment each rectangle is just a simple rectangle created with the tool, with rounded corners.
I hadn't, but I have now. Unfortunately the program stops working when I try to load the svg file.chriswww wrote:as a temporary workaround..have you tried imagemagick to convert svg to png?
Good idea. I have tried that now. THAT does work, BUT if I do that in the file I'm working on to make the map then I can't select an individual rect to align use the align tool with What I'll have to do is just stop making .png exports until I get the whole thing done, then do the convert and unify process and export the final png.brynn wrote:But you could test that theory by converting like rectangles to paths, and then combine the paths. I'm not positive, but I think that would make each block of like-colored rectangles, one object. It would greatly reduce the number of objects. At least you could do this for the solid colored rectangles.
Yeah, I often reflect on how there's things I love to do that other people probably look at and wonder "how the heck could anyone ever actually enjoy anything to tedious?" Glad to see there's at least one other person out there that enjoys things like that.brynn wrote:Looks like a fun project! I enjoy doing tedious kind of geometric images like this.
Cool Make sure to send me a pm when you post something about it so that I don't miss the thread. I want to check it out.brynn wrote:Hhmmm.....you may have inspired me to do something like this.... I've had in mind to do something like 1px by 1px squares, and simulate raster graphics with Inkscape. Sort of like....oh gee, what's that called, pointilism?
Re: I've run into a little problem.
You might also want to try exporting a custom area in order to split the image into several smaller images for export, then stitching them back together using a raster graphics program.
Re: I've run into a little problem.
At the moment each rectangle is just a simple rectangle created with the tool, with rounded corners
besides the terrain squares there'll also be objects for armies, city developments, etc.
OK, the rounded corners and the other objects takes the raster option off the table.
I am guessing that the rounded corners are also what is adding a significant burden to your rendering process. Roughly speaking, 22000 rounded rectangles might be about the same load as about 100,000 unrounded rectangles. You can try (in a test copy of your svg) selecting all your rectangles and in the control bar of the rectangle tool click on the remove rounding button. Save it under a test name. Then see how an export goes.
Also try removing definitions just to see if that reduces your filesize although export should not really be affected by this....
Off topic:
That is an impressive number of pieces in the shogi game. Is this variant shogi played on a go board?Re: I've run into a little problem.
THAT does work, BUT if I do that in the file I'm working on to make the map then I can't select an individual rect to align use the align tool with
I'm not sure I clearly understand what you're doing, with the game and all. But for making the map, can't you align the individual rectangles while they are rectangles or 4-node paths -- then once you finish a block of a color, then combine paths?
If you're saying that you move them around later, then yeah, combining will make alignment more difficult. But what about using Break Apart, to return them to individual 4-node paths? Then align, then recombine. And for another idea, what about, instead of using Align and Distribute dialog, you use snapping to do the aligning? There are at least a couple of ways I can think to do that, depending on your personal preference and workflow. But you could snap cusp (corner) nodes, or bounding boxes, you could use guides too....there are several possibilities. Or I think you might even be able to use a grid, and snap to grid -- although I do understand that your pattern is like bricks, rather than like a checkerboard. I'd have to do some experimenting with your file, but it looks just by "eyeballing" that every 2 lines would snap to a grid.
Does this help?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: I've run into a little problem.
Well, it rendered more of the image when taking off the corners, but Inkscape still stops working and crashes. I'm hoping to keep the rounded corners anyway as that's how they are in the game ...druban wrote:You can try (in a test copy of your svg) selecting all your rectangles and in the control bar of the rectangle tool click on the remove rounding button. Save it under a test name. Then see how an export goes.
"removing definitions" What do you mean by that?druban wrote:Also try removing definitions just to see if that reduces your filesize although export should not really be affected by this....
That variant, Ko Shogi, is played on a Go board. It's kind of a combination of Go (size of the board), Xiang Qi (pieces placed on the points rather than in the squares), and Shogi. You think that one has a lot of pieces, take a look at this ...druban wrote:Off topic:That is an impressive number of pieces in the shogi game. Is this variant shogi played on a go board?
[ Direct Link ]
Well, see the problem is that I'm not doing all of one block of color, and then moving on to the next. I'm following the landmass in the game doing line by line (but not all the way cross the full map each line, just across the current piece of land between "unselectable spots" which don't show their outline rect in the game, like the mountains and hills in the picture above). So I'm doing multiple terrain types at a time. A the current stage of the map I'm pretty much past that and going back to fill in the "unselectable spots", but using the rects I've put down previously to align with.brynn wrote:But for making the map, can't you align the individual rectangles while they are rectangles or 4-node paths -- then once you finish a block of a color, then combine paths?
Later on the rectangles won't get moved around any more, but counters representing armies, city developments, etc will get moved/placed and I thought it'd be handy to keep using the align function for that too.brynn wrote:If you're saying that you move them around later, then yeah, combining will make alignment more difficult.
I haven't messed around much with the snapping, but I'll give that a try.brynn wrote:And for another idea, what about, instead of using Align and Distribute dialog, you use snapping to do the aligning? Does this help?