# how to instantiate object on certain positions geometry nodes?

I have the following setup, the plane rectangular thins is road, the the scattered object is grass, the following is the node setup, if I don't want like the instances of grass to appear where there is the road I have made, why can't I use this setup (edited)

the road has x y z coordinates positions right, if I can take the position attribute of the road(specific values of the road), and then on the selection of the distribute points on faces I should be able to say distribute points on all the positions besides those specific x y z position of the road correct? That setup doesn't seem to work and only one that works as intended is the geometry proximity node setup, but I was wondering what was wrong with the initial setup I had

• The node Transfer Attribute transfers exactly nothing in this setup, because it has no input at Attribute. To create a selection, however, you would have to compare any values beforehand. Sep 4, 2022 at 19:12
• is there a way to transfer the exact position of the road I have, and then say don't instantiate there? Sep 4, 2022 at 19:14
• @quellenform wdym by comparing value beforehand? Sep 4, 2022 at 19:17
• Yes, by also transferring the corresponding attribute, but it's actually not the right way in your use case, because some faces would protrude into the road and then grow tufts of grass on it. Sep 4, 2022 at 19:18
• @quellenform what do you mean by transferring the corresponding attribute? corresponding attribute of what? Sep 4, 2022 at 19:24

If you want to finish your solution, it should look like this:

Here first the positions of the faces of one mesh are transferred with Transfer Attributes, and then compared with the positions of the other mesh. If these positions are congruent, a face is selected.

However, since here positions of faces are compared, it can come with this solution to the problem that nevertheless points are produced on faces, which protrude into the road.

Therefore I would solve this with the node Raycast:

Here, after the node Distribute Points on Faces, each point is compared to the mesh below it. If a raycast (the "ray") sent downwards hits a mesh, then a selection is generated. This selection is used to remove the points that are directly above the road.

(Blender 3.1+)

• Thank you very much! Sep 4, 2022 at 19:43
• @NunMatters You are welcome! Sep 4, 2022 at 19:43
• the first setup with transfer attribute, the position that is being compared with the not on slot b, what values does that position have, it has all of the xyz cordinates of the original mesh correct and the slot a only has the xyz cordinates of the mesh line? Sep 4, 2022 at 20:00
• @NunMatters Since the node 'Distribute Points on Faces' applies a selection to faces at the input Selection, the position of the faces is always used for the comparison. Sep 4, 2022 at 20:09
• I see thanks again very much it was very helpful! Sep 4, 2022 at 20:15