Bifrost Forum
Welcome to the Bifrost Forum. This is the place for artists using Bifrost to ask and answer questions, browse popular topics, and share knowledge about creating effects procedurally using Bifrost. You can also visit the Bifrost Community on AREA to download an array of ready-to-use graphs, read Bifrost news and updates, and find the latest tutorials.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Point neighbors scope node unexpected output

Message 1 of 3
599 Views, 2 Replies

Point neighbors scope node unexpected output

Hi guys,


I'm trying to get all neighbor vertexes that are connected to a given vertex but can't seem to get it working. After searching through nodes it looks like `point_neighbors_scope` would do the trick but I can never get it to return anything as it's always an empty output.


What stumps me is that I'll try it with a simple poly sphere and input a point index that I know exists, but if I check the output's point count it's 0. Maybe I'm not using it right or maybe it's actually used for entirely something else. I'm not sure as its info tab has nothing and I can't seem to find any documentation for Bifrost nodes.


Can someone let me know how to get it to output something for, let's say, a poly sphere? And if that's not the correct node for the job then please point me to the right direction!



Message 2 of 3

You have to use update_point_neighbors before you try any of the neighbor compounds.


update_point_neighbors will create a property containing a per-vertex lookup table, stored as an array<array<uint>>.  The top level array is indexed per-vertex of the input mesh.  Then, for each element in that array, there is a sub-array, containing all the indices adjacent to that vertex.  This 2D array is stored as a property called "point_neighbors", which you can get at any time and use for your purposes.


As a simple example, take a look at the "point_neighbor_count" compound, which literally just gets that property, and sums the number of adjacent vertices.


Here is a screenshot showing how to use the scope - which will draw the connections.

Message 3 of 3

Works perfectly! Thanks Marcus, I had a feeling I was missing something.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report