"Circular array" button. Basic function that blender lacks.
Hi,
I have a goal of creating a clock-like object and decided to use "array" modifier to create hour sections. The problem is that the tutorial ( youtube.com/watch ) advices to place an empty axis object in the centre first and then use it as an offset object in array modifier. Right after doing that my hour sections got stretched. The problem can be solved with applying axis' location which sets its origin point in world centre and, therefore, rotating this axis does not lead to a desired look of a circle. In a screenshot you can see axis' location pre-applied state. Section's copies just stretch to infinity. Important to mentions that section's scale and other properties are applied.
Maybe there is a workaround that will work properly but shouldn't the process of creation such a simple and primitive thing as circular array be much easier than it is now?
5 Comments
Well, it's not really a workaround, but you can do it like this: add an array modifier to your object + an empty, as you did. Then, in the modifier, select "Object offset" to pick the empty, and disable all the other offset methods, unless you really need one. To create a circular array, right click on the array count, "copy as new driver" then paste the driver on the Z rotation of the empty, since it's the one that will create the circular effect. In the driver panel/editor, select 'scripted expression' instead of "average value", "count" will be written by default, just change it to "(pi 2)/count)". The "pi 2" is the one responsible for the circular effect, if it's just "pi" without multiplying it by 2, it will make half a circle. Finally, to control how big the circle is, you can use a dislplace modifier without any texture, set direction to X or Y or Z it depends (you can use the transform node from geometry nodes instead of displacement, it does the same thing) and then use the strength value.
I said it's not really a workaround because it's more or less similar to what other softs do, with the same concept & math. Except they do it in one or two clicks, like Hard Ops.
One other method (quicker, but requires 2.93) is to use the circle primitive node to instance the object in the geometry nodes. One advantage is that it creates separate objects if you convert the instances into real geo.
But I agree there should be an option for that, and it has already been asked a couple of times.
* @ElioH * Oh and parent the empty to the arrayed object, this way you can move and rotate and scale however you want.
* @ElioH * Huge thank you man! Wish I could be as smart as you to figure this out. The only problem is that after this expression all sections move as separate objects in unison. What if I would like to animate them later to all of the appear from the one set at 12 o'clock and make their way through the circle?
Also, when I did your expression in driver editor it said ERROR: Invalid python expression but it worked regardless. Is it normal?
Anyway thank you for your reply, it's been hugely helpful
* @astrum.central * I'm not sure I get what you need to do, but I think you could just animate the empty rotation, without having any driver on it. If you still want to have that driver, just add a custom property to the empty, name it whatever you want, set the limits you need, and right click on the property's number, "copy data path", then in the Z rotation driver of the empty, add a new variable, select the empty and paste the copied data path in the field below. Finally, the same way the above property is name "count", set a name for the new one (or use the default name, doesn't matter much), and add "+var", or whatever the name of the property you set is, after the existing expression (so it will be something like "pi*2/count+var" for example. It basicly offset the rotation. You could use - instead of +, works the same but inverted, of course.
You could create that new custom property on the object instead of the empty, just so you have all the control on the object only, and then maybe hide the empty.
For the error message, I guess it's a bug, as I don't have it, or maybe I explained something wrong, but I doubt because it seems to be working anyway.
I think it would be good for you to dive a little bit into the drivers stuff, it's more than usefull, and so you can understand all the stuff I explained. It's what I did by taking a look at how Hard Ops circular array operator works.
you must have to use GN to make easy circular array like this : 2.bp.blogspot.com/-VtTsdxnvHU4/YFI-aFAtbII/AAAAAAAAZjQ/yYLWprdHOfgD2U7JK-KrXu96_npEu-rjACK4BGAYYCw/s1600/GN+simple+circular+array.PNG