magicU Posted December 11, 2015 Share Posted December 11, 2015 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: http://www.tokeru.com/cgwiki/?title=Houdini#Create_edges_with_vops 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... Quote Link to comment Share on other sites More sharing options...
mestela Posted December 11, 2015 Share Posted December 11, 2015 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'); addvertex(0,prim,pt); addvertex(0,prim,@ptnum); setpointattrib(0,'Cd',pt,{0,1,0},'set'); // set foot colour green } } And a hip file: soot_colours.hipnc -matt 1 Quote Link to comment Share on other sites More sharing options...
mestela Posted December 11, 2015 Share Posted December 11, 2015 And a silly variation based on the plexus stuff Atom mentioned the other day. spiders.hipnc 2 Quote Link to comment Share on other sites More sharing options...
sebkaine Posted December 11, 2015 Share Posted December 11, 2015 Now i know how those lazy animators at ILM has animated the War of the World mecha ... Quote Link to comment Share on other sites More sharing options...
magicU Posted December 11, 2015 Author Share Posted December 11, 2015 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.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.