Netvudu Posted April 14, 2015 Share Posted April 14, 2015 Hi there. Here´s a hip file that did work in H13 (and with the proper H13 nodes and setup working). And next to it you´ll see the H14 setup that SHOULD work but it doesn´t. I imagine I´m doing something wrong but I cannot find the problem on the point cloud setup. I´m using a Set Attribute VOP instead of the Add Point to Group which doesn´t exist anymore... Please, help me Obi-wan kenobi, blahblah... PointCloud_H14_AddToGroup.hipnc Quote Link to comment Share on other sites More sharing options...
iamyog Posted April 14, 2015 Share Posted April 14, 2015 http://forums.odforce.net/topic/21694-sidefx-releases-houdini-14/page-5#entry129427 add a constant value set to 1 Apparently you also need to connect the global P to your pcopen2 or it does not work (at least on the old H14.0.132) Quote Link to comment Share on other sites More sharing options...
Robert Posted April 14, 2015 Share Posted April 14, 2015 In the attribvop you don't have anything connected to the P of the pcopen node. Still after connecting it gives the error that pcclose hasn't been called. But why are you using a loop to iterate through your burned points? You are already isolating the burned points before calling pcopen on them so wouldn't a simple pcnumfound() !=0 suffice? Quote Link to comment Share on other sites More sharing options...
Netvudu Posted April 14, 2015 Author Share Posted April 14, 2015 (edited) thanks so much! Yes, P should have been connected...my bad! I didn´t recall about the constant. It´s a rather strange workflow. I´m still not sure why SESI took out the Add Point to group. It was more intuitive. Thanks again. EDIT: Hi Robert. I´m not sure about the setup you suggest. Could you upload a quick example, even using my file? As far as I know pcnumfound returns the number of points that match the criteria, but not which numbers are, so how would I add each of them to the group? That´s why I used the loop. Edited April 14, 2015 by Netvudu Quote Link to comment Share on other sites More sharing options...
Robert Posted April 14, 2015 Share Posted April 14, 2015 I first did it in a wrangle because I find it sooooooooo much faster to setup (3 lines of code). I also included an example with the attribvop but it's not perfect. I use a switch with the condition that a point has been found (pcnumfound !=0) and if it is true the point number of the current point gets added to the group. The other input of the switch currently has to be 0. I tried making it -1 but then the operation just breaks down. This means that if you use the attribvop version, point number 0 will always be in the group since there is always some point that fails the switch check and then adds 0 to the group instead of itself. PointCloud_H14_AddToGroup_edit.hipnc Quote Link to comment Share on other sites More sharing options...
Netvudu Posted April 14, 2015 Author Share Posted April 14, 2015 (edited) Ok. At any rate a two way switch is almost the same as an if-then node (without entering a node), so I find your setup pretty similar to mine. I concur that the Wrangle version is a million times simpler, but this is an example for my students, and explaining point clouds starting from a wrangle node is quite a bold move for educational purposes. But hey, lots of thanks for your example. The wrangle is a really nice and elegant solution. EDIT: In fact you can simplify a bit your VOP setup by changing both your pcnumfound and compare by a single pciterate as the result is quite the same. If the pciterate finds new points it returns 1, exactly the same as if the pcnumfound compares to anything different to zero which was your approach. It is true that the VOP node gives a warning about the point cloud not being properly closed, but it works...go figure. EDIT2: and in the Wrangle node is the exact same thing. If I change your numfound but an iterate it works exactly the same way, but it does return the same warning even though it works. Edited April 14, 2015 by Netvudu 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.