How to create cloned/tiled cubes?

Post questions on how to use or achieve an effect in Inkscape.
etrader
Posts: 25
Joined: Thu Mar 14, 2013 11:45 pm

How to create cloned/tiled cubes?

Postby etrader » Mon Sep 25, 2017 4:57 am

I use tiled clones to repeat a rectangular to form a larger rectangular. But how can I do this with 3D cubes to form something like
cube.jpg
cube.jpg (19.36 KiB) Viewed 1134 times


Note that the large cube should be made of individual cubes rather than pattern the surfaces of the large cubes, as I need to move/remove the small cubes.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: How to create cloned/tiled cubes?

Postby Moini » Mon Sep 25, 2017 5:36 am

To me, it looks like 5 rows of cubes in 5 columns, where each row and column is shifted by 50% of a cube.
You could tile those 25, and delete excess cubes afterwards (didn't test, just what I think this looks like)
Or you just use a grid to snap them to, might be faster.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How to create cloned/tiled cubes?

Postby theozh » Mon Sep 25, 2017 5:28 pm

I just would stack the single cubes as it is in real life, although you're drawing (or cloning) 8 cubes which you don't see.
If you start from one single cube you need to know the (relative) positions of the edge points (as indicated by the intersections of the guides) in order to set the proper shift in the Tiled Clones Dialog (only in % of the original object).
For example:
1. clone a row of 3
2. Group this row and clone it to make a base of 3x3
3. Group this base and make clones to stack the final 3x3x3 cube
Keep in mind that working with clones might slow down your computer enormously (I still don't know why). This might work for 3x3x3 or 4x4x4 cubes, but with higher numbers you probably will not get happy with tiled clones.
Using duplicates (or individual (not tiled) clones) and aligning them to a grid as @Moini said, might be faster.

Cube.png
Cube.png (69.17 KiB) Viewed 1089 times
Win7/64, Inkscape 0.92.2

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

Re: How to create cloned/tiled cubes?

Postby brynn » Tue Sep 26, 2017 1:36 pm

This is one of those projects where I can use snapping and create a whole page-sized array of cubes (giant cube of cubes), much, much faster than figuring out how to configure the Tiled Clones dialog.

Actually, I would used Tile Clones dialog to quickly create however many clones I need. Then manually snap them into position.

Of course, you don't need to actually create the 3 faces which are behind, as long as the cubes will not be partially transparent.

theozh, is that a filter I see on your cubes? That could explain the performance issue. I've just quickly created 500 clones (using tiled clones dialog) with no issues.

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

Re: How to create cloned/tiled cubes?

Postby brynn » Tue Sep 26, 2017 2:11 pm

If you didn't need to have fill colors or shading/highlighting objects, blur, etc -- if you just needed the line drawing, you could assemble it with the least load by Y shaped paths for the center vertical column, and then sort of sideways Vs for the 2 faces. That ought to cut the file size in half....no, more than half....by 3/4, right? (See the blue paths in the attachment)

I made this whole thing in 15 minutes, although I used parallelograms rather than the Ys and Vs. All clones, duplicated the whole thing 5 times with still no performance issue. Although I got a display issue if the giant cubes were overlapping.
Attachments
c.png
c.png (49.71 KiB) Viewed 1028 times

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: How to create cloned/tiled cubes?

Postby theozh » Tue Sep 26, 2017 3:45 pm

brynn wrote:theozh, is that a filter I see on your cubes? That could explain the performance issue. I've just quickly created 500 clones (using tiled clones dialog) with no issues.

Well, I used "Trace bitmap" from the original bitmap image in order to get a single cube and got a group of objects with altogether around 1000 nodes. This apparently explains the poor performance. So, in case of using tiled clones make sure your object is reduced to the minimum amount of nodes possible.
Win7/64, Inkscape 0.92.2


Return to “Help with using Inkscape”