1
$\begingroup$

I have a pie-shaped mesh, and I’ve set its origin to the tip. My goal is to animate this pie object along a custom green axis:

pie mesh

I also want to use an Array Modifier to duplicate the object radially — placing six copies evenly around a central Empty (a sphere). However, when I try this, the arrayed instances don’t align or rotate correctly around the Empty:

unexpected result

What I’m trying to achieve (expected result). I'm trying to animate each of the pie objects outward radially but I want to not duplicate the animation so I thought I could centralize the animation within one pie mesh and then just use Array Modifier

expected result

Is it possible to achieve this setup using the Array Modifier alone, or is it limited in this case? Without using Shape Keys please.

Would Geometry Nodes be a better solution? If so, how can I set it up?

As a workaround I just make linked duplicates of them and then tried to use Affect Only Location but that will not work because origins are exactly at 0,0,0 so it cannot scale a 0 value only if it is non-zero

enter image description here

$\endgroup$
10
  • $\begingroup$ hello could you please show a storyboard of position A and B of your objects? $\endgroup$ Commented Jun 26 at 14:19
  • $\begingroup$ It looks like your object's origin is offset from the empty's origin. If you want to affect only the rotation and not the position, both objects need to have their origins in the exact same location. But obviously the empty is at (0, 0, 0) and the arrayed object is not. The Array modifier takes every difference between object and empty into account, translation, rotation and scale. $\endgroup$ Commented Jun 26 at 14:22
  • $\begingroup$ @moonboots What do you mean? It's simple. Just all objects aligned in the center like a pizza pie that was sliced. Then I want to animte them outward like in the "expected" screenshot but the Array modifier misaligns them. I was hoping there was something like in the Mirror modifier where you can specify a Mirror empty. $\endgroup$ Commented Jun 26 at 14:46
  • $\begingroup$ @GordonBrinkmann is it maybe possible with Geometry Nodes? $\endgroup$ Commented Jun 26 at 14:56
  • 1
    $\begingroup$ Oh ok i understand what you meant $\endgroup$ Commented Jun 26 at 15:23

3 Answers 3

2
$\begingroup$

You asked me in the comments if there is a Geometry Nodes solution. Sure there is one if not more. Here I will first show you quite a simple one which has a flaw that I will erase with a slightly more complex one later.

I start with a 60° pie, the origin is at its bottom vertex.

base pie

I add a Geometry Nodes modifier to it where I use a Mesh Circle node with 6 vertices and place the pie on the vertices with an Instance on Points node which I align to the Normal with an Align Rotation to Vector node. For this it is important that the Mesh Circle needs to have the Fill Type set to None (which is the default anyway), not N-Gon or Triangles. As axis which should be aligned I select Y, since the base pie object is oriented in +Y direction. After instancing I use a Rotate Instances node with Local Space disabled to rotate the result 30° so that you have one piece at the top like you show in your reference.

simple solution

Now this is all not too complicated and you could use the Radius of the Mesh Circle to move the pie pieces closer together or further apart. However, if you wanted to move them together to close without a gap, you would have to set the Radius to 0. But the problem with that is, you lose the Normal information which is needed for the rotation and all six pieces would simply lie on top of each other.

To avoid that, you can only make sure to use a small but never equal to 0 Radius (which would leave a gap, maybe imperceptible though) or you need to have the pie's origin not a the bottom vertex but maybe at for example Y = 0.1, in this case you have closed the gap already at a Radius of 0.1, which is not the worst solution.

But if you do not want to care about staying above a certain radius or placing the origin at a determined location offset the bottom, you can do a workaround in Geometry Nodes.

First of all, I set the Radius of the Mesh Circle to 1 m, which is not explicitly necessary but comes in handy if you want to move the pieces outwards to a specific distance. Then I take a Capture Attribute node to read the Normal of the circle's vertices. This captured attribute goes into the Vector input of the Align Rotation to Vector node.

Now I can use either a Transform Geometry node to scale the circle or in my case I use a Scale Elements node. For the latter the type is set to Edge, not Face, since the Mesh Circle has no faces.

The good thing with this method is you can keep the origin at the bottom vertex, scale all the way down to 0 and do not lose the normal orientation for the pieces. Also with a Radius set to 1 m, a scaling factor of 0.1 means the distance to the center will be 0.1 m for convenience.

improved solution

$\endgroup$
1
$\begingroup$

"Better" solution that might be not better, but works

General logic
enter image description here

Copy Transform
enter image description here

Array
enter image description here

Animation
enter image description here

$\endgroup$
7
  • $\begingroup$ Hmmm.. can you share the blend file? because your explanation is not understandable. Even google search engine wouldn't understand your post. $\endgroup$ Commented Jun 27 at 0:54
  • $\begingroup$ It seems this solution could work if only the pizza wasn't offset weirdly. It's not perfectly radiating from the center. There's like some offset a few mm. When the top pizza pie for example moves upward it is shifting to the right instead of staying at X=0. Same thing for the bottom pizza it moves toward the negative X axis instead of staying at X=0 $\endgroup$ Commented Jun 27 at 0:57
  • 1
    $\begingroup$ @MeganLove The top pie moves to the right because its origin moves to the right relative to the empty in the center. That's because he is controlling the pie with the cube, which is moving not only outwards on Y but also to the right (and so to the left on the opposite side). This would not happen if the cube moved straight along the Y axis. This might seem confusing because it's doing more than you asked for and I find the sketch a bit complicated, too. $\endgroup$ Commented Jun 27 at 10:50
  • 1
    $\begingroup$ @MeganLove if you need to center whole 'pizza' move Circle object i.sstatic.net/65ilChtB.png Empty copy controlled by constrains to repeat animation $\endgroup$ Commented Jul 2 at 15:16
  • 1
    $\begingroup$ @MikhailAbushinov aah ok thank you I already gave you +1 btw :) $\endgroup$ Commented Jul 2 at 16:02
0
$\begingroup$

I ended up using moonboots’ workaround, but it only works if the origin isn’t at the center. So I had to move the origin to a different spot within the pie mesh, just somewhere arbitrary that suited the effect. After that, I enabled Affect Only Location and was able to scale it properly. Then, following Gordon’s suggestion, I keyframed all the objects at once using the K key and choosing Location.

final result

$\endgroup$
3
  • 1
    $\begingroup$ Why do you have to manually keyframe each pie? Select all, hit K and choose Location to set a keyframe to the location for all of them at once. Then enable auto-keying, scale them by only affecting locations like you do, and then you automatically have keyframes for all objects in the new position. $\endgroup$ Commented Jun 26 at 16:44
  • $\begingroup$ @GordonBrinkmann oooh so that's what the K feature is. Thank you so much for this info! That's pretty handy! $\endgroup$ Commented Jun 27 at 0:10
  • $\begingroup$ @GordonBrinkmann can you help me understand the post of blender.stackexchange.com/a/336692/184387 $\endgroup$ Commented Jun 27 at 1:09

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.