# Non-proportional scaling in Geometry Nodes

I asked a question last week, and the answer way very useful, but I don't find a way to use this solution to scale more than 2 objects. So, is there a way to do it ?

The question:

I want to scale 2 objects, keeping their dimensions constant but not proportional.

This is just an example:

I want to scale 2 edges, one is 1m and the other is 0.9m.

If I scale them by 2, the result should be: 2m and 1.9m.
If I scale by 3, the result should be: 3m and 2.9m.
Or if I scale by 4, the result should be: 4m and 3.9m.

...and so on.

What would the formula be?

• Which edges? Which objects? ...can you describe this (with pictures) a little more precisely? Commented Apr 2, 2022 at 10:08
• Ok, I did, but this is just an exemple of the situation when I encounter this problem. I know I could enter the dimensions to resolve the problem, but I want to know if there is a formula to do it when scaling.
– User
Commented Apr 2, 2022 at 12:32

If I understand correctly, you have:

$$a = 1$$

$$b = 0,9$$

And according to your data, $$b$$ is always smaller than $$a$$ by a certain value.

If $$x$$ is your multiplier, then it should look like this:

The length of the longer line: $$a * x$$

The length of the shorter line: $$a * x - (a - b)$$

Here is the whole thing translated 1:1 into Geometry Nodes:

• Thank you! I realy like that solution!
– User
Commented Apr 2, 2022 at 13:42
• How could it be used with 3d objects ? For exemple, scaling a cube on the x axis only?
– User
Commented Apr 2, 2022 at 14:47
• With this example you can actually scale as many objects as you want. You would only have to adjust the nodes accordingly. But I honestly don't know what you are trying to achieve. What should be the final result? With GNs, there are usually many ways to reach the goal, and it is difficult to reach a generally valid answer to all use cases for trivial questions. Commented Apr 2, 2022 at 14:54
• Well, I work on a project to make fast modular buildings, so it's better if it's not organic. So I try to find a way to have precise control on the scaling of different objects. If I can find a way to do as I said, scaling 2 cubes like that on a single or two axis, it will have many applications afterward.
– User
Commented Apr 2, 2022 at 15:31

Assuming:

• $$a = short\ piece$$
• $$b = difference\ between\ them$$
• $$a + b = long\ piece$$

If we were to multiply (scale) the long piece by the number $$m$$, we would get $$m\times(a+b) = ma + mb$$.

For the short piece we want all of that, except we want one less "difference", i.e. $$ma + (m-1)*b$$.

Your question, in short, becomes: What can I multiply $$a$$ with so I can get $$ma + (m-1)b$$? The answer is: $$multiplier + \frac{(multiplier-1)*b}{a}$$

In Geometry Nodes, it would look like this:

• Thank you, it's very useful! Now, how could it be used with 3d objects ? For exemple, scaling a cube on the x axis only?
– User
Commented Apr 2, 2022 at 14:47
• That's actually exactly what I'm doing in the screenshot. Do you see the "Combine XYZ" nodes? I'm only using the X channel so only that part is affected. The only difference is that you would make the Y and Z channels "1" instead of "0" so they don't change. I was using lines in this example so it wasn't important here. Commented Apr 2, 2022 at 14:49
• I tried this solution with 2 cubes, with the intent of scaling them only on the x axis, but the 'long piece' one is scaling on the other axis as well
– User
Commented Apr 2, 2022 at 15:25
• Did you use a Combine XYZ for it as well? I don't have it in my screenshot, but you should. Commented Apr 2, 2022 at 15:29
• Ah ! I got it! Many thanks ! you rocks!
– User
Commented Apr 2, 2022 at 15:44