magneto Posted March 11, 2012 Share Posted March 11, 2012 I am trying to use the For Loop VOP but I am stuck with comparing 2 color values, because I can't find a is greater, is less than VOP. Any ideas on how to do this? Basically I want to find the point number with the smallest Value (HSV) just by using VOPs. Thanks Quote Link to comment Share on other sites More sharing options...
rdg Posted March 11, 2012 Share Posted March 11, 2012 Basically I want to find the point number with the smallest Value (HSV) just by using VOPs. Probably not understanding completely what your after but: There's a min vop: http://www.sidefx.com/docs/houdini11.1/nodes/vop/min I'm also pretty sure CompareVOP has a 'less than': http://www.sidefx.com/docs/houdini11.1/nodes/vop/compare Or you use a sortSOP and pick the first point ... Maybe ... 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 11, 2012 Author Share Posted March 11, 2012 Thanks, Compare VOP is exactly what I need. I could use Min VOP but that would give me the color, not the point number if I am not wrong. Quote Link to comment Share on other sites More sharing options...
symek Posted March 11, 2012 Share Posted March 11, 2012 (edited) Hmm, this is pretty exhausting computation, isn't it? VEX will execute the loop over all points times number of points. For this reason people usually compute min/max of an attribute with AttributePromoteSOP. Pure VEX/VOP method is to use Point Cloud by piping into position channel your color instead of P, so you effectively convert the point cloud into a color space. From that, it's easy to find minimum or maximum by opening a point could with extrema floats. Edited March 11, 2012 by SYmek 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 11, 2012 Author Share Posted March 11, 2012 Thanks Symek, you are right. I just wanted to do this because I saw a VOP tutorial showing the for loop where I solved that problem differently but wanted to use the for loop VOP just to learn it by coming up some simple case, but not practical I never used point clouds in Houdini, but if I do that, will I be able to find the point number or the color? I basically want to capture this point in some way. For instance color it differently or put it in a group. I couldn't do it using the for loop VOP because it seemed very unintuitive. Also the attribute promote technique is very clever, but still I wonder how will I capture the point with the lowest value? Another simple problem I was trying to solve was to color a the furthest point from the center in collection of points. Can I do something like this in VOPs? Thanks man Quote Link to comment Share on other sites More sharing options...
symek Posted March 11, 2012 Share Posted March 11, 2012 I never used point clouds in Houdini, but if I do that, will I be able to find the point number or the color? Sure. See example. pc_minmax.hipnc 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted March 11, 2012 Author Share Posted March 11, 2012 Thanks Symek, wicked example 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.