Coloring Points With Vex

Recommended Posts

SO, I am currently trying to make mini planets with procedurally generated biomes (Probably too ambitious since I'm still new at Houdini, especially with vex but oh well). I fist scattered a few points around a sphere then assigned those to a group. After merging the new group of points (radial) with the original sphere I wanted to make it so that points within a certain radius of the scattered dots would be colored red. I got everything in a VEX statement but I cant seem to figure out how to color the points nearby, only the point the wrangle is working on.

Note that I added an additonal parameter to the nearpoints function to indicate the maximum distance (0.1) (edit: now I realise this parameter it's not necessary, but anyway I think it's better to hace more control. Whatever floats your boat):

Share this post

Link to post

Share on other sites

in every iteration "i" stores the value of the array, so as the function nearpoints returns an aarray containing the point number of every point found, in every iteration "i" stores the pointnumber of a "near point".