Create volume cube around object with equal padding from bounding box center?

I want to create a volume cube around an object with equal padding from the center of the bounding box of the object. Ideally, this would be a single value input (ie. “padding amount”).

The issue(s) I’m having are:

  1. Adjustments to the min/max values of the volume cube appear (to me) to be done from the origin of the object and not the center of the bounding box.
  2. I can tweak min/max values to get the padding I want, but it is cumbersome and not intuitive because it involves 2 values and (:arrow_up:see 1 above​:arrow_up:).

Basically, I just want the volume cube to be larger than the bounding box with an easy way to adjust how much.

Any assistance would be appreciated.

Hello @ZeroDean

(Mix+Max)/2 = center of BB (x/2 = x*0.5). Then it is like rotation… you move by opposite of this center (subtract, to origin), do scaling, then move it back (add).

Hope that helps.

3 Likes

Oh, that’s brilliant. Thank you.

Every time I think I’m getting the hang of geometry nodes, someone comes along to prove once again that I’ve barely begun to scratch the surface. This solution is well beyond my current ability to figure out on my own. Thanks for your help.

1 Like

Me too… I didn’t figure it out. I was taught it in a math class many years ago…

It was something like this…

Same applies to scaling around arbitrary point.

2 Likes

Ha! I’ve never been mathematically inclined. I’m always impressed by those who are! And remembering something you were taught in math class years ago definitely counts!

1 Like

Note: I also asked this question on Blender Stack Exchange if you have an account and want to answer it there. Otherwise, I will point to your solution here.

Yeah, I don’t have an account there so feel free to point to here.

Although, the answer there is pretty good.

This will also work:

Best become comfortable with some Vector math fundamentals or GN will be more of a challenge than it needs to be.

Good luck!

3 Likes