Page MenuHome

Geometry Nodes: New Proximity Node
ClosedPublic

Authored by Johnny Matthews (guitargeek) on Sep 25 2021, 1:56 PM.

Details

Summary

This is a fields-aware implementation of the attribute proximity node.

Source position is an implicit position field, but can be connected with a position input node with alterations before use.
Target input and mode function the same as the original node

Outputs are fields

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Sep 25 2021, 1:56 PM
Jacques Lucke (JacquesLucke) created this revision.

I wonder, did this even work in the current state?

source/blender/nodes/geometry/nodes/node_geo_proximity.cc
184

The target is already stored as a data member of this multi-function. It shouldn't be part of the signature.

217

I'm not 100% sure, but I think the indices here should be 0 and 1.

Johnny Matthews (guitargeek) retitled this revision from Geometry Nodes: New Proximity node (WIP). to Geometry Nodes: New Proximity Node.Sep 25 2021, 7:21 PM
Johnny Matthews (guitargeek) edited the summary of this revision. (Show Details)

Here is a first working version ready for help in cleaning up. In testing, I am getting the same results from the old to new nodes.

Johnny Matthews (guitargeek) edited the summary of this revision. (Show Details)

Update loops to use IndexMask

This revision was not accepted when it landed; it landed in state Needs Review.Sep 28 2021, 10:21 PM
This revision was automatically updated to reflect the committed changes.

I changed a few things in the version I will commit. The list is a bit longer than I intended, but once I started getting ready to commit it there was no turning back!

  • Pass MutableSpan by value instead of by reference.
  • A few small changes to wording and naming
  • Add back support for only outputting a one of instances
    • Moved more code inside the call function to make this simpler
  • Removed unused include and change to input position node.

I cannot get this node to work for me. I directly reproduced the example, and all points were affected equally with no proximity effect.

I cannot get this node to work for me. I directly reproduced the example, and all points were affected equally with no proximity effect.

This screenshot was before realize instances was removed from the node. Add a realize instances node after your object info node.