dolexd Posted March 26, 2021 Share Posted March 26, 2021 Hello, Can someone please explain to me what a linear vertex is properly? I thought I understood it when I was initially trying with lines but once I applied the function on the grid, everything seems wrong. I understood it as, primvertex points to the point number, so vertex 2 of primitive 1 should return 2 but instead it is returning 6. Not sure why? The same function with lines give me the correct answer. Quote Link to comment Share on other sites More sharing options...
Ultraman Posted March 26, 2021 Share Posted March 26, 2021 https://www.sidefx.com/forum/topic/30182/ Quote Link to comment Share on other sites More sharing options...
dolexd Posted March 26, 2021 Author Share Posted March 26, 2021 Hi Ultraman, Thanks for the reply. I saw this but it's still a little confusing. Why is @vtxnum returning a single value, instead of 4 values for each vertex? Quote Link to comment Share on other sites More sharing options...
Ultraman Posted March 27, 2021 Share Posted March 27, 2021 11 hours ago, dolexd said: Hi Ultraman, Thanks for the reply. I saw this but it's still a little confusing. Why is @vtxnum returning a single value, instead of 4 values for each vertex? I'm not sure why, Houdini vertex always is a little confusing for me - but if u want to get all vertex u can use primvertices[] . 1 Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted March 27, 2021 Share Posted March 27, 2021 (edited) Hi, the linear vertex number is useful, if you want to loop over all vertices at once (without looping over the prims). The linear vertex is independent from the primitive, where the vertex belongs to. Each prim has multiple vertices but each vertex has only one prim. Or lets say, if you put all vertices of all primitives into one list with unique identification (increasing numbers) you will get the linear vertices. Just put this source code into a vertex wrangle, to see the differences (you can also see, that each point can have several vertices aswell but each (linear) vertex is exactly one point reference) i@vn = @vtxnum; i@pv = vertexprimindex(0, @vtxnum); i@prim = @primnum; or just a file linear_vertex.hipnc Edited March 27, 2021 by Aizatulin 1 Quote Link to comment Share on other sites More sharing options...
dolexd Posted March 29, 2021 Author Share Posted March 29, 2021 Thanks Ultraman and Aizatulin. 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.