XaiJu
animatrix
animatrix

patreon


VEX Proximity SOP [Updates]

Queries point clouds using proximity optionally with variable radius per point.

Now computes normalized weights and completely revamped UI.

First off we need to be able include the point itself in the resulting array. Often times the point itself can also contribute to the final result computed from its neighbours. Returning this in the same array simplifies the kernel code we have to write later on as we can handle all the points uniformly, instead of making an exception for the current point.

For point clouds, you take the radius, which is the furthest point found and normalize all the distances, using this max distance. This will give us a normalized linear curve. But we also need to normalize all weights by the sum of the weights so that their sum is 1.

This is to ensure that the summed total of attribute values do not go over the original range. Otherwise in the case of colors for example, the new colors would be overexposed.

For neighbours, we use the connectivity information and take the depth for each point and divide the result by max depth. So max depth will be 1 and the point itself will be 0. This will also give us a normalized linear curve that's spread evenly among each depth.

For point clouds, I also implemented pcfilter VEX function generically without the use of old school point clouds, i.e. pcopen handles.

https://www.dropbox.com/s/tngfkrdijn1v2r3/Proximity_SOP_Animatrix.otl?dl=1

VEX Proximity SOP [Updates]

More Creators