7
$\begingroup$

My goal at the moment is to create a 2D field of a particular object, with each instance rotated a 45° more than the last. An ASCII art illustration of what I want to get, from a top-down view:

| / - \ | / - \ | . . .
/ - \ | / - \ | / . . .
- \ | / - \ | / - . . .
\ | / - \ | / - | . . .
.
.
.

Well, something like that. I'd have to fiddle with the 2D aspect, but it's first dimension I can't seem to get a hold of, just getting what looks like the object spinning as it moves forward. I can't seem to accomplish this in a way that doesn't involve ultimately duplicating each instance by hand.

Here's what I've tried:

I first reach for the array modifier, naturally, but as you can see it doesn't work; the translation of each object is done to the "local axes"(?) of the previous repetition, meaning it'll spin the array in a circle instead of what I want.

Attempt using array modifier

So while searching I learned about dupliframes and tried using that. It takes care of the 45° rotation that stumps the array modifier, but then I'd like to use an array modifier to repeat the group of four I have. That modifier doesn't work:

Attempt using dupliframes and then array modifier

Not too surprising, considering I am animating an array-modified object now, so I guess I'll just "apply" the dupliframes (make them individual objects) and try to link an array modifier between them. But it creates the same issue as above.

At this point I'd have to apply rotations to get it to work, but in doing so I need to un-share the underlying mesh, and then that ends up not being a solution, since it's no better than manual copy-pasting.

Ideally, there'd be a better array modifier that worked on objects rather than meshes, and that would just let me say "Rotate: (0, 0, -45°) Translate: (0, 2, 0), on global axes" for a total of four objects and have it handle the apparently super tricky task I want to accomplish (then further modifiers would be able to simply repeat the group of four, of course).

However, since as far as I know this ideal modifier doesn't exist, what's the closest approximation to it? Or am I stuck needing to manually duplicate everything?

(Honestly, if I could just tell the array modifier to be based on the global/world axes instead of local ones, this would already be solved.)

$\endgroup$

3 Answers 3

10
$\begingroup$

The Sverchok Add-on has convenient nodes for this:

enter image description here

You pick the object you want to duplicate, and you pass it a set of Matrices. These Matrices contain location and rotation data each.

  • The location data comes from the Plane generator (this generates the grid of locations using a subdivided plane with X and Y divisions (W, H).)
  • The rotation data comes from the Vector (0,0,1) node and the integer range node produces a steady stream of 25 or (W*H) sequential integer going from [0 .. 18 .. 36 ... etc]

You might set the step size in the list Range int node to 45 or -45, and adjust the W and H to suit you.

enter image description here

The Plane generator generates coordinates (viewing from topview) from bottom left to top right. If you really want to start top left you would transform the output of Plane with a Rotation node.

enter image description here

I think the benefit of this method is that it's entirely dynamic. You can pick whatever number of rows or columns and the step rotation.

$\endgroup$
2
  • 1
    $\begingroup$ Thanks, this is pretty much what I was looking for! I'm surprised that I haven't heard about this addon before :) . $\endgroup$ Dec 3, 2015 at 3:11
  • $\begingroup$ we're kind of laid back regarding general promotion of the add-on. If someone knows what they're looking for, like 'parametric geometry for blender' they'll surely find it. $\endgroup$
    – zeffii
    Dec 3, 2015 at 10:14
4
$\begingroup$

No addon solution that keeps the objects editable/linked (this is still job for sverchok though):

  1. Add a plane and subdivide 2 times. With the knife tool K cut like this. You can use Ctrl to snap to midpoints:

    enter image description here

  2. Inverse selection with CtrlI, delete edges, and extrude in Z axis up:

    enter image description here

  3. Set a Dupli group with object of your desire parented to this face array, set to face:

    enter image description here

    enter image description here

  4. You can copy this piece with Array modifier how many times you want and you can edit your object's geometry.

$\endgroup$
3
$\begingroup$

The simplest solution without no coding would be to array first cubes, rotate them manually and them array once more.

  1. After makng one cube, adding array to it (you can use Relative Offset for this case), you get simple 4 cubes:

    enter image description here

  2. Apply the Array modifier and rotate cubes in Edit mode. Add 2 empties as follows (it may be eaiser to tweak their position further on):

    enter image description here

  3. Add 2 Array modifiers, set them to Object Offset, select first empty for the first modifier and second - for the second one. Increase Count for both of them.

    enter image description here

$\endgroup$
2
  • $\begingroup$ The rows do not differ, only the columns. Each row should be also rotated from the previous. Your method is thus simply: Rotate by hand. $\endgroup$ Dec 2, 2015 at 13:46
  • 1
    $\begingroup$ @Jerryno your're right. I didn't see that somehow. And even taking into account that rows' difference could be achieved by adding Constant offset, this method doesn't provide any flexibility. I wrote this to get only result desired by OP, no further improvement. $\endgroup$
    – Mr Zak
    Dec 2, 2015 at 15:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .