14
$\begingroup$

3D Studio has a modifier called "Volume Select" that allows using an element's geometry as a sort of selection force field that influences elements in its path. It can be used to transform many at once, as illustrated below.

enter image description here

Is there a way to do this in Blender? If not a modifier, maybe a script? I'm trying to animate a block of cubes that shrink and grow in a pattern and something like volume selecting would help a lot.

Thanks!

$\endgroup$
22
$\begingroup$

Animation Nodes can be used here. The Find Nearest Surface Point node is used to compute the distance between every element and its closest surface point, the distance is then used as the scale of the elements as following:

Node Tree

Evaluating the distance at an interpolation gives you fine control over its rate of change:

Node Tree

$\endgroup$
10
$\begingroup$

In blender you can use Drivers.

1) In N-panel click RMB on scale and in context menu select Drivers -> Manually create later. Scale will be pink-colored

enter image description here

2) Open Graph Editor in Drivers Mode

3) Chose X Scale, remove all dots from curve and draw a new one (CTRL+LMB to add a dot) You can perfectly align it using Active keyframe tab.

Here will be your curve, last 2 dots must have 0 Value, to make object completely invisible in long distance.

enter image description here

Horizontal will be distance between objects, vertical - Scale.

4) Goto Drivers Tab

5) Setup settings:

Type - Averaged Value

Var type - Distance

Object 1 & 2 - is your current object and object-controller.

6) In N-panel RMB-click on X scale and in context menu select Copy Driver. When Paste Driver in Y and Z Scale.

7) Finally copy your objects in a grid or any pattern:

enter image description here

See also: For more advanced cases you can use node-based visual programing: animation nodes

$\endgroup$
  • $\begingroup$ Thank you for the detailed step-by-step. This is similar to what I want to make, but I wonder if it can it be done with a volume. I tried your method with a cube instead of an empty, but the drivers only reacted to proximity with its origin and not its boundaries. Can nodes help with this? $\endgroup$ – user62099 Sep 7 '18 at 9:15
  • $\begingroup$ @user62099 If you can describe the volume with a formula, you can instead use mathematical expressions for the driver, otherwise animation nodes is your bet. The following will probably be useful: animation-nodes-manual.readthedocs.io/en/latest/user_guide/… . $\endgroup$ – Sazerac Sep 10 '18 at 0:48
-1
$\begingroup$
  1. If you want it as you showed it, create the mask first

enter image description here

  1. Put the object to be animated in the hole less than 0,01 below the mask and make sure the mask's color is the same as world's

enter image description here

  1. Animate the objects within the mask's boundaries

enter image description here

This is the fastest, simplest way and gives the desired effect. Nodes are needless complication.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.