1
$\begingroup$

When using the Array modifier, one can repeat an object with a constant offset :

Array modifier tab

However, I would like the objects to be separated by a distance $d(x) = \alpha x + \beta$ where $x$ is the number of counter ($x \leq 4$ in this example) with decaying or increasing distance to each additional count.

How do I do that and is there a method for a general $d(x)$?

$\endgroup$
3
  • 2
    $\begingroup$ I think you’ll have to use Geometry Nodes. The modifier by itself is not powerful enough to do this. $\endgroup$
    – TheLabCat
    Commented Oct 30 at 17:11
  • $\begingroup$ Are you ok using geometry nodes ? It wouldn't be complicated if you have an equation for position. $\endgroup$
    – Lutzi
    Commented Oct 30 at 17:14
  • $\begingroup$ Could you describe how you would do that? An equation to set the same element to global positions? That would be indeed difficult, given that the object is repeated along a curve already. $\endgroup$ Commented Oct 30 at 17:14

1 Answer 1

3
$\begingroup$

First order offset (second order position) with Geometry Nodes

Motivation

We could stay with the current equation for distance and use a Repeat Zone, incrementally increasing the distance for the next point. It works but it's a bit overkill when we could have an equation for position.

From distance to position

So we have the equation for the distance to the next point.

  • Let $n$ be the index of the current object
  • Let $N$ be the total count of objects
  • Let $a$ and $b$ the coefficients (order 1 and order 0)

The distance is given by $d(n) = an + b$. I'm a bit rusty on the math side but let's rework it to express the position :

Maths to get from relative distance to absolute position

We get the following function for the position :

$x(n) = \frac{n(n+1)}{2} \cdot a + n \cdot b$

Geometry Nodes

Let's spawn $N$ points. Each point has an index, which will be in our case the $n$ variable in our equations.

We can move all points according to the equation for position. Then it's just a matter of spawning the original object on each of these points. Finally, we Realize Instances otherwise the objects would still be in their instance state.

enter image description here

Note that all 3 inputs ($a$, $b$ and $n$) can be changed from the modifier tab on the right.

Result and blend file

enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ Neat answer. We need more of these $\endgroup$ Commented Oct 30 at 22:55

You must log in to answer this question.

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