Im trying to create “spots” on a mesh. I generate spheres on the mesh, and test the mesh vertices for inclusion in those spheres, and then colour the mesh vertices accordingly. It mostly works, but I keep getting these weird lines - any idea whats going on?
don’t know exactly what’s going on there, but I would do it slightly differently
because you are testing point inclusion inside a sphere, sphere which is a Center Point and a Radius, I would instead pull Point component on Mesh vertexes (closest) to those random Points, and check if the distance is smaller or equal to the radius of your sphere, which would mean the point is contained:
the main difference is that, using this version, each time you want to test a new sphere radius you don’t need to recalculate point containment: because you already have a full list of calculated distances, the only calculation in play is the “smaller than” component, which is pretty fast to compute