6
$\begingroup$

I've been looking at tutorials and various node tree screenshots, but since the 3.0 release many aspects of Geometry Nodes have changed, making those sources largely irrelevant.

In 3.0, how can we use an Empty to scale / rotate / etc. a bunch of instances?

Above: Icospheres generated at each mesh point, and an Empty I want to influence them with.

My node tree so far:

The beginnings of a node tree for affecting instances by proximity

I have been trying lots of different things to scale these (100% effect where the Empty is, and tapering off to 0% effect beyond a certain radius, such as the radius of the Empty object).

Also, it would be nice to be able to adjust the falloff curve.

$\endgroup$
2
  • $\begingroup$ By the way: the Geometry Proximity node calculates the distance between the location of the original geometry's points or distributed points etc. to the geometry of a target object. Which means the way you connected it, it wouldn't work. The Object Info node's Geometry output has to be plugged into the Target input of the proximity node, and Source Position needs the positions of the "original" points. This will not work with an empty since it has no geometry (see comments below Nathan's answer). $\endgroup$ Jan 21 at 13:37
  • $\begingroup$ @GordonBrinkmann sort of. The empty shouldn't be an input, it should just be picked in the Object Info node. In that case, plugging the location into Source Position is exactly right and the only thing wrong is that the Geometry output of the Group Input needs to plug into the Target input of the Proximity node. See my just posted answer. $\endgroup$ Jan 22 at 2:35

2 Answers 2

11
$\begingroup$

You don't need geometry proximity to scale by prox to an empty. You just need to check the distance to the empty:

enter image description here

Here it is with a falloff curve (using RGB curves node, but a float is a float.) I'm clamping it to the 0,1 range (and inverting it) before the RGB curve for convenience-- anything more than 1 unit away will get the minimum scale I have in my curve.

Edit: Here's a pic from the file Mentalist offered in comments:

enter image description here

Gordon Brinkman also offered that we can just use distance instead of subtract+length.

$\endgroup$
17
  • 3
    $\begingroup$ @MartyFouts If you want to get technical, is an empty geometry? $\endgroup$
    – Nathan
    Jan 21 at 5:37
  • 1
    $\begingroup$ @MartyFouts There is a difference though, Nathan is correct. While he checks the distance of the Empty object (i.e. one location: the object's origin) to the points, the Geometry Proximity node checks the distance of each point/edge/face (depending on the chosen option) of some geometry to other points. $\endgroup$ Jan 21 at 7:23
  • 3
    $\begingroup$ @Nathan Just a quick optimization: instead of using two Vector Math nodes, a Subtract and a Length node, you could simply use a single node set to Distance. $\endgroup$ Jan 21 at 7:25
  • 2
    $\begingroup$ @common_goldfish I don't see that Mentalist claimed it to be the same ;) On the contrary, quote: "I made some minor changes to Map Range etc." And since the changes are neither affecting the general functionality of the proximity effect nor is Mentalist the author of the answer and its node tree there is no need to exactly copy the screenshot. As many Blender tutors say: it's not important to copy all the exact settings of a tutorial but to understand how it's working. $\endgroup$ Jan 21 at 13:48
  • 1
    $\begingroup$ @MartyFouts You say it yourself: he said geometry proximity, not just proximity. And you can not calculate any geometry proximity from an empty, since it has no geometry. It's not only that you don't need no geometry proximity, you can't use geometry proximity with an empty. $\endgroup$ Jan 21 at 19:07
1
$\begingroup$

You can use a Geometry Proximity node if you want, and your setup was close. Here's a version of your node group that works:

Node group that uses Geometry proximity node

In this example, notice that I use an Object Info node, rather than an input to the Geometry node group. That gives me the geometry location of the empty. The only other change from your setup was to plug the distance output of the Geometry Proximity group into the Scale input of the Instance on Points node. This uses the relative position of the empty to control the scale of the icospheres:

demonstration of moving empty controlling icosphere scale

EDIT: There seems to be a lot of confusion in the comments about the difference between this approach from the accepted answer and the approach I've described above. Here's a version of the other approach, simplified to highlight the major difference:

Using a field for control

The geometry proximity node has been replaced by a proximity calculation using vector math. Both approaches work with an empty, because both approaches calculate the distance from the target object to a point. In both cases the point is the location of the empty. In both cases, the empty can be replaced by other objects, so long as their location is used.

The difference as Nathan has pointed out by example in the accepted answer is that my approach gives a single value for distance — the distance between the location of the empty and the nearest face (in the example) of the target object. (It could be the nearest vertex or edge, depending on settings in the Geometry Proximity node.) The other approach gives the distance between the location of the empty and every point on the target object.

Use my approach if you want a single value, ie for uniform scaling of instanced objects. Use the accepted approach if you want a field of values, ie for scaling that depends on the distance to each instance.

$\endgroup$
12
  • $\begingroup$ I added a pic to my answer. You can see the difference? But maybe that explains the misunderstanding. Indeed, you're getting proximity to geometry, and I'm getting proximity to an empty. The difference is that proximity to geometry is 1 number, shared by all your points, and that proximity to an empty is a per-point attribute. $\endgroup$
    – Nathan
    Jan 22 at 2:56
  • $\begingroup$ @Nathan You're still getting it partially wrong. There are two objects involved in either proximity calculation. We're both getting the proximity of an empty to an object. The part you get right is the part I've been trying to get you to expand on in your answer: the way in which your approach differs is that you get a field for every point and I get a single value. To the OP both approaches solve their control requirement; they just do so differently. $\endgroup$ Jan 22 at 4:57
  • $\begingroup$ for many applications people want uniform control and should use my approach. For other applications they want falloff and should use yours. $\endgroup$ Jan 22 at 4:59
  • $\begingroup$ The difference is only, if you use the Geometry Proximity node as it makes more sense, you can use your grid points where the icospheres are instanced as Source Position and instead of an empty take e.g. a cube. If you now for example put the cube in the middle of the grid, you can scale the icospheres according to their dstance to the cube's mesh so that they are maybe small close to it and larger far from it. And this means they can get larger again in the middle of the cube, because there they are further away from the mesh. This is not possible with an empty's origin point. $\endgroup$ Jan 22 at 16:49
  • $\begingroup$ @GordonBrinkmann It doesn't work that way. That's why Nathan added his example. To get the scaling you describe, use his method. To get uniform scaling use mine. $\endgroup$ Jan 22 at 16:55

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.