Jump to content

point clouds, vops and creating edges


Recommended Posts

Hi all, I've just been diving into learning about Point Clouds and I've been trying to dissect examples to figure out what's going on..


I've been looking through Matt Estella's "Create Edges with Vops" file:




and whilst I'm able to replicate the effect, I'm wondering if it's possible at all to access the points on the floor that are being connected to the floating soot points. What I'd like to do is make the ones on the floor which are being connected, to change colour to red, but then go back to being black once disconnected. So far, I'm thinking that in the current setup this can't be done,since it's the soot points that are being queried? A thought just popped into my head- Would the way to go about it be to scrap the initial group check, sampling everything and only checking for groups later when calling add-primitive & add-vertex?


Thanks for any pointers... 

Link to comment
Share on other sites

Yep, you can set the value of another point with setpointattrib(). 


I just did some relearnin' of point cloud funcitons, this time with vex rather than with vops, I think its easier to read. Here's the guts of it (the wrangle has its group dropdown set to only run on the body points) :


float dist = ch('dist');
int num = chi('num');
int pc = pcopen(0,'P',@P,dist,num);
int pt;
int prim;

@Cd = {1,0,0};  // set body colour red

while (pciterate(pc)==1) { 
  pcimport(pc, 'point.number',pt);
  if (pt != @ptnum) {   // the results will include ourselves, skip that
      prim = addprim(0,'polyline');
      setpointattrib(0,'Cd',pt,{0,1,0},'set');  // set foot colour green

And a hip file:






  • Like 1
Link to comment
Share on other sites

Amazing! Thanks Matt. I just knew there'd be a function somewhere to access that info.


VEX has suddenly jumped up a few places on my to-learn list... though I think the new un-nested loops in VOPS do help with reading "code" a bit..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...